log4js-node
log4js-node copied to clipboard
Inconsistent behavior of Log4js with PM2
Hi all,
I am using log4js v 5.1.0 in PM2 mode with 2 workers and log level as debug. I have noticed that in particular file where log.debug is not used(only log.info) then logs not are getting written. Is that expected or i am missing something?
{
appenders: {
app: {
type: 'dateFile',
filename: 'log_file.log',
pattern: '-yyyy-MM-dd',
alwaysIncludePattern: false,
maxLogSize: '10000',
backups: '10',
layout: {
type: 'pattern',
pattern: '[%d] [%p] [%c] %m'
}
}
},
categories: {
default: {
appenders: ['app'],
level: 'debug'
}
},
pm2: true,
}
From your config, debug level logs should be written. Did you find a solution, or is this still happening?