added example for testing
parent
7d2be397cd
commit
78e6df7db5
|
@ -0,0 +1,19 @@
|
|||
import logger from '../src/logger'
|
||||
let log = {}
|
||||
|
||||
class LOGTEST {
|
||||
constructor(opts) {
|
||||
log = logger({
|
||||
name: 'test',
|
||||
id: opts.id,
|
||||
file: 'example/example.js',
|
||||
class: 'LOGTEST'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let test = new LOGTEST({id:'process-test1'})
|
||||
|
||||
log.info({test:'filter', msg:'this is a logged message'})
|
||||
log.fatal('this is a fatal logged message')
|
Loading…
Reference in New Issue