befly 3.18.12 → 3.18.14

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/lib/connect.js CHANGED
@@ -52,8 +52,8 @@ export class Connect {
52
52
  } catch (error) {
53
53
  await this.mysqlClient?.close();
54
54
  this.mysqlClient = null;
55
- Logger.error("Mysql 连接失败", error);
56
- throw new Error("Mysql 连接失败", {
55
+ Logger.error(`Mysql 连接失败 (${config.hostname})`, error);
56
+ throw new Error(`Mysql 连接失败 (${config.hostname})`, {
57
57
  cause: error,
58
58
  code: "runtime",
59
59
  subsystem: "mysql",
@@ -93,8 +93,8 @@ export class Connect {
93
93
  } catch (error) {
94
94
  await this.redisClient?.close();
95
95
  this.redisClient = null;
96
- Logger.error("Redis 连接失败", error);
97
- throw new Error("Redis 连接失败", {
96
+ Logger.error(`Redis 连接失败 (${config.hostname})`, error);
97
+ throw new Error(`Redis 连接失败 (${config.hostname})`, {
98
98
  cause: error,
99
99
  code: "runtime",
100
100
  subsystem: "redis",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "befly",
3
- "version": "3.18.12",
4
- "gitHead": "31db0dcea06e03f3116a3bf6c33f5e54180b2436",
3
+ "version": "3.18.14",
4
+ "gitHead": "51060719cdf19c3190a4e5c635a0ca3ae0bfd16a",
5
5
  "private": false,
6
6
  "description": "Befly - 为 Bun 专属打造的 JavaScript API 接口框架核心引擎",
7
7
  "keywords": [
package/utils/response.js CHANGED
@@ -46,14 +46,6 @@ export function ErrorResponse(ctx, msg, code = 1, data = null, detail = null, re
46
46
  * @returns Response 对象
47
47
  */
48
48
  export function FinalResponse(ctx) {
49
- // 记录请求日志
50
- if (ctx.apiPath && ctx.requestId) {
51
- // requestId/apiPath/user/duration 等字段由调用方显式写入日志上下文,避免在 msg 中重复拼接
52
- Logger.info("请求完成", {
53
- event: "request_done"
54
- });
55
- }
56
-
57
49
  // 1. 如果已经有 response,直接返回
58
50
  if (ctx.response) {
59
51
  return ctx.response;