From 5a3d2d0bc2eb6ea2d5e63853e3d495273281850b Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Tue, 19 Dec 2023 17:11:08 +0800 Subject: [PATCH] fix: ignore db query error default logger --- config/config.default.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/config.default.ts b/config/config.default.ts index 024e117c..7b806f04 100644 --- a/config/config.default.ts +++ b/config/config.default.ts @@ -76,7 +76,11 @@ export default (appInfo: EggAppConfig) => { user: process.env.CNPMCORE_MYSQL_USER || process.env.MYSQL_USER || 'root', password: process.env.CNPMCORE_MYSQL_PASSWORD || process.env.MYSQL_PASSWORD, charset: 'utf8mb4', - logger: {}, + logger: { + // https://github.com/cyjake/leoric/blob/master/docs/zh/logging.md#logqueryerror + // ignore query error + logQueryError() {}, + }, }; config.redis = {