airbnb / hypernova

A service for server-side rendering your JavaScript views
MIT License
5.82k stars 207 forks source link

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

Closed schleyfox closed 6 years ago

schleyfox commented 6 years ago

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 commented 6 years ago

@goatslacker PTAL

goatslacker commented 6 years ago

Can you please rebase?