@@ -13,7 +13,7 @@ type LoggerOptions = {
13
13
14
14
initSetUp ( ) ;
15
15
16
- const logDir = `${ app . getPath ( "userData" ) } /Logs` ;
16
+ const logDirectory = `${ app . getPath ( "userData" ) } /Logs` ;
17
17
18
18
type Level = "log" | "debug" | "info" | "warn" | "error" ;
19
19
@@ -23,7 +23,7 @@ export default class Logger {
23
23
constructor ( options : LoggerOptions = { } ) {
24
24
let { file = "console.log" } = options ;
25
25
26
- file = `${ logDir } /${ file } ` ;
26
+ file = `${ logDirectory } /${ file } ` ;
27
27
28
28
// Trim log according to type of process
29
29
if ( process . type === "renderer" ) {
@@ -38,31 +38,31 @@ export default class Logger {
38
38
this . nodeConsole = nodeConsole ;
39
39
}
40
40
41
- _log ( type : Level , ...args : unknown [ ] ) : void {
42
- args . unshift ( this . getTimestamp ( ) + " |\t" ) ;
43
- args . unshift ( type . toUpperCase ( ) + " |" ) ;
44
- this . nodeConsole [ type ] ( ...args ) ;
45
- console [ type ] ( ...args ) ;
41
+ _log ( type : Level , ...arguments_ : unknown [ ] ) : void {
42
+ arguments_ . unshift ( this . getTimestamp ( ) + " |\t" ) ;
43
+ arguments_ . unshift ( type . toUpperCase ( ) + " |" ) ;
44
+ this . nodeConsole [ type ] ( ...arguments_ ) ;
45
+ console [ type ] ( ...arguments_ ) ;
46
46
}
47
47
48
- log ( ...args : unknown [ ] ) : void {
49
- this . _log ( "log" , ...args ) ;
48
+ log ( ...arguments_ : unknown [ ] ) : void {
49
+ this . _log ( "log" , ...arguments_ ) ;
50
50
}
51
51
52
- debug ( ...args : unknown [ ] ) : void {
53
- this . _log ( "debug" , ...args ) ;
52
+ debug ( ...arguments_ : unknown [ ] ) : void {
53
+ this . _log ( "debug" , ...arguments_ ) ;
54
54
}
55
55
56
- info ( ...args : unknown [ ] ) : void {
57
- this . _log ( "info" , ...args ) ;
56
+ info ( ...arguments_ : unknown [ ] ) : void {
57
+ this . _log ( "info" , ...arguments_ ) ;
58
58
}
59
59
60
- warn ( ...args : unknown [ ] ) : void {
61
- this . _log ( "warn" , ...args ) ;
60
+ warn ( ...arguments_ : unknown [ ] ) : void {
61
+ this . _log ( "warn" , ...arguments_ ) ;
62
62
}
63
63
64
- error ( ...args : unknown [ ] ) : void {
65
- this . _log ( "error" , ...args ) ;
64
+ error ( ...arguments_ : unknown [ ] ) : void {
65
+ this . _log ( "error" , ...arguments_ ) ;
66
66
}
67
67
68
68
getTimestamp ( ) : string {
0 commit comments