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

View File

@@ -351,6 +351,13 @@ export default class BaseAPI {
case global_constants.LOG_LEVEL_INFO:
console.info(logMessage);
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) {
this.#timeout.cancel();
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 {
#API;
#cancelled: false;
#cancelled = false;
#timeout;
/**