From 4b9db31fa558ca4991213553cc354eebf72121c4 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期二, 02 十二月 2025 13:06:57 +0800
Subject: [PATCH] feat: C端通知

---
 packages/utils/LoggerRecord/index.ts |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/packages/utils/LoggerRecord/index.ts b/packages/utils/LoggerRecord/index.ts
index 365fba0..4921418 100644
--- a/packages/utils/LoggerRecord/index.ts
+++ b/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);

--
Gitblit v1.9.1