當前位置: 首頁>>代碼示例>>Python>>正文


Python Logger.get_logger方法代碼示例

本文整理匯總了Python中core.logger.Logger.get_logger方法的典型用法代碼示例。如果您正苦於以下問題:Python Logger.get_logger方法的具體用法?Python Logger.get_logger怎麽用?Python Logger.get_logger使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在core.logger.Logger的用法示例。


在下文中一共展示了Logger.get_logger方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: parse_criteria

# 需要導入模塊: from core.logger import Logger [as 別名]
# 或者: from core.logger.Logger import get_logger [as 別名]
    def parse_criteria(cls, criteria):
        result = ''
        for key in criteria:
            if type(criteria[key]) == dict:
                if key.upper() == 'NOT':
                    result += ' NOT (%s) ' % cls.parse_criteria(criteria[key])
                elif key.upper() in ['AND', 'OR']:
                    result += ' ('
                    #parse each value in criteria[key] and stick key in between them
                    innerResults = []
                    for innerKey in criteria[key]:
                        innerResults.append(cls.parse_criteria({innerKey: criteria[key][innerKey]}))
                    result += key.upper().join(innerResults)
                    result += ') '
                else:
                    Logger.get_logger(__name__).warn('I\'m sorry, I don\'t speak idiot. Couldn\'t parse operator declaration: %s', key)
            else:
                if type(criteria[key]) == str:
                    result += ' %s = "%s" ' % (key, criteria[key])
                else:
                    result += ' %s = %s ' % (key, criteria[key])

        if result == '':
            result = '1'

        return result
開發者ID:pettazz,項目名稱:tvrobot-daemon,代碼行數:28,代碼來源:base_model.py

示例2: __init__

# 需要導入模塊: from core.logger import Logger [as 別名]
# 或者: from core.logger.Logger import get_logger [as 別名]
    def __init__(self):
        # logging
        self.logger = Logger.get_logger(__name__)

        # tvrobot core object
        # self.tvrobot = TvRobot()

        # static handlers
        handlers = [
            (r'/sms', SMSHandler),
            (r'/event', EventHandler),
        ]
        # tornado app settings
        settings = dict(
            debug = False,
            cookie_secret = config.TVROBOT['API']['cookie_secret']
        )
        # init app with settings and static handlers
        tornado.web.Application.__init__(self, handlers, **settings)

        self.logger.info('API initialized successfully')
開發者ID:pettazz,項目名稱:tvrobot-daemon,代碼行數:23,代碼來源:server.py

示例3: __init__

# 需要導入模塊: from core.logger import Logger [as 別名]
# 或者: from core.logger.Logger import get_logger [as 別名]
 def __init__(self):
     self.logr = Logger.get_logger(__name__)
     self._conn = None
     self._conn = self.__get_conn()
開發者ID:pettazz,項目名稱:tvrobot-daemon,代碼行數:6,代碼來源:database.py

示例4: __init__

# 需要導入模塊: from core.logger import Logger [as 別名]
# 或者: from core.logger.Logger import get_logger [as 別名]
 def __init__(self, save_to=None):
   self.logger = Logger.get_logger(utils.get_fullname(self))
   self.save_to = save_to or getattr(settings, 'SAVE_DIR')
開發者ID:ejaury,項目名稱:gimme_shows,代碼行數:5,代碼來源:utorrent.py

示例5: __init__

# 需要導入模塊: from core.logger import Logger [as 別名]
# 或者: from core.logger.Logger import get_logger [as 別名]
 def __init__(self, url=None):
   BaseSourceFeed.__init__(self, url)
   self.logger = Logger.get_logger(utils.get_fullname(self))
   self.logger.debug('Created an instance')
開發者ID:ejaury,項目名稱:gimme_shows,代碼行數:6,代碼來源:sources.py

示例6: __init__

# 需要導入模塊: from core.logger import Logger [as 別名]
# 或者: from core.logger.Logger import get_logger [as 別名]
 def __init__(self):
     self.logr = Logger.get_logger(__name__)
     self._new = False
     for fieldidx in self.FIELDS:
         setattr(self, self.FIELDS[fieldidx], None)
開發者ID:pettazz,項目名稱:tvrobot-daemon,代碼行數:7,代碼來源:base_model.py

示例7: search

# 需要導入模塊: from core.logger import Logger [as 別名]
# 或者: from core.logger.Logger import get_logger [as 別名]
 def search(cls, criteria = {}):
     logr = Logger.get_logger(__name__)
     pass
開發者ID:pettazz,項目名稱:tvrobot-daemon,代碼行數:5,代碼來源:base_model.py


注:本文中的core.logger.Logger.get_logger方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。