Fixing debug logging

This commit is contained in:
Jonathan Putney
2019-11-19 15:06:46 -05:00
parent 74ac0d4c8c
commit 4abe1f3420
4 changed files with 23 additions and 6 deletions
+11 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -351,6 +351,13 @@ export default class BaseAPI {
case global_constants.LOG_LEVEL_INFO: case global_constants.LOG_LEVEL_INFO:
console.info(logMessage); console.info(logMessage);
break; break;
case global_constants.LOG_LEVEL_DEBUG:
if (console.debug) {
console.debug(logMessage);
} else {
console.log(logMessage);
}
break;
} }
} }
} }
@@ -909,7 +916,8 @@ export default class BaseAPI {
if (this.#timeout) { if (this.#timeout) {
this.#timeout.cancel(); this.#timeout.cancel();
this.#timeout = null; this.#timeout = null;
this.apiLog('clearScheduledCommit', null, null, global_constants.LOG_LEVEL_DEBUG); this.apiLog('clearScheduledCommit', null, null,
global_constants.LOG_LEVEL_DEBUG);
} }
} }
} }
@@ -919,7 +927,7 @@ export default class BaseAPI {
*/ */
class ScheduledCommit { class ScheduledCommit {
#API; #API;
#cancelled: false; #cancelled = false;
#timeout; #timeout;
/** /**