开发者社区> 问答> 正文

python怎么打印日志

python怎么打印日志

展开
收起
云计算小粉 2018-05-10 20:11:03 1564 0
2 条回答
写回答
取消 提交回答
  • import logging

    简单打印日志举例

    logging.basicConfig(level=logging.DEBUG) # 设置日志级别,WARN
    logging.warning('Watch out!') # will print a message to the console
    logging.info('I told you so') # will not print anything

    2019-07-17 22:25:01
    赞同 展开评论 打赏
  • print("hello world")

    Do you mean this?

    2019-07-17 22:25:01
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载