Commits

jordilin committed 53b4fee

mail setup in LogTailer module fix due to refactor and some other minor bug
fixes

Comments (0)

Files changed (5)

 ====================================
-xx/xx/xx release 2.6
+26/06/10 release 2.6
 ====================================
-- Warning keyword level included
+- "warning" keyword level included. Some 
+apps log "warning" instead of "warn".
 - filter notifications implemented
 - actions refactored into notifications 
 - pausemode refactored into modes
 - Mail notification provides SSL and 
 from now on the details will be specified in 
 a configuration file. Password will be introduced 
-during runtime to avoid leaving it in plain format.
+during runtime to avoid leaving it in plain ascii 
+format.
 - updated documentation
 
 ====================================
 ====================================
 release 1.1 
 ====================================
-- Provides installation (discutils)
+- Provides installation (distutils)
 - Emulates the same behaviour as tail 
 command when printing the log headers while
 tailing
 Basic functionality
 *********************************************
 
+This a quick setup to get you up and running. Please refer to the 
+documentation provided in the log4tailer project webpage at googlecode: 
+http://code.google.com/p/log4tailer/
+
 Installation:
 
 Untar and run :-)
 
 Silent Mode:
 
-log4tail -s fullpathToLogs
+log4tail -s -c configfile fullpathToLogs
 
 Silent Mode activates SMTP email action and alerts will be sent to 
 the address specified. Log4Tailer will request for the SMTP options 

log4tailer/ColorParser.py

 
 import re
 
+EQUIVALENT_LEVELS = {'WARNING' : 'WARN'}
+
 class ColorParser:
     '''tries to parse 
     defined levels in log4j'''
     def parse(self,line):
         isMatch = self.all.match(line)
         if isMatch:
-            return isMatch.group(1).upper()
+            level = isMatch.group(1).upper()
+            return EQUIVALENT_LEVELS.get(level, level)
         return ''
        

log4tailer/LogTailer.py

                 resume.notification_type(notification_type)
             elif notification_type == 'mail':
                 if not self.mailIsSetup():
-                    mailAction = setup_mail()
+                    mailAction = setup_mail(properties)
                     resume.setMailNotification(mailAction)
                 else:
                     resume.setMailNotification(self.mailAction)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import sys 
-try:
-    from setuptools import setup
-except:
-    pass
-from distutils.core import Command
+from distutils.core import setup, Command
 from unittest import TextTestRunner, TestLoader
 from glob import glob
 from os.path import isdir, splitext, basename, join as pjoin
 specific levels or lines. 
 '''
 
-__version__='2.4'
-
-try:
-    from distutils.core import setup
-except:
-    print "You need to install distutils python module"
-    sys.exit()
+__version__='2.6'
     
 class Test(Command):
     user_options = []
         pass
 
     def run(self):
+        self.run_command("clean")
         # mv log4tail module to log4tail
         shutil.copy('log4tail.py', 'log4tail')
         # check everything is ok
             print "I just run sdist and no dist??"
             sys.exit()
         self.run_command("dodoc")
-
-
+        
 def getDeployPackages():
     import glob
     log4tailerpackages = []