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


Python Log.getLoggerNames方法代码示例

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


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

示例1: get_logger_names

# 需要导入模块: from Acspy.Common import Log [as 别名]
# 或者: from Acspy.Common.Log import getLoggerNames [as 别名]
    def get_logger_names(self): # pragma: NO COVER
        '''
        Retrieve the names of the currently active loggers

        Returns: list of logger name strings
        '''
        return Log.getLoggerNames()
开发者ID:,项目名称:,代码行数:9,代码来源:

示例2: testLoggerNamesRequestedFiltered

# 需要导入模块: from Acspy.Common import Log [as 别名]
# 或者: from Acspy.Common.Log import getLoggerNames [as 别名]
 def testLoggerNamesRequestedFiltered(self):
     """SeveralLoggerCheck getLoggerNames returns correct logger names when requested with filtering"""
     self.assertEquals(True, self.cname in Log.getLoggerNames(self.pname[:-1]))
     self.assertEquals(True, self.pname in Log.getLoggerNames(self.pname[:-1]))
     self.assertEquals([self.cname], Log.getLoggerNames(self.cname))
开发者ID:,项目名称:,代码行数:7,代码来源:

示例3: testLoggerNamesRequested

# 需要导入模块: from Acspy.Common import Log [as 别名]
# 或者: from Acspy.Common.Log import getLoggerNames [as 别名]
 def testLoggerNamesRequested(self):
     """SeveralLoggerCheck getLoggerNames returns all known loggers"""
     self.assertEquals(Log.logging.Logger.manager.loggerDict.keys(), Log.getLoggerNames())
开发者ID:,项目名称:,代码行数:5,代码来源:

示例4: testUnnamedLoggerNamesList

# 需要导入模块: from Acspy.Common import Log [as 别名]
# 或者: from Acspy.Common.Log import getLoggerNames [as 别名]
 def testUnnamedLoggerNamesList(self):
     """OneLoggerCheck names list has unnamed logger when filtered by unnamed logger"""
     self.assertEquals([self.mylogger.name], Log.getLoggerNames(self.mylogger.name))
开发者ID:,项目名称:,代码行数:5,代码来源:

示例5: testGetLoggerNames

# 需要导入模块: from Acspy.Common import Log [as 别名]
# 或者: from Acspy.Common.Log import getLoggerNames [as 别名]
 def testGetLoggerNames(self):
     """NoLoggerCheck getLoggerNames when no loggers requested"""
     # When the entire suite is run together, the name from TestContainer is injected.
     # This shouldn't happen, but I don't know how to fix it yet.
     namelist = Log.getLoggerNames()
     self.assertEquals(True, [] == namelist or ['UnitTestContainer'] == namelist)
开发者ID:,项目名称:,代码行数:8,代码来源:


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