config.py 文件源码

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

项目:splunk_ta_ps4_f1_2016 作者: jonathanvarley 项目源码 文件源码
def log(msg, msgx='', level=logging.INFO, need_tb=False):
    """
    Logging in UCC Config Module.
    :param msg: message content
    :param msgx: detail info.
    :param level: logging level
    :param need_tb: if need logging traceback
    :return:
    """
    global LOGGING_STOPPED
    if LOGGING_STOPPED:
        return

    msgx = ' - ' + msgx if msgx else ''
    content = 'UCC Config Module: %s%s' % (msg, msgx)
    if need_tb:
        stack = ''.join(traceback.format_stack())
        content = '%s\r\n%s' % (content, stack)
    stulog.logger.log(level, content, exc_info=1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号