-
Notifications
You must be signed in to change notification settings - Fork 518
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
Close logger #73
Comments
I can't get this to work with a logger with 2 streams (process.stdout and rotating-file). Is there any reliable way to close or unref all bunyan streams? Need this to properly cleanup tests and make the test runner exit :( |
Seems rotating-file stream is the cause, if i just leave it to process.stdout, then my test process exits cleanly. |
Will fail if any timers or callbacks remain registered when instantiating a logger with a rotating file.
Should be fixed by the above PR. This will be in bunyan 0.23.1. |
Hrm, the |
To close all the loggers with a callback completion (similar to the commented one):
EDIT: this code only works when the file type is "rotation-file". If it's the normal file then
s.stream.end()
ands.stream.on("close")
should be used.Not tested with childs. Sorry for all the posted issues but this module needs to be revisited.
The text was updated successfully, but these errors were encountered: