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


Python xbmc.LOGINFO属性代码示例

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


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

示例1: get_log_level

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def get_log_level():
    """
    Lazily read the log level settings
    """
    # pylint: disable=global-statement
    global __LOG_LEVEL__
    if __LOG_LEVEL__ is None:
        try:
            __LOG_LEVEL__ = g.ADDON.getSettingString('debug_log_level')
            if __LOG_LEVEL__ != 'Disabled':
                _log('Debug logging level is {}'.format(__LOG_LEVEL__), xbmc.LOGINFO)
        except Exception:  # pylint: disable=broad-except
            # If settings.xml was not created yet, as at first service run
            # g.ADDON.getSettingString('debug_log_level') will thrown a TypeError
            # If any other error appears, we don't want the service to crash,
            # let's return 'Disabled' in all case
            __LOG_LEVEL__ = 'Disabled'
    return __LOG_LEVEL__ 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:20,代码来源:logging.py

示例2: log_info

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def log_info(msg):
    log(msg, level=LOGINFO) 
开发者ID:bugatsinho,项目名称:bugatsinho.github.io,代码行数:4,代码来源:log.py

示例3: info

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def info(msg, *args, **kwargs):
    """Log an info message."""
    if get_log_level() == 'Disabled':
        return
    _log(msg, xbmc.LOGINFO, *args, **kwargs) 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:7,代码来源:logging.py

示例4: log

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [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

示例5: info

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def info(self, message):
        self._log(message, xbmc.LOGINFO) 
开发者ID:quarckster,项目名称:kodi.kino.pub,代码行数:4,代码来源:logger.py

示例6: _get_data

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def _get_data(self, url, params):
        apikey = settings.get_apikey('tadb')
        if not apikey:
            raise build_key_error('tadb')
        self.log('uncached', xbmc.LOGINFO)
        response = self.doget(url, params=params)
        if response is None:
            raise build_key_error('tadb')
        return 'Empty' if response is None else json.loads(response.text, cls=UTF8JSONDecoder) 
开发者ID:rmrector,项目名称:script.artwork.beef,代码行数:11,代码来源:theaudiodb.py

示例7: _get_data

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def _get_data(self, mediaid, arttype, language):
        if not settings.get_apikey('tvdb'):
            raise build_key_error('tvdb')
        self.log('uncached', xbmc.LOGINFO)
        getparams = {'params': {'keyType': arttype}, 'headers': {'Accept-Language': language}}
        response = self.doget(self.apiurl % mediaid, **getparams)
        return 'Empty' if response is None else json.loads(response.text, cls=UTF8JSONDecoder) 
开发者ID:rmrector,项目名称:script.artwork.beef,代码行数:9,代码来源:thetvdbv2.py

示例8: _get_data

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def _get_data(self, url):
        apikey = settings.get_apikey('tmdb')
        if not apikey:
            raise build_key_error('tmdb')
        self.log('uncached', xbmc.LOGINFO)
        response = self.doget(url, params={'api_key': apikey})
        return 'Empty' if response is None else json.loads(response.text, cls=UTF8JSONDecoder) 
开发者ID:rmrector,项目名称:script.artwork.beef,代码行数:9,代码来源:themoviedb.py

示例9: _get_seasonnum

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def _get_seasonnum(self, image, itemname, ignoreall=False):
        allitem = None if ignoreall else -1
        if 'season' not in image:
            return None
        try:
            return int(image['season']) if image['season'] != 'all' else allitem
        except ValueError:
            if not ignoreall:
                self.log("Image season was set incorrectly for '%s', to \"%s\", so I can't tell which season "
                    "it belongs to. The image URL is:\n%s" % (itemname, image['season'], image['url']), xbmc.LOGINFO)
            # throw it into the 'all seasons' image pile
            return allitem 
开发者ID:rmrector,项目名称:script.artwork.beef,代码行数:14,代码来源:fanarttv.py

示例10: notify_count

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def notify_count(message, count):
    countmessage = message.format(count)
    log(countmessage, xbmc.LOGINFO)
    xbmcgui.Dialog().notification('Artwork Beef', countmessage) 
开发者ID:rmrector,项目名称:script.artwork.beef,代码行数:6,代码来源:default.py

示例11: info

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def info(self, message, *args):
        """ Outputs an info message """
        self._log(xbmc.LOGINFO, message, *args) 
开发者ID:mediathekview,项目名称:plugin.video.mediathekview,代码行数:5,代码来源:kodilogger.py

示例12: log

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def log(message,loglevel=xbmc.LOGNOTICE):
    """"save message to kodi.log.
    
    Args:
        message: has to be unicode, http://wiki.xbmc.org/index.php?title=Add-on_unicode_paths#Logging
        loglevel: xbmc.LOGDEBUG, xbmc.LOGINFO, xbmc.LOGNOTICE, xbmc.LOGWARNING, xbmc.LOGERROR, xbmc.LOGFATAL
    """
    xbmc.log(encode(__addon_id__ + u": " + message), level=loglevel) 
开发者ID:taxigps,项目名称:xbmc-addons-chinese,代码行数:10,代码来源:utils.py

示例13: log

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [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

示例14: _log

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def _log(self, msg='', level=None, args=None):
        plugin = "plugin.video.mrknow"
        if isinstance(msg, unicode):
            msg = msg.encode('utf-8')
        else:
            msg = str(msg)
        if args:
            msg += ' ' + ' '.join(args)
        if xbmc:
            if level is None:
                level = LOGINFO
            xbmc.log("[%s] %s" % (plugin, msg), level)
        else:
            print("[%s] %s" % (plugin, msg)) 
开发者ID:mrknow,项目名称:filmkodi,代码行数:16,代码来源:mrknow_pLog.py

示例15: info

# 需要导入模块: import xbmc [as 别名]
# 或者: from xbmc import LOGINFO [as 别名]
def info(self, msg, *args):
        self._log(msg, args=args, level=LOGINFO) 
开发者ID:mrknow,项目名称:filmkodi,代码行数:4,代码来源:mrknow_pLog.py


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