zoukankan      html  css  js  c++  java
  • logging 模块

    #_author:star
    #date:2019/11/6
    #logging 模块
    import logging
    logging.basicConfig(level=logging.DEBUG,
    format='%(asctime)s %(filename)s [line:%(lineno)d] %(levelname)s %(message)s',
    datefmt='%a,%d %b %y %H %M %S',
    filename='test.log',)
    #filemode='a')
    logging.debug('debug message11')
    logging.info('info message11')
    logging.warning('warning message11')
    logging.error('error message')
    logging.critical('critical message11')
    Output:

    
    
  • 相关阅读:
    个人博客
    个人博客
    个人博客
    个人博客
    个人博客
    团队作业—个人记录
    4.21
    4.20
    4.19
    4.18
  • 原文地址:https://www.cnblogs.com/startl/p/11809211.html
Copyright © 2011-2022 走看看