Skip to content

When you just want to throw some logging into the CLI

License

Notifications You must be signed in to change notification settings

mathiasrw/throwlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThrowLog

When you just want to throw some logging into the CLI


Install with yarn or npm

yarn add throwlog

npm -i throwlog

Normal usage:

import {dump, info, success, warn, error, kill} from 'throwlog';
  • info, success, warn, error will print a string in a colorfull box to stdout

  • dump will take any data structure and print it nicely to stderr

  • kill will halt the program after dumping first parameter and error'ing the second parameter (if any). Both to stderr


Examples

let email = process.env.EMAIL || kill('Please set EMAIL')
info('About to fix things')
let data = fixThings()
success('Things fixed')
dump(data)

About

When you just want to throw some logging into the CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published