You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trentm can you please confirm this is a bug and not bad-usage? Are there any practical workarounds to my use case so I can get unblocked by this? (provide logs from my library).
As I mentioned in another issue you opened, the intended way to structure libraries is to allow them to take a Bunyan logger instance (created by whatever application or script is using the library), and log on that. This gives the application responsibility (and control) for setting the output streams for logging.
I'm using Bunyan for the purposes of an npm library. I have set it up so as to provide child-loggers for each module, and then expose the root logger.
When a stream is attached to the root logger using
addStream()
it will not receive any messages logged by the child loggers.You can reproduce with the following snippet:
The text was updated successfully, but these errors were encountered: