python学习第五十二天logging模块的使用
2024-09-05 18:26:13
很多程序都有记录日志的需求,并且日志包含的信息即有正常的程序访问日志,还可能有错误,警告等信息输出,python的
logging模块提供了标准的日志接口,你可以通过它存储各种格式的日志,logging的日志可以分debug(),info()
warning() error() and critical()个级别,下面我们看一下怎么用
import logging
logging.warning("www.96net.com.cn")
logging,critical("www.dc3688.com")
logging.info("so this is good")
logging.debug("this is should go to file")
这里的info 等于level 等级
最新文章
- js写的ajax
- 自增长主键Id的另类设计
- C# Socket Server 收不到数据
- Windows下AndroidStudio 中使用Git(AndroidStudio项目于GitHub关联)
- SQL Common Sense 碎片一
- mysql 列类型以及属性特点
- ZZCMS8.1|代码审计
- 三菱Q系列PLC的io分配
- c++中对于json的key不带双引号的问题修复
- FB面经 Prepare: Largest Island
- [leetcode]254. Factor Combinations因式组合
- CucumberPeople 1.3.2 发布
- 开发工具-Eclipse
- UIApplication 的学习
- H5,PC网页屏幕尺寸相关整理(scrollLeft,scrollWidth,clientWidth,offsetWidth)
- UVa 12003 Array Transformer (分块)
- springMVC 开涛 Controller接口控制器
- Typescript declaration: Merge a class and an interface
- HDUOJ---1754 Minimum Inversion Number (单点更新之求逆序数)
- Unihan(统汉字)常用字段介绍