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

关于日志 #58

Closed
williamfzc opened this issue Sep 11, 2019 · 1 comment
Closed

关于日志 #58

williamfzc opened this issue Sep 11, 2019 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@williamfzc
Copy link
Owner

  • 目前的日志对于日常使用来说过多了
  • 没有导出成日志文件的接口
@williamfzc williamfzc added the enhancement New feature or request label Sep 11, 2019
@williamfzc
Copy link
Owner Author

williamfzc commented Sep 11, 2019

关于日志等级问题,stagesepx使用的是loguru默认的logger,意味着你只需要对该logger进行修改即可影响stagesepx的日志。

import sys
from loguru import logger

logger.remove()
logger.add(sys.stderr, level='INFO')

如此做之后即可将日志等级调整为INFO及以上。更多可以参考:Delgan/loguru#138

同样的,如果你希望将日志保存到文件,与loguru保持一致即可:

from loguru import logger

logger.remove()
logger.add('haha.log')

如果做之后会将日志保存到 haha.log 中。更多可以参考:Delgan/loguru#125

@williamfzc williamfzc added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Sep 11, 2019
@williamfzc williamfzc changed the title 日志系统改进 关于日志 Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant