@calipsa/logger
v0.3.5
Published
JavaScript logger
Downloads
15
Readme
@calipsa/logger
Installation
# using npm:
npm install --save @calipsa/logger
# or if you like yarn:
yarn add @calipsa/logger
Usage
Works pretty much like bunyan
.
import createLogger from '@calipsa/logger'
const logger = createLogger({
name: 'foobar',
minLevel: 'info',
// serializers: { },
// transform: (o) => o,
})
logger.info('foo')
logger.warn('warning')
logger.error(new Error('some error'))
const child = logger.child({
extraProp: '234',
})
child.info('with extra prop')
// ...