-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Summary
The application crashes with an ENOENT error when trying to create a logs directory, even when logToFiles is explicitly set to false in the configuration.
Expected Behavior
When logToFiles is set to false in config.json, the logger should not attempt to create log directories.
Actual Behavior
The logger is being initialized regardless of the logToFiles setting, causing the application to crash when the ./logs directory doesn't exist.
config.json:
"other": {
"autoUpdater": false,
"autoUpdaterInterval": 12,
"logToFiles": false
},
Error: ENOENT: no such file or directory, mkdir './logs'
at Object.mkdirSync (node:fs:1364:26)
at File._createLogDirIfNotExist (/usr/src/app/node_modules/winston/lib/winston/transports/file.js:761:10)
at new File (/usr/src/app/node_modules/winston/lib/winston/transports/file.js:94:28)
at Object.<anonymous> (/usr/src/app/src/Logger.js:6:26)
at Module._compile (node:internal/modules/cjs/loader:1730:14)
at Object..js (node:internal/modules/cjs/loader:1895:10)
at Module.load (node:internal/modules/cjs/loader:1465:32)
at Function._load (node:internal/modules/cjs/loader:1282:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) {
errno: -2,
code: 'ENOENT',
syscall: 'mkdir',
path: './logs'
}
Metadata
Metadata
Assignees
Labels
No labels