mylog
v0.1.0
Published
My preferred way of logging, with caller info, colors and other stuff.
Readme
Log
Module for logging.
Features:
- provides caller info (which function has called log method)
- color console output
- logs uncaught exceptions (with
alertlevel) - uses system bus (if provided)
API
Notice: if argument (except error) is object, it will be JSON.stringifyed, otherwise, toStringed.
alert([arg, arg2, arg3, ...,] [error])
Logs arg and error details (if any) with level alert (highest level) to stderr.
Additionally raises event system:alert using system bus (if provided).
error([arg, arg2, arg3, ...,] [error])
Logs arg and error details (if any) with level error to stderr.
info([arg, arg2, arg3, ...,])
Logs arg with level info to stdout.
debug([arg, arg2, arg3, ...,])
Logs arg with level debug to stdout.
License
BSD
