0.1.0 • Published 10 years ago

mylog v0.1.0

Weekly downloads
1
License
BSD
Repository
github
Last release
10 years ago

Log

Module for logging.

Features:

  • provides caller info (which function has called log method)
  • color console output
  • logs uncaught exceptions (with alert level)
  • 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