![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
起不了名儿
天下有大勇者,卒然临之而不惊,无故加之而不怒。此其所挟持者甚大,而其志甚远也——苏轼·《留侯论》
展开
-
python logging的使用
logging使用以及各种参数的定义:https://www.cnblogs.com/CJOKER/p/8295272.html避免logging日志多次打印或者写入:https://www.cnblogs.com/mojiexiaolong/p/6828616.html一个简单的democlass Logger(): def __init__(self, pat...转载 2019-06-18 15:52:47 · 249 阅读 · 0 评论 -
Supervisor进程管理&开机自启
Supervisor进程管理&开机自启supervisor是一个进程管理工具,用来启动、停止、重启和监测进程。我用这个东西主要用来监测爬虫和Flask运行状况,当程序挂掉后,supervisor能够帮我重新拉起进程。安装安装就比较简单了,直接用Python的包管理器pip:sudo pip install supervisor配置先通过echo_supervis...转载 2019-07-24 14:31:52 · 605 阅读 · 0 评论 -
python logger日志通过字典配置 随笔
安装PyYAML模块:pip install PyYAML随便起个名字 *.yaml 内容如下(此文件中不能有汉字)version: 1formatters: simple:# format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s' format: '%(asctime)s- %(filen...原创 2019-07-25 15:27:03 · 1018 阅读 · 1 评论