-
Notifications
You must be signed in to change notification settings - Fork 118
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
Daily log file won't save if next function is process.exit #114
Comments
This is surely because the process gets killed before the log file is written. I don't know if what you're trying to is possible by using |
Alright, I get what you are trying to achieve. What you want is a callback that could be invoked after the log file has been written, e.g. in case of uncaught exception, you want it logged and the process killed afterwards. I don't see any way to do this at the moment. I tried to set a custom This is what I came up with:
I think it will be good if we could set a callback to the |
Hi @SufianBabri, Currently I have made a quick workaround, by just calling exit after 100ms timeout. It gives time for log to finish writing. I think that adding option to LogOutput to force writing in sync mode would resolve it. |
I am returning with this :) How about allowing us to specicying callback parameter to "write" method? |
Basic example would be as follows. In this case - nothing get saved if using:
The text was updated successfully, but these errors were encountered: