Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
npx mcp-server-nodejs-api-docs
```

You can debug calls for the MCP Server by inspecting the file `/tmp/mcp-server-nodejs-docs.log` which this MCP Server writes to.
You can debug calls for the MCP Server by inspecting the file `mcp-server-nodejs-docs.log` in your system's temporary directory (e.g., `/tmp` on Unix-like systems or `%TEMP%` on Windows) which this MCP Server writes to.

## Usage: as a Docker container

Expand Down
6 changes: 3 additions & 3 deletions src/utils/logger.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { pino } from 'pino'
import type { Logger } from 'pino'
import * as path from 'path'
import * as os from 'os'

// Re-export pino types for use in other modules
export type { Logger } from 'pino'

// @TODO change the log file path to be cross-platform compatible
// and support other OSs
const logFilePath = '/tmp/mcp-server-nodejs-docs.log'
const logFilePath = path.join(os.tmpdir(), 'mcp-server-nodejs-docs.log')

export function initLogger (): Logger {
const logLevel = process.argv.includes('--debug') ? 'debug' : 'info'
Expand Down
Loading