Logrus: 使用日志文件收集日志,如何实现 保存指定文件大小的日志文件,和指定天数的 日志文件数量???

Created on 27 Dec 2020  ·  7Comments  ·  Source: sirupsen/logrus

如果有好的策略 请提供下相关文档信息,谢谢了,
1、如果采用是文件输出,输出到指定文件,但是没有办法进行分割实现? 和保存指定文件大小

need-more-info stale

All 7 comments

Can you explain your issue in english ?

How to save log files with specified file size and number of log files for specified days??

If you have a good strategy, please provide the following relevant document information, thank you,

  1. If you use file output, output to the specified file, but there is no way to achieve segmentation? And save the specified file size

How to achieve log file segmentation?

use syslog hook to write logs into syslog, then use logrotate to specified file size and number of log files for specified days

为什么不可以 和beego.logger 那样自定义 这个配置参数?将会实现吗

@ruixule

file-rotatelogs is what you need.
https://github.com/lestrrat-go/file-rotatelogs

And again, please explain your issue in English later, not all understand Chinese.

Can we close this issue ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

salvador-dali picture salvador-dali  ·  5Comments

rogierlommers picture rogierlommers  ·  5Comments

SergeiVasilenko picture SergeiVasilenko  ·  3Comments

drewwells picture drewwells  ·  3Comments

anotherGoogleFan picture anotherGoogleFan  ·  3Comments