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


Python log.FATAL属性代码示例

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


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

示例1: run_test

# 需要导入模块: from distutils import log [as 别名]
# 或者: from distutils.log import FATAL [as 别名]
def run_test(self, filename):
        path = os.path.join(self.path, filename)
        self.announce("Running %s..." % filename, log.INFO)
        try:
            execfile(path)
        except Exception, e:
            self.announce('Test case failed: %s (%r)' % (filename, e), log.FATAL)
            raise e 
开发者ID:ricmoo,项目名称:pycoind,代码行数:10,代码来源:setup.py

示例2: setUp

# 需要导入模块: from distutils import log [as 别名]
# 或者: from distutils.log import FATAL [as 别名]
def setUp(self):
        super(LoggingSilencer, self).setUp()
        self.threshold = log.set_threshold(log.FATAL)
        # catching warnings
        # when log will be replaced by logging
        # we won't need such monkey-patch anymore
        self._old_log = log.Log._log
        log.Log._log = self._log
        self.logs = [] 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:11,代码来源:support.py

示例3: _log

# 需要导入模块: from distutils import log [as 别名]
# 或者: from distutils.log import FATAL [as 别名]
def _log(self, level, msg, args):
        if level not in (DEBUG, INFO, WARN, ERROR, FATAL):
            raise ValueError('%s wrong log level' % str(level))
        self.logs.append((level, msg, args)) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:6,代码来源:support.py

示例4: setUp

# 需要导入模块: from distutils import log [as 别名]
# 或者: from distutils.log import FATAL [as 别名]
def setUp(self):
        super().setUp()
        self.threshold = log.set_threshold(log.FATAL)
        # catching warnings
        # when log will be replaced by logging
        # we won't need such monkey-patch anymore
        self._old_log = log.Log._log
        log.Log._log = self._log
        self.logs = [] 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:11,代码来源:support.py

示例5: _log

# 需要导入模块: from distutils import log [as 别名]
# 或者: from distutils.log import FATAL [as 别名]
def _log(self, level, msg, args):
        if level not in (DEBUG, INFO, WARN, ERROR, FATAL):
            raise ValueError('%s wrong log level' % str(level))
        if not isinstance(msg, str):
            raise TypeError("msg should be str, not '%.200s'"
                            % (type(msg).__name__))
        self.logs.append((level, msg, args)) 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:9,代码来源:support.py

示例6: setup_method

# 需要导入模块: from distutils import log [as 别名]
# 或者: from distutils.log import FATAL [as 别名]
def setup_method(self, method):
        super(TestFileListTest, self).setup_method(method)
        self.threshold = log.set_threshold(log.FATAL)
        self._old_log = log.Log._log
        log.Log._log = self._log
        self.logs = [] 
开发者ID:pypa,项目名称:setuptools,代码行数:8,代码来源:test_manifest.py

示例7: _log

# 需要导入模块: from distutils import log [as 别名]
# 或者: from distutils.log import FATAL [as 别名]
def _log(self, level, msg, args):
        if level not in (log.DEBUG, log.INFO, log.WARN, log.ERROR, log.FATAL):
            raise ValueError('%s wrong log level' % str(level))
        self.logs.append((level, msg, args)) 
开发者ID:pypa,项目名称:setuptools,代码行数:6,代码来源:test_manifest.py


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