small changes
This commit is contained in:
parent
ce0e6a1333
commit
cd52e15ce5
1 changed files with 4 additions and 4 deletions
|
@ -12,8 +12,8 @@ class Logger {
|
||||||
* onHistoryFull: () => void,
|
* onHistoryFull: () => void,
|
||||||
* argsPlaceholder: string,
|
* argsPlaceholder: string,
|
||||||
* dict: {[key: string]: string}
|
* dict: {[key: string]: string}
|
||||||
* logFrom: string
|
* logFrom: 'debug' | 'info' | 'warn' | 'error' | 'fatal'
|
||||||
* logFrom2: string
|
* logFrom2: 'debug' | 'info' | 'warn' | 'error' | 'fatal'
|
||||||
* }} options
|
* }} options
|
||||||
*/
|
*/
|
||||||
constructor(options = {})
|
constructor(options = {})
|
||||||
|
@ -38,8 +38,8 @@ class Logger {
|
||||||
this.alog("warn;", "History is full, dropping 25 oldest entries.");
|
this.alog("warn;", "History is full, dropping 25 oldest entries.");
|
||||||
this.history = this.history.slice(25);
|
this.history = this.history.slice(25);
|
||||||
};
|
};
|
||||||
this.logFrom = options.logFrom || "D"; // when to stop logging to output
|
this.logFrom = options.logFrom ? options.logFrom.charAt(0).toUpperCase() : "D"; // when to stop logging to output
|
||||||
this.logFrom2 = options.logFrom2 || "D"; // when to stop logging to output2
|
this.logFrom2 = options.logFrom2 ? options.logFrom2.charAt(0).toUpperCase() : "D"; // when to stop logging to output2
|
||||||
// Order from least important to most: D, I, W, E, F
|
// Order from least important to most: D, I, W, E, F
|
||||||
this.logImportance = {
|
this.logImportance = {
|
||||||
D: 0, I: 1, W: 2, E: 3, F: 4
|
D: 0, I: 1, W: 2, E: 3, F: 4
|
||||||
|
|
Reference in a new issue