logtrail
v0.1.0
Published
superheroic node.js logging module
Downloads
9
Maintainers
Readme
Logtrail
Logtrail is an ambitious general-purpose logging module for Node.js. The current objectives for logtrail include:
- Custom Log Types: Add your own log type - or don't - the default ones work pretty well for most scenarios.
- Colors and Timestamps: Fancy log entries - or not - it can be disabled.
- Loglevels and Thresholding: Depending on the environment, certain log types might not need to be printed.
- Writing Logs to Files: A must have feature for any logger!
- Custom Callbacks: Send logs to Papertrail or any other TCP destination.
- Default Logger: Hijack the native
console.log
,console.err
andconsole.warn
TODO (Transitional)
- add capability: write to files (strip colors)
- add capability: set loglevel without reconfiguring
- add capability: extend log types
- write test: logtrail core
Usage
var logtrail = require('logtrail');
logtrail.configure({
timestamp: true,
stacktrace: true,
loglevel: 'info'
});
// loglevels:
// fatal
// error
// warn
// info
// trace