Skip to content

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).

@codecov
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?

@sushichop
Copy link
Owner

@richardhenry
I am very sorry for the late reply.
I was away for a too long time.
Since it seems to need to update CI environment and Puppy itself, I will do it this month first.
Thank you for your understanding.

@sushichop
Copy link
Owner

@richardhenry

Since it seems to need to update CI environment and Puppy itself, I will do it this month first.

As the first step, I have released Puppy 0.8.0 after fixing several issues.
I confirmed it works with Swift 6.1 and apple/swift-log 1.6.3.
https://github.com/sushichop/Puppy/releases/tag/0.8.0

It might need more improvement, but just let you know the latest status.

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