当前位置: 首页>>代码示例>>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;未经允许,请勿转载。