-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I am trying to create a system where in development mode I write errors to log files and also to the console, but in production I only want to write to log file.
This is how my logger looks like:
export const Log = simpleNodeLogger.createRollingFileLogger({
errorEventName: 'error',
logDirectory: 'logs',
fileNamePattern: 'log-<DATE>.log',
dateFormat: 'YYYY-MM-DD'
});
if (process.env.NODE_ENV === 'production') {
// disable console output, only leave file write
}I haven't found any config parameters for disabling console logging. I also tried using appenders, but I don't understand them at all and I didn't have luck.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels