Commits

jordilin committed 2f0885e

Add TRACE level to reporting.

Comments (0)

Files changed (2)

log4client/src/log4tailer/reporting.py

         self.logsReport = {}
         for log in arrayLog:
             self.logsReport[log.path] = {'TARGET': 0,
+                                         'TRACE': 0,
                                          'DEBUG': 0,
                                          'INFO': 0,
                                          'WARN': 0,
                                          'FATAL': [],
                                          'CRITICAL': []}
 
-        self.nonTimeStamped = ['DEBUG', 'INFO', 'WARN', 'TARGET']
+        self.nonTimeStamped = ['TRACE', 'DEBUG', 'INFO', 'WARN', 'TARGET']
         self.orderReport = ['CRITICAL', 'FATAL', 'ERROR', 'WARN', 'INFO',
-                'DEBUG', 'TARGET', 'OTHERS']
+                'DEBUG', 'TRACE', 'TARGET', 'OTHERS']
         self.mailAction = None
         self.notificationType = PRINT
         self.gapTime = 3600

log4client/tests/test_resume.py

                               'error> not so wrong',
                               'warn> be careful',
                               'debug> looking behind the scenes',
+                              'trace> more info than debug',
                               'info> the app is running',
                               'fatal> the app is in really bad state']
 
                               'error> not so wrong',
                               'warn> be careful',
                               'debug> looking behind the scenes',
+                              'trace> more info than debug',
                               'info> the app is running',
                               'fatal> the app is in really bad state']
 
         reportlength = len(fh.readlines())
         fh.close()
         os.remove(reportfileFullPath)
-        self.assertEquals(22, reportlength)
+        self.assertEquals(24, reportlength)
         os.remove('aconfig')
 
     def testShouldReportOtherNotifications(self):
         logs = [log1, log2]
         resume = reporting.Resume(logs)
         reports = {'TARGET': 0,
+             'TRACE': 0,
              'DEBUG': 0,
              'INFO': 0,
              'WARN': 0,
         resume.timer.inactivityEllapsed = overgap
         resume.update(message, log)
         expected = {'TARGET': 0,
+             'TRACE': 0,
              'DEBUG': 0,
              'INFO': 0,
              'WARN': 0,