book-loggly
loggly middleware for the book logging framework.
This middleware is shamelessly copy/modified from book-raven.
Install
npm install book book-loggly --save
Use
var log = ; var logglyClient = ; var bookLogglyOptions = // A custom book-loggly option to ignore logs at ignore_levels and above // 0: panic, 1: error, 2: warning, 3: info, 4: debug (default), 5: trace "ignore_levels": logTRACE // An (optional) arbitrary object to add to the log event to notify where its coming from "from": "instance-id": "123" ; log; // Now just log as usuallogloglog
Internals
book-loggly
uses the loggly JSON capability to log objects. The general form of these objects is:
uncaughtException
If there is an error sending the packet to loggly, an error will be thrown. To catch it, use uncaughtException
. You can do anything here, but perhaps you want to exit.
process
License
See LICENSE file.