-
Notifications
You must be signed in to change notification settings - Fork 411
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
在终端打印重复日志的问题 #268
Comments
与 #249 应该是同样的问题。可能是某些插件重复定义了logger? |
看看 import logging
def listloggers():
rootlogger = logging.getLogger()
print(rootlogger)
for h in rootlogger.handlers:
print(' %s' % h)
for nm, lgr in logging.Logger.manager.loggerDict.items():
print('+ [%-20s] %s ' % (nm, lgr))
if not isinstance(lgr, logging.PlaceHolder):
for h in lgr.handlers:
print(' %s' % h) |
试试把 logger.removeHandler(default_handler) |
今天为了更autopcr,更了一下这几个模块,然后就开始一条日志打两遍了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
月初换了台VPS,就重新安装了一次Hoshino,python版本从原来的3.8更改到了3.9,现在发现Hoshino正常运行之后,打印日志都会打印两遍。
本来以为是自己插件使用了loguru引起的,现在已经把自己的插件完整移除了,还是有这个问题。(图片最后两行)
The text was updated successfully, but these errors were encountered: