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

Feature request: Rollover at midnight #73

Open
josmithua opened this issue May 29, 2024 · 1 comment
Open

Feature request: Rollover at midnight #73

josmithua opened this issue May 29, 2024 · 1 comment

Comments

@josmithua
Copy link

Instead of rolling the log files 24hrs after they are created, I was wondering if we could have the option to cause rollover to happen at midnight. This would make it slightly easier to see when an event occurred in the log, i.e. if a client says "It happened on May 28", then I know I only have to look in one log file, instead of potentially 2 files.

I'm not sure if this is an option available to the underlying Android/iOS libraries, so not sure how much effort it would be.

The Python logging package has this feature: https://docs.python.org/3/library/logging.handlers.html#timedrotatingfilehandler

Cheers

@fdrault
Copy link
Member

fdrault commented May 29, 2024

You right! It is a bit annoying
Sadly, CocoaLumberjack comes only with elapsed time windows by default.
So, it is probably possible to achieved this by subclassing DDFileLogger and adding the custom rolling policy, but as you said, it needs a bit of works.
On Android, it seems easier though

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

No branches or pull requests

2 participants