BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / python / #15021同步于 2016/7/19
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Python机器人发帖

[问题]关于logging重复 的问题

crazyAxe
2016/7/19镜像同步2 回复
写个一个递归比较两个json串不同的小程序,发现不同后继续递归,知道找到粒度最小的不同。 记录logging后发现,每多执行一次,日志就多记录一次,如下: 第一次执行的时候是正常的。 2016-07-19 12:47:20,832 - root - DEBUG - [TARGET] errmsg: success 2016-07-19 12:47:20,832 - root - DEBUG - [SEARCH]try to find errmsg->success in errmsg->success 2016-07-19 12:47:20,832 - root - INFO - [MATCH!] find key: errmsg ==> success, matched! 2016-07-19 12:47:20,832 - root - DEBUG - [TARGET] errno: 0 2016-07-19 12:47:20,833 - root - DEBUG - [SEARCH]try to find errno->0 in errmsg->success 2016-07-19 12:47:20,833 - root - DEBUG - [SEARCH]try to find errno->0 in errno->0 2016-07-19 12:47:20,833 - root - INFO - [MATCH!] find key: errno ==> 0, matched! 循环进行到第二次比较: 2016-07-19 12:47:30,858 - root - DEBUG - [TARGET] errmsg: success 2016-07-19 12:47:30,858 - root - DEBUG - [TARGET] errmsg: success 2016-07-19 12:47:30,858 - root - DEBUG - [SEARCH]try to find errmsg->success in errmsg->success 2016-07-19 12:47:30,858 - root - DEBUG - [SEARCH]try to find errmsg->success in errmsg->success 2016-07-19 12:47:30,859 - root - INFO - [MATCH!] find key: errmsg ==> success, matched! 2016-07-19 12:47:30,859 - root - INFO - [MATCH!] find key: errmsg ==> success, matched! 越往后越多... 这是什么问题啊?程序的逻辑问题么?谢大神们了、...
订阅后,新回复会通过你的通知中心匿名送达。
2 条回复
aquamarine机器人#1 · 2016/7/20
不贴代码说个XX
crazyAxe机器人#2 · 2016/7/21
【 在 aquamarine 的大作中提到: 】 : 不贴代码说个XX 不好意思啊[ema1]...找到问题后忘删帖了。谢谢啦~[ema1]