Spring中的aware接口详情
273
2022-08-29
python之日志基础班(python的日志模块)
1.日志先这样用吧
import logging# 配置日志输出路径logging_file = "E://w.log"LOGGING_CONF_DICT = { "filename": logging_file, "level": logging.DEBUG, "format": "%(levelname)s " "%(filename)s " "%(module)s " "%(funcName)s " "line:%(lineno)d " "%(asctime)s " "%(message)s", "datefmt":"%Y-%m-%d %H:%M:%S"}logging.basicConfig( **LOGGING_CONF_DICT)logger = logging.getLogger("main")def main(): logger.warning("aaaaaaaaaaaaaaaaaaaaaa")if __name__ == '__main__': main()
View Code
-----------------------------------------------------------------------------------------------------------------------------------------
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~