summaryrefslogtreecommitdiff
path: root/ext/js/comm/cross-frame-api.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-14 17:52:01 -0500
committerGitHub <noreply@github.com>2021-02-14 17:52:01 -0500
commit9279ced68660610764931da681f22c8b71bf1b6e (patch)
tree2a4d015cf57adfe74af72615bad19c9308388e99 /ext/js/comm/cross-frame-api.js
parent286534e648af350d24fbf3c7892a7ec81aaeb4bd (diff)
Log refactoring (#1393)
* Create Logger class and log instance * Replace yomichan.logWarning with log.warn * Replace yomichan.logError with log.error * Replace yomichan.log with log.log * Update the Yomichan class to use the global log object * Update lint rules
Diffstat (limited to 'ext/js/comm/cross-frame-api.js')
-rw-r--r--ext/js/comm/cross-frame-api.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/js/comm/cross-frame-api.js b/ext/js/comm/cross-frame-api.js
index 997249c8..7dbfb411 100644
--- a/ext/js/comm/cross-frame-api.js
+++ b/ext/js/comm/cross-frame-api.js
@@ -111,7 +111,7 @@ class CrossFrameAPIPort extends EventDispatcher {
_onAck(id) {
const invocation = this._activeInvocations.get(id);
if (typeof invocation === 'undefined') {
- yomichan.logWarning(new Error(`Request ${id} not found for acknowledgement`));
+ log.warn(new Error(`Request ${id} not found for acknowledgement`));
return;
}
@@ -140,7 +140,7 @@ class CrossFrameAPIPort extends EventDispatcher {
_onResult(id, data) {
const invocation = this._activeInvocations.get(id);
if (typeof invocation === 'undefined') {
- yomichan.logWarning(new Error(`Request ${id} not found`));
+ log.warn(new Error(`Request ${id} not found`));
return;
}
@@ -269,7 +269,7 @@ class CrossFrameAPI {
this._setupCommPort(otherTabId, otherFrameId, port);
} catch (e) {
port.disconnect();
- yomichan.logError(e);
+ log.error(e);
}
}