SeldomQA / poium

Page Objects design pattern test library, support selenium、appium、playwright, etc
https://pypi.org/project/poium
Apache License 2.0
416 stars 140 forks source link

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

Open YUSHENGFA opened 3 years ago

YUSHENGFA commented 3 years ago

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

defnngj commented 3 years ago

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

waynecanfly commented 3 years ago

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

1161754620 commented 3 years ago

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