fary-log
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

fary-log

A simple logger for nodejs.

NPM version build status

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.

Readme

Keywords

none

Package Sidebar

Install

npm i fary-log

Weekly Downloads

14

Version

1.2.0

License

MIT

Unpacked Size

6.58 kB

Total Files

11

Last publish

Collaborators

  • baby31529