1.0.1 • Published 8 years ago

egg-logrotater v1.0.1

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

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

1.0.1

8 years ago

1.0.0

8 years ago

0.0.4

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago