0.1.0 • Published 11 years ago
mylog v0.1.0
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, ...,)
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, ...,)
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
0.1.0
11 years ago