0.1.1 • Published 7 years ago

whiner v0.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

whiner

This is a small wrapper around bole and systemd-journald.

It logs everything to journald by default, but supports streaming JSON logs to other sources, using .output inherited from bole.

Usage

const log = require('whiner')(module);

log.error(error);
log.debug(message, fields);

or

const log = require('whiner')('label');

log.error(error);
log.debug(message, info);

Log levels

  • emergemerg in journald, error in bole,
  • alertalert in journald, error in bole,
  • critcrit in journald, error in bole,
  • errorerr in journald, error in bole,
  • warnwarning in journald, warn in bole,
  • noticenotice in journald, info in bole,
  • infoinfo in journald, info in bole,
  • debugdebug in journald, debug in bole.

Notice: emerg triggers a broadcast message with journald, use it wisely.

License

MIT.