-
Notifications
You must be signed in to change notification settings - Fork 12
Support log rotate #886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Support log rotate #886
Conversation
9ffd92e to
105e9d6
Compare
Codecov Report
@@ Coverage Diff @@
## master #886 +/- ##
=========================================
- Coverage 60.42% 60.02% -0.4%
=========================================
Files 153 153
Lines 10774 10833 +59
=========================================
- Hits 6510 6503 -7
- Misses 3521 3585 +64
- Partials 743 745 +2
Continue to review full report at Codecov.
|
|
I thought you wanted to use logrorate directly ? At least that's what we discussed in the issue |
|
@Geod24 Hmm, |
105e9d6 to
163d279
Compare
|
@spikeekips : What kind of additional effort ? It should be a few (<10) LoC in sebak and a configuration file. |
|
@Geod24 :) For instance, like these |
163d279 to
cbe6eba
Compare
Github Issue
Resolves #873
Background
In debug mode, SEBAK produces huge log messages including HTTP requests and responses log. Under docker, we can use
max-sizesetting in log driver, but a node can keep the entire log messages, it's the matter of choice.Solution
There are 2 logs, node log, and HTTP log. Each log will have rotate options,
--log-rotate-max-size,--http-log-rotate-max-size: if log file is over, rotate log--log-rotate-max-age,--http-log-rotate-max-age: if log file is over days, rotate log--log-rotate-max-count,--http-log-rotate-max-count: if the number of rotated logs over, remove olds--log-rotate-uncompress,--http-log-rotate-uncompress: compress or not