fary-log
v1.2.0
Published
Simple logger for nodejs
Downloads
9
Readme
fary-log
A simple logger for nodejs.
Install
npm i fary-log
Usage
const log = require('fary-log')
// import log = require('fary-log') // for ts
const logger = log('namespace')
logger.log('log message')
logger.info('some', 'thing')
logger.warn('print some object:', { a: 1, b: 2})
logger.error('Error messages.')
output:
[LOG] namespace - log message
[INFO] namespace - some thing
[WARN] namespace - print some object: { a: 1, b: 2 }
[ERROR] namespace - Error messages.
with colors in the terminal.