egg-logrotater
logrotater for egg
Last updated 10 years ago by fengmk2 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install egg-logrotater 
SYNC missed versions from official npm registry.

egg-logrotater

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Log rotate plugin for egg, default rotate log files under config.logger.rotateLogDirs.Run by egg-schedule

Install

$ npm i egg-logrotater

Usage

  • plugin.js
exports.logrotater = true;
  • config.default.js
// if any files need rotate by file size, config here
exports.logrotater = {
  filesRotateBySize: [],           // Array for files path which need rotate.
  maxFileSize: 50 * 1024 * 1024,   // Max file size to judge if any file need rotate
  maxFiles: 10,                    // pieces rotate by size
  rotateDuration: 60000,           // time interval to judge if any file need rotate
  maxDays: 31,                     // keep max days log files, default is `31`. Set `0` to keep all logs
};

Questions & Suggestions

Please open an issue here.

License

MIT

Current Tags

  • 1.0.1                                ...           latest (10 years ago)

5 Versions

  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.0.4                                ...           10 years ago
  • 0.0.2                                ...           10 years ago
  • 0.0.1                                ...           10 years ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (3)
Dev Dependencies (11)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |