Merge pull request #28 from kweinmeister/main

feat: add configuration option for log file path
This commit is contained in:
yctimlin
2025-10-20 00:57:44 +08:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -310,6 +310,7 @@ For VS Code MCP extension, add to your settings:
|----------|---------|-------------|
| `EXPRESS_SERVER_URL` | `http://localhost:3000` | Canvas server URL for MCP sync |
| `ENABLE_CANVAS_SYNC` | `true` | Enable/disable canvas synchronization |
| `LOG_FILE_PATH` | `excalidraw.log` | Path to the log file |
| `DEBUG` | `false` | Enable debug logging |
| `PORT` | `3000` | Canvas server port |
| `HOST` | `localhost` | Canvas server host |
+3 -1
View File
@@ -1,5 +1,7 @@
import winston from 'winston';
const LOG_FILE_PATH = process.env.LOG_FILE_PATH || 'excalidraw.log';
const logger: winston.Logger = winston.createLogger({
level: process.env.LOG_LEVEL || 'info',
@@ -22,7 +24,7 @@ const logger: winston.Logger = winston.createLogger({
}),
new winston.transports.File({
filename: 'excalidraw.log', // all levels to file
filename: LOG_FILE_PATH, // all levels to file
level: 'debug'
})
]