diff --git a/src/common/log.js b/src/common/log.js index 1fc26eb..0454caf 100644 --- a/src/common/log.js +++ b/src/common/log.js @@ -1,7 +1,11 @@ import log from "loglevel"; import { getSettings } from "src/settings/settings"; +let isInited = false; export const overWriteLogLevel = () => { + if (isInited) return; + isInited = true; + const originalFactory = log.methodFactory; log.methodFactory = (methodName, logLevel, loggerName) => { const rawMethod = originalFactory(methodName, logLevel, loggerName);