log_utils.py 文件源码

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

项目:plugin.video.exodus 作者: huberyhe 项目源码 文件源码
def log(msg, level=LOGDEBUG):
    req_level = level
    # override message level to force logging when addon logging turned on
    if control.setting('addon_debug') == 'true' and level == LOGDEBUG:
        level = LOGNOTICE

    try:
        if isinstance(msg, unicode):
            msg = '%s (ENCODED)' % (msg.encode('utf-8'))

        xbmc.log('[%s] %s' % (name, msg), level)

    except Exception as e:
        try:
            xbmc.log('Logging Failure: %s' % (e), level)
        except:
            pass  # just give up
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号