Permalink
Browse files

Bug 829941 - Add PROCESS-CRASH as a mozlog log level; r=ahal

  • Loading branch information...
1 parent f5cb4c1 commit 137cf8615095d78d493c569d33da31d0eda44078 @edmorley edmorley committed Jan 14, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 mozlog/mozlog/logger.py
View
@@ -18,12 +18,14 @@
PASS = _default_level + 3
KNOWN_FAIL = _default_level + 4
FAIL = _default_level + 5
+CRASH = _default_level + 6
# Define associated text of log levels
addLevelName(START, 'TEST-START')
addLevelName(END, 'TEST-END')
addLevelName(PASS, 'TEST-PASS')
addLevelName(KNOWN_FAIL, 'TEST-KNOWN-FAIL')
addLevelName(FAIL, 'TEST-UNEXPECTED-FAIL')
+addLevelName(CRASH, 'PROCESS-CRASH')
class MozLogger(_LoggerClass):
"""
@@ -50,6 +52,10 @@ def testKnownFail(self, message, *args, **kwargs):
"""Logs a test known fail message"""
self.log(KNOWN_FAIL, message, *args, **kwargs)
+ def processCrash(self, message, *args, **kwargs):
+ """Logs a process crash message"""
+ self.log(CRASH, message, *args, **kwargs)
+
class _MozFormatter(Formatter):
"""
MozFormatter class used to standardize formatting

0 comments on commit 137cf86

Please sign in to comment.