Search code examples
log4js-node

How can I control how many days are rolled in 'dateFile' appender with the default '-yyyy-MM-dd' pattern?


Is there an option to control the maximum number days to roll?

At first I thought this was controlled by the "backups" option, but a quick look at RollingFileStream.js seems to indicate that this manages indexes, not necessarily related to the date rolling pattern.


Solution

  • As of this post, there is no mechanism to control the maximum number of days to roll with the "dateFile" appender: https://github.com/nomiddlename/log4js-node/issues/323

    The manager of the github project has agreed that this would be a useful feature - so maybe a resolution could made available in the future.