Puppy
Puppy copied to clipboard
Add optional file protection + backup exclusion to FileLoggerable
This PR adds optional file protection and backup exclusion to FileLogger and FileRotationLogger. To my knowledge, these features are only available on Apple platforms, so the tests I've added will only run on those platforms. Maybe these features should be entirely gated behind compile-time checks? Open to feedback.
I also added flushMode and writeMode to FileRotationLogger because those seem to be missing (FileLogger supports this).
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.26%. Comparing base (
510741f
) to head (f71641d
).
:exclamation: Current head f71641d differs from pull request most recent head c3bda25. Consider uploading reports for the commit c3bda25 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #93 +/- ##
==========================================
+ Coverage 97.18% 97.26% +0.08%
==========================================
Files 12 12
Lines 639 658 +19
==========================================
+ Hits 621 640 +19
Misses 18 18
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hello, can I get the kill and background mode logs if I use this package? please anyone, help me
Hi @sushichop, do you think this would be a good idea to merge into main?
Do you think it makes sense to put these initializer arguments behind a compile-time check so that this can be mergeable? If so I could make that change.
Let me know what you think.
@richardhenry it can be wrapped in eg #if os(iOS) || os(macOS) || [...]
@sushichop Thanks, should be fixed — can you trigger another test run?