本文整理汇总了Python中utils.logger.Logger.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Logger.__init__方法的具体用法?Python Logger.__init__怎么用?Python Logger.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils.logger.Logger
的用法示例。
在下文中一共展示了Logger.__init__方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from utils.logger import Logger [as 别名]
# 或者: from utils.logger.Logger import __init__ [as 别名]
def __init__(self):
"""
Underlying channel name is given based on its classname (e.g. NPLogger)
and an individual, unique instance name, assigned at runtime. This
instance channel is a subchannel of the class channel, so all messages
are routed through both channels.
"""
class_name = self.__class__.__name__
instance_name = id(self)
full_name = "%s.%s" % (class_name, instance_name)
Logger.__init__(self, full_name)
示例2: __init__
# 需要导入模块: from utils.logger import Logger [as 别名]
# 或者: from utils.logger.Logger import __init__ [as 别名]
def __init__(self, learner):
Logger.__init__(self, "ColourLogger")
self.learner = learner
self.full_name = learner.agent_name
# on new point
self.data_logger.info("lang.name,r,g,b,word,x,y,z")
# probe point & mean point
self.probe_logger = Logger("colour.sample")
self.mean_logger = Logger("colour.mean")
# output header CSV
self.probe_logger.info("lang.name,word")
self.mean_logger.info("lang.name,word,r,g,b")