Closed wingleung closed 6 years ago
build failed on node 6 due to npm bug, see npm/npm#20553 for more info
npm bug is fixed, i've reran the errored builds.
I'm trying to do a similar thing with https://github.com/airbnb/hypernova/pull/104 .
The advantage to your approach is that it gets around duplication of dependencies between hypernova
and the application.
The advantage to the approach in my PR is that it passes full control over the logger instance to the application embedding hypernova. The logger passed in would not even need to be a winston instance as long as it implements a log
method. This comes at the cost of theoretical safety between different versions of winston.
I have a slight preference for injecting the dependency rather than passing through config, but I'm pretty indoctrinated by the Java side of the house.
EDIT: Also I know that other logging PR has been languishing, it's actually on my list to address this week.
completely agree, giving full control over a logger instance seems better than introducing a new config format to enable the limited core winston functionality. Makes it less dependent on winston as well.
Awesome! I'm merging https://github.com/airbnb/hypernova/pull/104 now and will cut a new release.
Thanks for contributing!
closing in favor of https://github.com/airbnb/hypernova/pull/104
Work in progress...
Warning This PR changes the logger config
example logger config to use in hypernova(config)