摘要: 1、写日志 1 import nnlog 2 import traceback 3 4 # backCount:保留多久时间的日志,5表示保留最近5天的日志 5 # when:按什么产生日志文件,D表示按天产生日志文件;S按秒,M按分钟 6 # level:日志级别; 7 # log.debug() 阅读全文
posted @ 2020-05-26 22:54 tour8 阅读(222) 评论(0) 推荐(0)
摘要: 1、字符串类型 操作1:设置decode_responses参数为True,返回的key直接为字符串 import redis # decode_responses=True,取到的数据直接为字符串类型,而不是字节类型了 r = redis.Redis(host='xxxxxxx',\ port=6 阅读全文
posted @ 2020-05-26 22:30 tour8 阅读(348) 评论(0) 推荐(0)