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

@@ -1,6 +1,7 @@
import * as React from "react";
import { Primitive } from "utility-types";
import Storage from "~/utils/Storage";
import Logger from "~/utils/logger";
import useEventListener from "./useEventListener";
/**
@@ -32,7 +33,7 @@ export default function usePersistedState(
Storage.set(key, valueToStore);
} catch (error) {
// A more advanced implementation would handle the error case
console.log(error);
Logger.debug("misc", "Failed to persist state", { error });
}
};