-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.js
More file actions
28 lines (20 loc) · 746 Bytes
/
test.js
File metadata and controls
28 lines (20 loc) · 746 Bytes
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
var log = require('./index.js');
log.setLevel('debug');
log.debug('a debug message');
log.info('an info message');
log.warn('a warning message');
log.error('an error message');
log.info('array:', [null, 1, 'string', true]);
log.info('buffer:', new Buffer([32, 32]));
log.info('object:', {"key": "val"});
log('another info message');
log.log('another info message');
log.debug("printf-like replacement counter %d <-- yeah!", 99);
log.debug("printf-like replacement counter <-- yeah!", 99);
log.debug("as if there was never a difference to console.log");
log.setColor(false);
log.info('no colors!');
log.setSeverity(false);
log.info('no colors, no severity!');
log.setTimestamp(false);
log.info('no colors, no severity, no timestamp!');