From e1e693ec36d3b4ca2add625ecdc1714300f344f8 Mon Sep 17 00:00:00 2001
From: KevinHuSh <kevinhu.sh@gmail.com>
Date: Tue, 9 Apr 2024 09:47:02 +0800
Subject: [PATCH] set database logger level (#270)

### What problem does this PR solve?

Issue link:#264

### Type of change

- [x] Performance Improvement
---
 api/settings.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/api/settings.py b/api/settings.py
index 4a0387c..be4ae85 100644
--- a/api/settings.py
+++ b/api/settings.py
@@ -13,6 +13,8 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 #
+import logging
+
 from rag.utils import ELASTICSEARCH
 from rag.nlp import search
 import os
@@ -36,6 +38,7 @@ stat_logger = getLogger("stat")
 access_logger = getLogger("access")
 database_logger = getLogger("database")
 chat_logger = getLogger("chat")
+database_logger.setLevel(logging.WARNING)
 
 API_VERSION = "v1"
 RAG_FLOW_SERVICE_NAME = "ragflow"
-- 
GitLab