Fixing debug logging
This commit is contained in:
13
dist/scorm-again.js
vendored
13
dist/scorm-again.js
vendored
File diff suppressed because one or more lines are too long
2
dist/scorm-again.js.map
vendored
2
dist/scorm-again.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/scorm-again.min.js
vendored
2
dist/scorm-again.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user