-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
54 lines (46 loc) · 1.13 KB
/
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
47
48
49
50
51
52
53
54
var Log = require('./log'),
log = Log.createLogger('TEST');
log.debug('from config debug\n');
log.info('from config');
log.warn('from config warn ' + 88)
log.error('\t from config error');
log.fatal(999);
log.setLevel(Log.STDOUT);
log.debug('to stdout\n');
log.info('to stdout');
log.warn('to stdout warn ' + 88)
log.error('\t to stdout error');
log.fatal(999);
log.setLevel(Log.DEBUG);
log.debug('debug \n');
log.info('hi');
log.warn('warn ' + 88)
log.error('\t got error');
log.fatal(999);
log.setLevel(Log.INFO);
log.debug('BUG ALERT!');
log.info('hi');
log.warn('warn ' + 88)
log.error('\t got error');
log.fatal(999);
log.setLevel(Log.WARN);
log.debug('BUG ALERT!');
log.info('BUG ALERT!');
log.warn('warn ' + 88)
log.error('\t got error');
log.fatal(999);
log.setLevel(Log.ERROR);
log.debug('BUG ALERT!');
log.info('BUG ALERT!');
log.warn('BUG ALERT!')
log.error('\t got error');
log.fatal(999);
log.setLevel(Log.FATAL);
log.debug('BUG ALERT!');
log.info('BUG ALERT!');
log.warn('BUG ALERT!');
log.error('BUG ALERT!');
log.fatal(999);
log.setFile('default.log');
log.setLevel(Log.INFO);
log.info('this creates new file in current directory');