We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import logging def get_logger(name=__name__): logger = logging.getLogger(name) logger.setLevel(logging.DEBUG) formatter = logging.Formatter('%(levelname)s %(asctime)s %(filename)s L%(lineno)s: %(message)s') consoleHandler = logging.StreamHandler() consoleHandler.setFormatter(formatter) consoleHandler.setLevel(logging.DEBUG) logger.addHandler(consoleHandler) return logger log = get_logger() log.info('test logging')
INFO 2020-09-09 02:51:06,311 test.py L15: test logging
The text was updated successfully, but these errors were encountered:
最后发现和虚拟环境有关系。。。。
Sorry, something went wrong.
No branches or pull requests
Logging
Log Level 定义
UseCase
Examples
Reference
The text was updated successfully, but these errors were encountered: