-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
47 lines (40 loc) · 784 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
var logrus = require('./')
var bole = require('bole')
var b1 = logrus()
b1.pipe(process.stdout)
var logs = [
bole('first'),
bole('second'),
bole('third'),
bole('fourth'),
bole('fifth'),
bole('sixth'),
bole('seventh')
]
bole.output({
level: 'debug',
stream: b1
})
logs.forEach(function(log) {
log.info('hello world')
})
logs.forEach(function(log) {
log.error('hello world')
})
logs.forEach(function(log) {
log.warn('hello world')
})
logs.forEach(function(log) {
log.debug('hello world')
log.debug({hello: 'world', message: 'foobar'})
})
logs[0].debug(new Error('hello world'))
var b2 = logrus({ time: true })
bole.output({
level: 'debug',
stream: b2
})
//b2.pipe(process.stdout)
logs.forEach(function(log) {
log.info('the world is on time')
})