From 9279ced68660610764931da681f22c8b71bf1b6e Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 14 Feb 2021 17:52:01 -0500 Subject: 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 --- ext/js/pages/info-main.js | 2 +- ext/js/pages/permissions-main.js | 2 +- ext/js/pages/welcome-main.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/js/pages') diff --git a/ext/js/pages/info-main.js b/ext/js/pages/info-main.js index 45c28d25..ca7d792e 100644 --- a/ext/js/pages/info-main.js +++ b/ext/js/pages/info-main.js @@ -120,6 +120,6 @@ function getOperatingSystemDisplayName(os) { document.documentElement.dataset.loaded = 'true'; } catch (e) { - yomichan.logError(e); + log.error(e); } })(); diff --git a/ext/js/pages/permissions-main.js b/ext/js/pages/permissions-main.js index 0cb37e93..782ea9ec 100644 --- a/ext/js/pages/permissions-main.js +++ b/ext/js/pages/permissions-main.js @@ -96,6 +96,6 @@ function setupPermissionsToggles() { document.documentElement.dataset.loaded = 'true'; } catch (e) { - yomichan.logError(e); + log.error(e); } })(); diff --git a/ext/js/pages/welcome-main.js b/ext/js/pages/welcome-main.js index 5a6bb2a5..27d0af6a 100644 --- a/ext/js/pages/welcome-main.js +++ b/ext/js/pages/welcome-main.js @@ -81,6 +81,6 @@ async function setupGenericSettingsController(genericSettingController) { const settingsDisplayController = new SettingsDisplayController(settingsController, modalController); settingsDisplayController.prepare(); } catch (e) { - yomichan.logError(e); + log.error(e); } })(); -- cgit v1.2.3