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


Python Config.getLogger方法代码示例

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


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

示例1: WebRecorder

# 需要导入模块: from Configuration import Config [as 别名]
# 或者: from Configuration.Config import getLogger [as 别名]
class WebRecorder():
    '''
    API methods are called by the RecorderPlugin in the RecorderWebService module.
    '''
    # signal modes
    # TODO change mode to STATUS und ERROR...
    MSG_STATUS = MessageListener.MSG_STATUS
    # MSG_EPG = MessageListener.MSG_EPG
    MSG_REFRESH = MessageListener.MSG_REFRESH
    
    # Modes or types of rec? 
    (MODE_DATA, MODE_REC, MODE_BLOCK) = range(0xA0, 0xA3)
    (TYPE_HEAD, TYPE_PROG, TYPE_INFO) = range(3)



    def __init__(self):
        '''
        starts the app
        '''
        self.configuration = Config()
        self.configuration.setupLogging("webdvb.log")
        
        self._lastMessage = None
        ml = MessageListener();
        ml.addListener(ml.MSG_STATUS, self.storeLastMessage)
        # ml.addListener(ml.MSG_EPG, this.storeLastMessage)
        ml.addListener(ml.MSG_REFRESH, self.storeLastMessage)
        
        channelReader = ChannelReader()
        cPath = self.configuration.getChannelFilePath()

        channelReader.readChannels(cPath)
        self.channelList = channelReader.getChannels()
        self.progProvider = EPGProgramProvider(self, self.channelList, self.configuration)
        self._lastEpgRead = 0.0
        # self._readCachedEpgData()
        self.checkEPGData()
  

  
    def _readCachedEpgData(self):
        ml = MessageListener();
        if not self.channelList:
            ml.signalMessage(self.MSG_STATUS, "Where is that channel.conf? RTF!")
            return

        ml.signalMessage(self.MSG_STATUS, "Reading programm info")
        msg = "Idle"
        try:
            self.progProvider.readEPGCache()
            ml.signalMessage(self.MSG_REFRESH, "Program info read")  # enforces a new list
        except IOError:
            msg = "No EPG data"
        except Exception, ex:
            msg = "Error reading cached EPG Data: " + str(ex.args[0])
            self.configuration.getLogger().exception(msg)
            print msg
        self.configuration.logInfo(msg)                        
        ml.signalMessage(self.MSG_STATUS, msg)
开发者ID:kanehekili,项目名称:MicroDVBRecorder,代码行数:62,代码来源:PythonWebBridge.py


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