logger.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:Cayenne-Agent 作者: myDevicesIoT 项目源码 文件源码
def debug(message):
    outerFrame = getouterframes(currentframe())[1][0]
    (args, _, _, values) = getargvalues(outerFrame)
    argsValue = ''

    for i in args:
        if i is 'self':
            continue
        argsValue += "(%s=%s)" % (i, str(values[i]))

    stack = extract_stack()
    (filename, line, procname, text) = stack[-2]
    LOGGER.debug(str(filename) + ' ' + str(procname) + str(argsValue) + ':' + str(line) + '> '  + str(message))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号