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

rotating logs #1

Closed
RMHogervorst opened this issue Feb 28, 2018 · 4 comments
Closed

rotating logs #1

RMHogervorst opened this issue Feb 28, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@RMHogervorst
Copy link

RMHogervorst commented Feb 28, 2018

Hi Ryan,

Is there a way to set rotating logs?
Loggit appends now, but wouldn't it be nice if you could rotate the logs?

@ryapric ryapric added the enhancement New feature or request label Feb 28, 2018
@ryapric
Copy link
Owner

ryapric commented Feb 28, 2018

Sure, I can see use for that, especially if a lot of logs are being written out.

Maybe a rotator function that notifies that logs are "stale", based on a user-defined period, and an argument to write old logs somewhere else or delete them? Even call it logrotate(), for the sake of *nix consistency.

@ryapric
Copy link
Owner

ryapric commented Feb 28, 2018

In the meantime, you can use the latest dev version's get_logs(), and filter/write them out. Cumbersome, but will be addressed when the above is introduced.

@ryapric ryapric self-assigned this Feb 28, 2018
@ryapric ryapric added this to the v2 milestone Mar 15, 2020
@ryapric
Copy link
Owner

ryapric commented Mar 29, 2020

rotate_logs() will now handle this in v2.0.0. It will technically be a performance risk, as well as being manually-invoked (to alleviate those performance issues), but better automation of that might come in a later minor-version bump.

@ryapric
Copy link
Owner

ryapric commented May 4, 2020

This is now done, tested, and documented. Onus of rotation logic will be on the developer to trigger in their own code, to keep loggit as unobtrusive as possible.

@ryapric ryapric closed this as completed May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants