本文整理汇总了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
示例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')
示例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()
示例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')
示例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')
示例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)
示例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