Skip to content

Commit f43bd70

Browse files
authored
Merge pull request #2 from drifthoundhq/feat/request-logging
feat: add HTTP request logging
2 parents 0a98a19 + 2c349a5 commit f43bd70

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@drifthoundhq/mcp-server",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "MCP server for DriftHound IaC drift detection and remediation",
55
"main": "dist/index.js",
66
"type": "module",

src/server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ export async function runHttpServer(
6565
try {
6666
const url = new URL(req.url ?? '/', `http://localhost:${port}`);
6767

68+
if (url.pathname !== '/healthz' && url.pathname !== '/readyz') {
69+
console.error(`${new Date().toISOString()} ${req.method} ${url.pathname}`);
70+
}
71+
6872
if (url.pathname === '/healthz') {
6973
res.writeHead(200, { 'Content-Type': 'application/json' });
7074
res.end(JSON.stringify({ status: 'ok' }));

0 commit comments

Comments
 (0)