-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.js
More file actions
70 lines (55 loc) · 1.66 KB
/
dev.js
File metadata and controls
70 lines (55 loc) · 1.66 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { beginLogging, configureLogger } from './src/logger.js';
configureLogger({
logToConsole: {
enabled: true,
type: 'gcp',
},
logToFiles: true,
lokiConfig: {
sendLogs: true,
host: process.env.LOKI_HOST,
username: process.env.LOKI_USERNAME,
apiKey: process.env.LOKI_API_KEY,
logCacheLimit: 1,
},
logLevel: 'silly',
service: 'lumberjack-dev-test',
});
configureLogger({
logToConsole: {
enabled: true,
type: 'pretty',
},
logToFiles: false,
lokiConfig: {
sendLogs: false,
host: process.env.LOKI_HOST,
username: process.env.LOKI_USERNAME,
apiKey: process.env.LOKI_API_KEY,
logCacheLimit: 10,
},
logLevel: 'silly',
service: 'lumberjack-dev-test',
});
const logger = beginLogging({
name: 'dev.js',
});
const bigObject = {
key: {
subKey: 'yeet',
next: {
subSubKey: 'woot',
},
},
};
logger.error('error! %o', bigObject);
logger.error({ bigObject });
logger.error('yeet', new Error('sheesh'));
logger.warn({ warn: 'warning!', x: bigObject });
logger.info('Pose purrfectly to show my beauty plan your travel or check cat door for ambush 10 times before coming in. Going to catch the red dot today going to catch the red dot today stare at ceiling, sleep on dog bed, force dog to sleep on floor, or lick butt. Scoot butt on the rug eat fish on floor. Licks paws dont wait for the storm to pass, dance in the rain for kitty kitty pussy cat doll. Scratch the box have my breakfast spaghetti yarn.');
logger.http('http! %o', { booty: 'this is a server message!' });
logger.verbose('verbose!');
logger.debug('debug!');
logger.silly('silly!');
logger.silly('silly!');
logger.silly('silly!');