chore: Centralize clientside logging

This commit is contained in:
Tom Moor
2022-04-25 23:31:30 -07:00
parent 38409ff4ec
commit 11477a1185
10 changed files with 128 additions and 22 deletions

View File

@@ -17,6 +17,7 @@ import Toasts from "~/components/Toasts";
import env from "~/env";
import Routes from "./routes";
import history from "./utils/history";
import Logger from "./utils/logger";
import { initSentry } from "./utils/sentry";
initI18n();
@@ -40,10 +41,14 @@ if ("serviceWorker" in window.navigator) {
if (maybePromise?.then) {
maybePromise
.then((registration) => {
console.log("SW registered: ", registration);
Logger.debug("lifecycle", "SW registered: ", registration);
})
.catch((registrationError) => {
console.log("SW registration failed: ", registrationError);
Logger.debug(
"lifecycle",
"SW registration failed: ",
registrationError
);
});
}
});