python logging 模块
2017-10-17 14:53:33 0 举报
logging
作者其他创作
大纲/内容
Filters 对象日志内容中只要包含network attack字符的纪录
绑定到handler
Formatter对象2logging.Formatter('%(asctime)s - %(name)s - %(lineno)d - %(message)s')
StreamHandler()输出至屏幕
by 路飞学城
Handler
FileHandler('mysql.log')输出至文件
Logger对象logger = logging.getLogger(\"Mysql\")
添加到logger
Python logging模块流程图
logger.debug(\"test ....\")logger.info(\"test info ....\")logger.warning(\"network attack is coming....\")logger.error(\"test error ....\")
logger.addHandler()
Formatter对象1logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
收藏
0 条评论
下一页