Yadsil
Yet another dead-simple log, on stderr, for CLI tools. Only when on a TTY,
enable colors. Only when not on a TTY, prefix each output with the CLI tool
name. Possibility to reactivate colors when not on a TTY (it's up to
you to provide a --color
option or something). That's all.
Install
$ npm install yadsil --save
Usage
log = 'my-tool-name';// Enable verbose: just display `info` and `debug` messages.log;// Force colors (just needed when not in a TTY).logcolortrue;// Exit after the message.log;// Basic messages.log;loglog;log;log;
That's all.
Limitations
No log levels, no fancy features, not timestamps. Just the bare minimum on top of stderr, and will stay that way.
Contribute
Feel free to fork and submit pull requests.