Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Allow a logger instance to be injected via the configuration #104

Merged
merged 1 commit into from
May 10, 2018

Conversation

schleyfox
Copy link
Contributor

Currently, config can specify the options to be passed to the
constructed winston logger, but the specific transport is hard coded as
Console. Some applications may wish to use other transports like Syslog
that are defined in other packages.

This change adds a config field, loggerInstance, that allows an
arbitrarily constructed logger to be passed in. Really any object that
implements log should work, but this is intended for other winston
loggers.

/cc @goatslacker

@schleyfox
Copy link
Contributor Author

@goatslacker PTAL

@goatslacker
Copy link
Collaborator

Can you please rebase?

Currently, config can specify the options to be passed to the
constructed winston logger, but the specific transport is hard coded as
Console.  Some applications may wish to use other transports like Syslog
that are defined in other packages.

This change adds a config field, `loggerInstance`, that allows an
arbitrarily constructed logger to be passed in.  Really any object that
implements `log` should work, but this is intended for other winston
loggers.
@schleyfox schleyfox force-pushed the allow-logger-to-be-fully-injected branch from 8195b98 to 61611de Compare May 10, 2018 18:07
@schleyfox schleyfox merged commit 3a4f9a5 into master May 10, 2018
@schleyfox schleyfox deleted the allow-logger-to-be-fully-injected branch May 10, 2018 18:12
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants