202107-01 Python 第三方日志框架loguru使用 解决中文乱码问题项目地址github:https://github.com/Delgan/loguru文档:https://loguru.readthedocs.io/en/stable/index.html安装pipinstallloguru1、输出日志fromloguruimportloggerlogger.debug("这是一条debug日志")终端执行后出现带颜色的日志,挺酷的2、输出到文件fromloguruimportloggerlogger.add("file_{time}.log")logger.debug("这是一条debug日志")logger.info("这是一条info日志")目录下多出一个日志文件... 继续阅读 >