File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ export interface DocumentCache<T> {
33
33
}
34
34
35
35
export enum LogLevel {
36
- DEBUG = 1 ,
36
+ TRACE = 1 ,
37
+ DEBUG ,
37
38
INFO ,
38
39
WARN ,
39
40
ERROR ,
Original file line number Diff line number Diff line change @@ -45,15 +45,18 @@ export function toggleLogs(level: LogLevel) {
45
45
logLevel = level ;
46
46
}
47
47
48
+ export function trace ( ...args : unknown [ ] ) {
49
+ if ( logLevel <= LogLevel . TRACE ) console . log . apply ( null , args ) ;
50
+ }
51
+ export function debug ( ...args : unknown [ ] ) {
52
+ if ( logLevel <= LogLevel . DEBUG ) console . debug . apply ( null , args ) ;
53
+ }
48
54
export function info ( ...args : unknown [ ] ) {
49
55
if ( logLevel <= LogLevel . INFO ) console . info . apply ( null , args ) ;
50
56
}
51
57
export function warn ( ...args : unknown [ ] ) {
52
58
if ( logLevel <= LogLevel . WARN ) console . warn . apply ( null , args ) ;
53
59
}
54
- export function debug ( ...args : unknown [ ] ) {
55
- if ( logLevel <= LogLevel . DEBUG ) console . debug . apply ( null , args ) ;
56
- }
57
60
export function error ( ...args : unknown [ ] ) {
58
61
if ( logLevel <= LogLevel . ERROR ) console . error . apply ( null , args ) ;
59
62
}
You can’t perform that action at this time.
0 commit comments