Handy and strongly opinionated logging helper. It conveniently writes your logs in your shell and graylog facility as well as reporting errors to newrelic.
Options parameters:
-
level: max winston reporting level
-
graylog: config for graylog server, please check here for more infos
-
env: the current environment. It will be used by the newrelic transport as explained here
Install this library via NPM:
npm install node-nmlogger
var logger = require('node-nmlogger')();
// or
var logger = require('node-nmlogger')({ /* options */ });
We suggest to use nmconfig for your config needs with this module.
If you need it on the client side we highly recommend browserify.
This library is a little convenience wrapper on top of extensively tested projects,
so for once we can be a little bit lazy and skip them ;)
We do like tests tho, so if you feel giving us a hand we'll be more than happy
to see some PR love on this side :D