Closed sile closed 6 years ago
Merging #14 into master will increase coverage by
38.57%
. The diff coverage is78.64%
.
@@ Coverage Diff @@
## master #14 +/- ##
===========================================
+ Coverage 3.99% 42.56% +38.57%
===========================================
Files 9 9
Lines 401 585 +184
===========================================
+ Hits 16 249 +233
+ Misses 385 336 -49
Impacted Files | Coverage Δ | |
---|---|---|
src/lib.rs | 100% <ø> (ø) |
:arrow_up: |
src/error.rs | 0% <0%> (ø) |
:arrow_up: |
src/file.rs | 64.53% <79.05%> (+55.15%) |
:arrow_up: |
src/types.rs | 33.33% <0%> (+33.33%) |
:arrow_up: |
src/misc.rs | 43.75% <0%> (+43.75%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update fd02146...e51fc25. Read the comment docs.
Looked over, cool. Are you willing to add compression on rotation as option (i.e. the old file is moved to a new name and compressed into .gz?) interesting question being how the compression should be forked? thread? then we'll have lifetime issues I think. spawning a process? tad heavy ... Some kind of worker queue?
Are you willing to add compression on rotation as option ...
I would like to keep this PR simple, but I will consider it a bit.
cool, willing to help if you attack that ... think through design first & whether you want to go there ...
slog is a professional quality logger and that take it a notch higher up again IMO ... Alternately, we could implement a log-rotating-copressing drain and take the whole thing out of sloggers if you prefer and let sloggers use that just like it uses KVFilter now ...
On Wed, Aug 29, 2018 at 5:34 AM Takeru Ohta notifications@github.com wrote:
Are you willing to add compression on rotation as option ...
I would like to keep this PR simple, but I will consider it a bit.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sile/sloggers/pull/14#issuecomment-416936066, or mute the thread https://github.com/notifications/unsubscribe-auth/ABo0CxRZ8ahha09LnUpua4r7YSBz_14pks5uVopJgaJpZM4WOB7s .
Thank you for your comments. > @przygienda
I prefer to use threads for compressing log files. And I added rotated log file compression option at https://github.com/sile/sloggers/pull/14/commits/049b6cf3ffcf6ac6ed53d8ab3332c9c665045cf1.
Alternately, we could implement a log-rotating-copressing drain and take the whole thing out of sloggers if you prefer and let sloggers use that just like it uses KVFilter now ...
If you want a more advanced implementation (or options) than https://github.com/sile/sloggers/pull/14/commits/049b6cf3ffcf6ac6ed53d8ab3332c9c665045cf1, it seems better to implement this feature on another crate like slog-kvfilter
.
so, that's getting pulled up? looks good and useful to me ...
looks good and useful to me
I see. I will merge this PR after conflicts are resolved.
Add
rotate_size
androtate_keep
options toFileLoggerBuilder
andFileLoggerConfig
for supporting basic log file rotation.Related Issue: https://github.com/sile/sloggers/issues/12