Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yadsil

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yadsil

Yet Another Dead-SImple Log on stderr for CLI tools.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
118
increased by131.37%
Maintainers
1
Weekly downloads
 
Created
Source

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 = require('yadsil')('my-tool-name');
// Enable verbose: just display `info` and `debug` messages.
log.verbose(true);
// Force colors (just needed when not in a TTY).
log.color(true);
// Exit after the message.
log.fatal(1, 'exit with %s', 'one');
// Basic messages.
log.error('foo');
log.warning('bar')
log.notice('baz');
log.info('dru');
log.debug('waf');

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.

Keywords

FAQs

Package last updated on 19 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc