update
This commit is contained in:
parent
d9becc67b6
commit
9308795b8b
964 changed files with 104265 additions and 16 deletions
35
node_modules/pino/example.js
generated
vendored
Normal file
35
node_modules/pino/example.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
'use strict'
|
||||
|
||||
const pino = require('./')()
|
||||
|
||||
pino.info('hello world')
|
||||
pino.error('this is at error level')
|
||||
pino.info('the answer is %d', 42)
|
||||
pino.info({ obj: 42 }, 'hello world')
|
||||
pino.info({ obj: 42, b: 2 }, 'hello world')
|
||||
pino.info({ nested: { obj: 42 } }, 'nested')
|
||||
setImmediate(() => {
|
||||
pino.info('after setImmediate')
|
||||
})
|
||||
pino.error(new Error('an error'))
|
||||
|
||||
const child = pino.child({ a: 'property' })
|
||||
child.info('hello child!')
|
||||
|
||||
const childsChild = child.child({ another: 'property' })
|
||||
childsChild.info('hello baby..')
|
||||
|
||||
pino.debug('this should be mute')
|
||||
|
||||
pino.level = 'trace'
|
||||
|
||||
pino.debug('this is a debug statement')
|
||||
|
||||
pino.child({ another: 'property' }).debug('this is a debug statement via child')
|
||||
pino.trace('this is a trace statement')
|
||||
|
||||
pino.debug('this is a "debug" statement with "')
|
||||
|
||||
pino.info(new Error('kaboom'))
|
||||
|
||||
pino.info(new Error('kaboom'), 'with', 'a', 'message')
|
||||
Loading…
Add table
Add a link
Reference in a new issue