/pino-rotate

A pino transport for rotating log files

Primary LanguageTypeScript

pino-rotate

A pino transport for rotating log files

npm install --save pino-rotate

Example

const logger = pino({
  level: 'debug',
  transport: {
    targets: [
      {
        target: 'pino-rotate',
        options: {
          file: './logs/app-%YYYY-MM-DD%.log',
          limit: '7d',
        },
      }
    ]
  }
})