log4js-node icon indicating copy to clipboard operation
log4js-node copied to clipboard

Inconsistent behavior of Log4js with PM2

Open manthan1234567 opened this issue 6 years ago • 1 comments

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,
            }

manthan1234567 avatar Sep 13 '19 08:09 manthan1234567

From your config, debug level logs should be written. Did you find a solution, or is this still happening?

nomiddlename avatar Oct 22 '19 21:10 nomiddlename