Skip to content
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

Add optional file protection + backup exclusion to FileLoggerable #93

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

richardhenry
Copy link

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.

@richardhenry
Copy link
Author

I also added flushMode and writeMode to FileRotationLogger because those seem to be missing (FileLogger supports this).

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.26%. Comparing base (510741f) to head (f71641d).

❗ 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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@karthickrohan
Copy link

Hello, can I get the kill and background mode logs if I use this package? please anyone, help me

@richardhenry
Copy link
Author

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.

Copy link
Owner

@sushichop sushichop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@richardhenry

Thank you for your pull request and sorry for the late response.
I expect Puppy to work equally well on the Apple Platform, Linux (at least Ubuntu) and Windows out of the box. This is very important for Puppy.
Therefore, it would be good if you made that there are no compilation errors on each OS at least.

@aehlke
Copy link

aehlke commented Mar 13, 2024

@richardhenry it can be wrapped in eg #if os(iOS) || os(macOS) || [...]

@richardhenry
Copy link
Author

@sushichop Thanks, should be fixed — can you trigger another test run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants