Skip to content

ChALkeR/whiner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A logger that tries to do the correct thing

Resources

License

Stars

Watchers

Forks

Packages

No packages published