mylog

0.1.0 • Public • Published

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, ...,] [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

Readme

Keywords

Package Sidebar

Install

npm i mylog

Weekly Downloads

0

Version

0.1.0

License

BSD

Last publish

Collaborators

  • titarenko