wupengfei
2025-12-02 4b9db31fa558ca4991213553cc354eebf72121c4
packages/utils/LoggerRecord/index.ts
@@ -55,9 +55,10 @@
  }
}
export const httpLoggerRecord = new HttpLoggerRecord({
const Options: LoggerRecordOptions = {
  moduleName: getUtilsConfig().appName,
  enableStorage: true,
  level: 'error',
  loggerStorageAdapter() {
    return {
      setItem(key: string, data: any) {
@@ -69,6 +70,10 @@
    };
  },
  getPageUrl() {
    return Taro.getCurrentInstance().router.path;
    return Taro.getCurrentInstance()?.router?.path ?? '';
  },
});
};
export const defaultLoggerRecord = new LoggerRecord(Options);
export const httpLoggerRecord = new HttpLoggerRecord(Options);