Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

feat(logger): use single instance of bunyan logger (fix rolling files) #353

Closed
wants to merge 1 commit into from

Conversation

camfou
Copy link
Contributor

@camfou camfou commented Oct 17, 2016

Hello !
We need to retrieve the bunyan instance in our hooks and protocols.
But, if we create another bunyan logger with the same config with rolling file option we may run into issues (trying to close the logfile during another logger writing)
This PR transforms the logger in singleton.

Regards,
Camille

@coveralls
Copy link

Coverage Status

Coverage remained the same at 79.75% when pulling 5afda8e on camfou:single_logger_instance into 46b118c on anvilresearch:master.

@camfou
Copy link
Contributor Author

camfou commented Oct 19, 2016

Bad idea, the returned instance is not a bunyan logger but an express-bunyan-logger which is a middleware instance...

@camfou camfou closed this Oct 19, 2016
@camfou camfou deleted the single_logger_instance branch October 19, 2016 12:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants