-
Notifications
You must be signed in to change notification settings - Fork 69
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: exposing function to force rotate #92
Comments
Hi @ipetrovic11 I've just rewritten the module in Typescript making it more modular. What would be the expected behaviour? I can only see this working easily if size based rotation is used. Let me now if this Is what you had in mind and I'll add it to v1. |
Here is the use case: Let's say a batch of logs should be uploaded to the centralized location. It is unsafe to process a file that is currently. It would be great to have a function that will force the use of the next(incremented counter) so that all the logs that were previously created until that moment can be uploaded. I don't remember what kind of API there exists, but for this use case |
@ipetrovic11 I've made a change to force a log rotation. The parameter is a boolean that decides if to force the log rotation or not. Default is false. If called without true it will have the normal behaviour. rotatingLogStream.rotate(true) |
This is a feature request.
Currently, there is no easy way to force rotation.
The logic for the new rotation can be packed in one nice function and exposed so rotation can happen from the outside.
The text was updated successfully, but these errors were encountered: