-
Notifications
You must be signed in to change notification settings - Fork 5
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
level doesn't seem to be have a effect #7
Comments
Hmm, at a guess the winston instance in the thread is pre-filtering the levels (I take it you're calling the bind methods as in the example?). If you check out the bindTransport function here winston-cluster.js#L86 you'll notice that options is passed in to the child bind function but not used. I have committed a branch which passes those options through, then you'll probably have to pass your log level to the Cheers, Ryan |
Im not sure if bindTransport is what im looking for: The master-process defines all options. The childs should work by using If i pass an option to bindTransport() i would have to require my logger.js again just to get the level and send it to the master which already has the level. Same for (logger.js):
Working fine, except for level (only shows up to level info for child processes, not debug or silly) |
Tested it out and that was it. Have updated the library to fix the problem (with a slight change to the API to take winston instances where useful) and the updated example in the readme as to how to use it. You do need to bind the Let me know if that solves your problem? |
Doesn't this make it more circular? Before, within child process, we just had to do:
And everything was working fine as logger options were defined in the master. Only level was not adopted by child processes. |
I set the level to
debug
which works in master. But in worker it only shows error, warn and info but not debug. Colorized, timestamp, write to file etc. is working.main.js:
worker.js:
logger.js:
The text was updated successfully, but these errors were encountered: