filename-logger
v0.1.1
Published
[debug](https://github.com/visionmedia/debug) wrapper. logging by filename.
Downloads
16
Readme
filename-logger
debug wrapper. logging by filename.
dynalee:operator/operator.js get undefined +0ms
dynalee:model/model.js { id: 'hello2', detail: 'world' } +0ms
dynalee:model/model.js Error: Item not found, hash(hello2, range(world)
Install
npm i filename-logger
Usage
import createLogger from 'filename-logger'
const PROJECT_NAME = 'project'
const log = createLogger(PROJECT_NAME, __filename)
log('something')
or
const PROJECT_NAME = 'project'
const createProjectLogger = createLogger(PROJECT_NAME)
const log = createProjectLogger(__filename)
log('something')
License
MIT