config.default.js 880 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. /**
  3. * logrotator options
  4. * @member Config#logrotator
  5. * @property {Array} filesRotateByHour - list of files that will be rotated by hour
  6. * @property {Array} filesRotateBySize - list of files that will be rotated by size
  7. * @property {Number} maxFileSize - Max file size to judge if any file need rotate
  8. * @property {Number} maxFiles - pieces rotate by size
  9. * @property {Number} maxDays - keep max days log files, default is `31`. Set `0` to keep all logs.
  10. * @property {Number} rotateDuration - time interval to judge if any file need rotate
  11. * @property {Number} maxDays - keep max days log files
  12. */
  13. exports.logrotator = {
  14. // for rotate_by_hour
  15. filesRotateByHour: null,
  16. hourDelimiter: '-',
  17. // for rotate_by_size
  18. filesRotateBySize: null,
  19. maxFileSize: 50 * 1024 * 1024,
  20. maxFiles: 10,
  21. rotateDuration: 60000,
  22. // for clean_log
  23. maxDays: 31,
  24. };