當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。