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'
7
7
import readline from 'readline'
8
8
import { join } from 'path'
9
9
import { readFileSync } from 'fs'
10
+ import { tmpdir } from 'os'
10
11
import { createServer } from 'http'
11
12
import { randomUUID } from 'crypto'
12
13
import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js'
@@ -17,19 +18,19 @@ const __dirname = import.meta.dirname
17
18
const packageJson = JSON . parse ( readFileSync ( join ( __dirname , './package.json' ) , 'utf8' ) )
18
19
const VERSION = packageJson . version || '0.0.1'
19
20
20
- // Configure pino logger
21
+ // Configure pino logger with cross-platform temp directory
21
22
const logger = pino ( {
22
23
level : 'info' ,
23
24
transport : {
24
25
targets : [
25
26
{
26
27
target : 'pino/file' ,
27
- options : { destination : '/tmp/ socket-mcp-error.log' } ,
28
+ options : { destination : join ( tmpdir ( ) , ' socket-mcp-error.log') } ,
28
29
level : 'error'
29
30
} ,
30
31
{
31
32
target : 'pino/file' ,
32
- options : { destination : '/tmp/ socket-mcp.log' } ,
33
+ options : { destination : join ( tmpdir ( ) , ' socket-mcp.log') } ,
33
34
level : 'info'
34
35
}
35
36
]
You can’t perform that action at this time.
0 commit comments