未验证 提交 c3a2cdcc 编写于 作者: K kuizhiqing 提交者: GitHub

fix logger pollution (#44857)

上级 a3f3172c
......@@ -23,10 +23,13 @@ import abc
import os
import logging
logging.basicConfig(
format='%(asctime)s %(levelname)-2s [%(filename)s:%(lineno)d] %(message)s',
level=logging.INFO)
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
formatter = logging.Formatter(
fmt='%(asctime)s %(levelname)-2s [%(filename)s:%(lineno)d] %(message)s')
ch = logging.StreamHandler()
ch.setFormatter(formatter)
logger.addHandler(ch)
class ClientInfoAttr:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册