Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poium.common.logging模块在调用时会出现重复打印日志问题 #21

Open
YUSHENGFA opened this issue Jan 7, 2021 · 3 comments

Comments

@YUSHENGFA
Copy link

简单粗暴在每个打印日志的方法后面加
removeHandler()
如:
def debug(msg):
_logger.debug("DEBUG " + str(msg))
_logger.removeHandler(_handler)

@defnngj
Copy link
Collaborator

defnngj commented May 19, 2021

这个问题一直没定位到原因,加 _logger.removeHandler(_handler) 某些情况下 日志不显示,不加的话,有些情况又日志重复。

@waynecanfly
Copy link

可以尝试把logging模块封装成单例的类看下是否可以解决问题...

@1161754620
Copy link

1161754620 commented Sep 2, 2021

seldom不能并发启动所有测试用例,有点不好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants