很多程序都有记录日志的需求,并且日志包含的信息即有正常的程序访问日志,还可能有错误,警告等信息输出,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 等级

最新文章

  1. js写的ajax
  2. 自增长主键Id的另类设计
  3. C# Socket Server 收不到数据
  4. Windows下AndroidStudio 中使用Git(AndroidStudio项目于GitHub关联)
  5. SQL Common Sense 碎片一
  6. mysql 列类型以及属性特点
  7. ZZCMS8.1|代码审计
  8. 三菱Q系列PLC的io分配
  9. c++中对于json的key不带双引号的问题修复
  10. FB面经 Prepare: Largest Island
  11. [leetcode]254. Factor Combinations因式组合
  12. CucumberPeople 1.3.2 发布
  13. 开发工具-Eclipse
  14. UIApplication 的学习
  15. H5,PC网页屏幕尺寸相关整理(scrollLeft,scrollWidth,clientWidth,offsetWidth)
  16. UVa 12003 Array Transformer (分块)
  17. springMVC 开涛 Controller接口控制器
  18. Typescript declaration: Merge a class and an interface
  19. HDUOJ---1754 Minimum Inversion Number (单点更新之求逆序数)
  20. Unihan(统汉字)常用字段介绍

热门文章

  1. python Tkinter 组件
  2. Codeforces 1203F1 Complete the Projects (easy version)
  3. Python3学习笔记(五):列表和元组
  4. (67)c++后台开发
  5. 阿里第一天——maven学习
  6. WOSA XFS 官方文档地址
  7. class 用法 函数变量的作用域
  8. a = a + b 与 a += b 的区别
  9. 将项目发布到neuxs私服
  10. k8s 添加ingress 暴露服务