Skip to content

zkochan/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@zkochan/logger

A simple logger

npm version Build Status

Installation

npm i -S @zkochan/logger

Usage

const logger = require('@zkochan/logger')

logger.on('info', console.log.bind(console))

logger.log('info', 'some-type', 'Helo World!')
//> null 'info' 'some-type' 'Helo World!'

const forkedLogger = logger.fork({ foo: 'bar' })

forkedLogger.log('info', 'some-type', 'Helo World!', 1, 2, 3)
//> { foo: 'bar' } 'info' 'some-type' 'Helo World!' 1 2 3

License

MIT © Zoltan Kochan