File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { pino } from 'pino'
77import readline from 'readline'
88import { join } from 'path'
99import { readFileSync } from 'fs'
10+ import { tmpdir } from 'os'
1011import { createServer } from 'http'
1112import { randomUUID } from 'crypto'
1213import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js'
@@ -17,19 +18,19 @@ const __dirname = import.meta.dirname
1718const packageJson = JSON . parse ( readFileSync ( join ( __dirname , './package.json' ) , 'utf8' ) )
1819const VERSION = packageJson . version || '0.0.1'
1920
20- // Configure pino logger
21+ // Configure pino logger with cross-platform temp directory
2122const logger = pino ( {
2223 level : 'info' ,
2324 transport : {
2425 targets : [
2526 {
2627 target : 'pino/file' ,
27- options : { destination : '/tmp/ socket-mcp-error.log' } ,
28+ options : { destination : join ( tmpdir ( ) , ' socket-mcp-error.log') } ,
2829 level : 'error'
2930 } ,
3031 {
3132 target : 'pino/file' ,
32- options : { destination : '/tmp/ socket-mcp.log' } ,
33+ options : { destination : join ( tmpdir ( ) , ' socket-mcp.log') } ,
3334 level : 'info'
3435 }
3536 ]
You can’t perform that action at this time.
0 commit comments