-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.ts
52 lines (43 loc) · 1.04 KB
/
test.ts
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
// package main
// import "github.com/quan-to/slog"
import {default as qlog, QLog} from "./src/index";
import LogOperation from './src/LogOperation';
let log = qlog
.scope("MAIN")
.addFields({
hue: "br",
a: 1,
stack: "trace",
});
log.info('a', 'b', 'c');
log.info("Estou no main");
escopo2(log, "doing huebr");
escopo3(log, "doing huebr");
log.debug("HUEBR");
log.io('ABCDE DISK');
log.io('ABCDE DISK1');
log.io('ABCDE DISK2');
log.io('ABCDE DISK3');
log.io('ABCDE DISK4');
function escopo2(log: QLog, argumento0: string) {
log = log
.tag('REQUEST1234')
.subScope("Escopo2")
.addFields({
"argumento0": argumento0,
"abc": {
"t": 1234,
},
});
log.info("OLOQUINHO MEU");
log.await("Indo para escopo 3");
escopo3(log, "do escopo 2");
log.done("Escopo 3 chamado");
}
function escopo3(log: QLog, argumento2: string) {
log = qlog.subScope("Escopo3").addFields({
"argumento2": argumento2,
});
log.warn("OLOQUINHO MEU DO ESCOPO 3\nHUEBR\nBRBRBRBR");
log.error('ERROR MESSAGE');
}