当前位置: 首页>>代码示例>>Python>>正文


Python xbmc.LOGNONE属性代码示例

本文整理汇总了Python中xbmc.LOGNONE属性的典型用法代码示例。如果您正苦于以下问题:Python xbmc.LOGNONE属性的具体用法?Python xbmc.LOGNONE怎么用?Python xbmc.LOGNONE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在xbmc的用法示例。


在下文中一共展示了xbmc.LOGNONE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: emit

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGNONE [as 别名]
def emit(self, record):
        if record.levelno < logging.WARNING and self._modules and not record.name in self._modules:
            # Log INFO and DEBUG only with enabled modules
            return
        levels = {
            logging.CRITICAL: xbmc.LOGFATAL,
            logging.ERROR: xbmc.LOGERROR,
            logging.WARNING: xbmc.LOGWARNING,
            logging.INFO: xbmc.LOGNOTICE,
            logging.DEBUG: xbmc.LOGSEVERE,
            logging.NOTSET: xbmc.LOGNONE,
        }
        try:
            xbmc.log(self.format(record), levels[record.levelno])
        except:
            try:
                xbmc.log(self.format(record).encode('utf-8', 'ignore'), levels[record.levelno])
            except:
                xbmc.log(b"[%s] Unicode Error in message text" % self.pluginName, levels[record.levelno]) 
开发者ID:arnesongit,项目名称:plugin.audio.tidal2,代码行数:21,代码来源:debug.py

示例2: log

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGNONE [as 别名]
def log(self, msg, level=xbmc.LOGNOTICE):
        '''
        Writes a string to the XBMC log file. The addon name is inserted into 
        the beginning of the message automatically to help you find relevent 
        messages in the log file.
        
        The available log levels are defined in the :mod:`xbmc` module and are
        currently as follows::
        
            xbmc.LOGDEBUG = 0
            xbmc.LOGERROR = 4
            xbmc.LOGFATAL = 6
            xbmc.LOGINFO = 1
            xbmc.LOGNONE = 7
            xbmc.LOGNOTICE = 2
            xbmc.LOGSEVERE = 5
            xbmc.LOGWARNING = 3
        
        Args:
            msg (str or unicode): The message to be written to the log file.
        
        Kwargs:
            level (int): The XBMC log level to write at.
        '''
        #msg = unicodedata.normalize('NFKD', unicode(msg)).encode('ascii',
        #                                                         'ignore')
        xbmc.log('%s: %s' % (self.get_name(), msg), level) 
开发者ID:iwannabelikemike,项目名称:plugin.video.sparkle,代码行数:29,代码来源:addon.py

示例3: debugTrace

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGNONE [as 别名]
def debugTrace(data):
    try:
        if ifDebug():
            log = getVery() + " : " + data
            xbmc.log(msg=log, level=xbmc.LOGNONE)       
        else:
            log = getVery() + " : " + data
            xbmc.log(msg=log, level=xbmc.LOGDEBUG)
    except Exception as e:
        log = DEC_ERR + getVery() + data
        log = log.encode('ascii', 'ignore')
        xbmc.log(msg=log, level=xbmc.LOGDEBUG) 
开发者ID:Zomboided,项目名称:service.vpn.manager,代码行数:14,代码来源:utility.py

示例4: log

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGNONE [as 别名]
def log(self, msg, level=xbmc.LOGDEBUG):
        '''
        Writes a string to the XBMC log file. The addon name is inserted into 
        the beginning of the message automatically to help you find relevent 
        messages in the log file.
        
        The available log levels are defined in the :mod:`xbmc` module and are
        currently as follows::
        
            xbmc.LOGDEBUG = 0
            xbmc.LOGERROR = 4
            xbmc.LOGFATAL = 6
            xbmc.LOGINFO = 1
            xbmc.LOGNONE = 7
            xbmc.LOGNOTICE = 2
            xbmc.LOGSEVERE = 5
            xbmc.LOGWARNING = 3
        
        Args:
            msg (str or unicode): The message to be written to the log file.
        
        Kwargs:
            level (int): The XBMC log level to write at.
        '''
        #msg = unicodedata.normalize('NFKD', unicode(msg)).encode('ascii',
        #                                                         'ignore')
        xbmc.log('%s: %s' % (self.get_name(), msg), level) 
开发者ID:mrknow,项目名称:filmkodi,代码行数:29,代码来源:addon.py

示例5: log

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGNONE [as 别名]
def log(self, msg, level=xbmc.LOGDEBUG):
        '''
        Writes a string to the XBMC log file. The addon name is inserted into
        the beginning of the message automatically to help you find relevent
        messages in the log file.

        The available log levels are defined in the :mod:`xbmc` module and are
        currently as follows::

            xbmc.LOGDEBUG = 0
            xbmc.LOGERROR = 4
            xbmc.LOGFATAL = 6
            xbmc.LOGINFO = 1
            xbmc.LOGNONE = 7
            xbmc.LOGNOTICE = 2
            xbmc.LOGSEVERE = 5
            xbmc.LOGWARNING = 3

        Args:
            msg (str or unicode): The message to be written to the log file.

        Kwargs:
            level (int): The XBMC log level to write at.
        '''
        #msg = unicodedata.normalize('NFKD', unicode(msg)).encode('ascii',
        #                                                         'ignore')
        xbmc.log('%s: %s' % (self.get_name(), msg), level) 
开发者ID:mrknow,项目名称:filmkodi,代码行数:29,代码来源:addon.py


注:本文中的xbmc.LOGNONE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。