befly 3.23.0 → 3.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/checks/config.js +1 -0
- package/configs/beflyConfig.json +1 -0
- package/package.json +2 -2
- package/router/api.js +5 -1
package/checks/config.js
CHANGED
package/configs/beflyConfig.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"apiHost": "http://127.0.0.1",
|
|
12
12
|
"publicDir": "./public",
|
|
13
13
|
"publicHost": "http://127.0.0.1:3000",
|
|
14
|
+
"excludeApisLog": ["/api/core/tongJi/errorReport", "/api/core/tongJi/infoReport", "/api/core/tongJi/onlineReport"],
|
|
14
15
|
"logger": {
|
|
15
16
|
"debug": 1,
|
|
16
17
|
"excludeFields": ["password", "token", "secret"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly",
|
|
3
|
-
"version": "3.23.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "3.23.1",
|
|
4
|
+
"gitHead": "b66a96633fc12a6761ee2838d4037f2b619b1588",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Befly - 为 Bun 专属打造的 JavaScript API 接口框架核心引擎",
|
|
7
7
|
"keywords": [
|
package/router/api.js
CHANGED
|
@@ -106,7 +106,11 @@ export function apiHandler(apis, hooks, context) {
|
|
|
106
106
|
logData["body"] = ctx.body;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
const shouldSkipRequestLog = context.config.excludeApisLog.includes(ctx.apiPath);
|
|
110
|
+
|
|
111
|
+
if (!shouldSkipRequestLog) {
|
|
112
|
+
Logger.info("请求", logData);
|
|
113
|
+
}
|
|
110
114
|
|
|
111
115
|
// 5. 执行 API handler
|
|
112
116
|
const result = await ctx.apiHandler(context, ctx);
|