2012年9月5日
摘要: pycharm 一个很不错的pyhton开发ide,推荐使用. 阅读全文
posted @ 2012-09-05 13:16 呆头龙 阅读(221) 评论(2) 推荐(0) 编辑
摘要: 我用的django的版本是1.3,听闻django可以配置日志模块,不用自己单独写,于是一阵狂搜加看官方文档解决了我的需求。我的需求是需要配置多个日志文件,网上搜出来大部分是一个的,所以给大家一个我的例子做参考。1.在setting.py里面配置如下:# more details on how to customize your logging configuration.LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'formatters': { 'standar 阅读全文
posted @ 2012-09-05 12:42 呆头龙 阅读(799) 评论(0) 推荐(0) 编辑
摘要: 转自:from:http://blog.csdn.net/yatere/article/details/66554451.简单的将日志打印到屏幕importlogginglogging.debug('This is debug message')logging.info('This is info message')logging.warning('This is warning message')屏幕上打印:WARNING:root:This is warning message默认情况下,logging将日志打印到屏幕,日志级别为WARNIN 阅读全文
posted @ 2012-09-05 11:20 呆头龙 阅读(484) 评论(0) 推荐(0) 编辑

点击这里给我发消息