@@ -28,45 +28,45 @@ export class Logger {
28
28
* @param options Logger options
29
29
*/
30
30
constructor ( options ?: LoggerOptions ) {
31
- if ( options !== undefined && options . logLevel !== undefined ) {
32
- this . logLevel = options . logLevel ;
31
+ if ( options !== undefined && options . level !== undefined ) {
32
+ this . logLevel = options . level ;
33
33
} else {
34
- this . logLevel = LogLevel . info ;
34
+ this . logLevel = LogLevel . Info ;
35
35
}
36
36
37
- if ( options !== undefined && options . logService !== undefined ) {
38
- this . logService = options . logService ;
37
+ if ( options !== undefined && options . service !== undefined ) {
38
+ this . logService = options . service ;
39
39
} else {
40
40
this . logService = new ConsoleLoggerService ( ) ;
41
41
}
42
42
}
43
43
44
44
error ( component : string , area : string , message : any , ...optionalParams : any [ ] ) : void {
45
- if ( this . logLevel >= LogLevel . error ) {
45
+ if ( this . logLevel >= LogLevel . Error ) {
46
46
this . logService . error ( `[${ component } , ${ area } ] ${ message } ` , ...optionalParams ) ;
47
47
}
48
48
}
49
49
50
50
warn ( component : string , area : string , message : any , ...optionalParams : any [ ] ) : void {
51
- if ( this . logLevel >= LogLevel . warn ) {
51
+ if ( this . logLevel >= LogLevel . Warn ) {
52
52
this . logService . warn ( `[${ component } , ${ area } ] ${ message } ` , ...optionalParams ) ;
53
53
}
54
54
}
55
55
56
56
info ( component : string , area : string , message : any , ...optionalParams : any [ ] ) : void {
57
- if ( this . logLevel >= LogLevel . info ) {
57
+ if ( this . logLevel >= LogLevel . Info ) {
58
58
this . logService . info ( `[${ component } , ${ area } ] ${ message } ` , ...optionalParams ) ;
59
59
}
60
60
}
61
61
62
62
verbose ( component : string , area : string , message : any , ...optionalParams : any [ ] ) : void {
63
- if ( this . logLevel >= LogLevel . verbose ) {
63
+ if ( this . logLevel >= LogLevel . Verbose ) {
64
64
this . logService . verbose ( `[${ component } , ${ area } ] ${ message } ` , ...optionalParams ) ;
65
65
}
66
66
}
67
67
68
68
debug ( component : string , area : string , message : any , ...optionalParams : any [ ] ) : void {
69
- if ( this . logLevel >= LogLevel . debug ) {
69
+ if ( this . logLevel >= LogLevel . Debug ) {
70
70
this . logService . debug ( `[${ component } , ${ area } ]: ${ message } ` , ...optionalParams ) ;
71
71
}
72
72
}
0 commit comments