Commits

jordilin committed d2b0f38

renamed parseConfig for parse_config

  • Participants
  • Parent commits 3beab49

Comments (0)

Files changed (7)

File log4client/src/log4tailer/LogColors.py

         self.reset = self.color.reset
         self.backgroundemph = self.color.backgroundemph
 
-    def parseConfig(self, properties):
+    def parse_config(self, properties):
         for key in properties.get_keys():
             code = self.color.getCode(properties.get_value(key))
             if not code:

File log4client/src/log4tailer/Message.py

         self.isOwnTarget = None
         self.isTarget = None
         if properties:
-            self.pauseMode.parseConfig(properties)
+            self.pauseMode.parse_config(properties)
    
     def isATarget(self):
         if self.isTarget or self.isOwnTarget:

File log4client/src/log4tailer/__init__.py

     'alt_config': os.path.expanduser('~/.log4tailer'),
     'post' : False}
 
-def parseConfig(configfile):
+def parse_config(configfile):
     properties = Properties.Property(configfile)
     properties.parse_properties()
     return properties
         sys.exit(0)
     if os.path.exists(config):
         logger.info("Configuration file [%s] found" % config)
-        defaults['properties'] = parseConfig(config)
-        logcolors.parseConfig(defaults['properties'])
+        defaults['properties'] = parse_config(config)
+        logcolors.parse_config(defaults['properties'])
     properties = defaults['properties']
     if options.pause:
         defaults['pause'] = int(options.pause)

File log4client/src/log4tailer/modes.py

     def getPause(self,level):
         return self.defaultLevelPauses[level]
 
-    def parseConfig(self,properties):
+    def parse_config(self,properties):
         pauseKeys = ['pausedebug','pauseinfo','pausewarn','pauseerror','pausefatal',
                      'pausecritical','pausetarget']
         for pauseKey in pauseKeys:

File log4client/src/log4tailer/notifications.py

         if properties:
             notification = properties.get_value(
                     Inactivity.InactivityActionNotification)
-            self.logColors.parseConfig(properties)
+            self.logColors.parse_config(properties)
         self.notification = notification or 'print'
         self.alerted = False
         self.alerting_msg = 'Inactivity action detected'

File log4client/tests/test_colors.py

     
     def testLogColorsParseConfig(self):
         logcolors = LogColors()
-        logcolors.parseConfig(PropertiesMock())
+        logcolors.parse_config(PropertiesMock())
         self.assertFalse(hasattr(logcolors,'one'))
         self.assertFalse(hasattr(logcolors,'two'))
 
         level = 'FATAL'
         sys.stdout = Writer()
         logcolors = LogColors()
-        logcolors.parseConfig(PropertiesBackGround())
+        logcolors.parse_config(PropertiesBackGround())
         termcolors = TermColorCodes()
         message = Message(logcolors)
         notifier = notifications.Print()
         sys.stdout = Writer()
         logcolors = LogColors()
         termcolors = TermColorCodes()
-        logcolors.parseConfig(PropertiesBackGround())
+        logcolors.parse_config(PropertiesBackGround())
         message = Message(logcolors)
         notifier = notifications.Print()
         anylog = Log('out.log')

File log4client/tests/test_pauseMode.py

         pauseMode = modes.PauseMode()
         properties = Property(self.configfile)
         properties.parse_properties()
-        pauseMode.parseConfig(properties)
+        pauseMode.parse_config(properties)
         for key,value in self.overridenLevelPauses.iteritems():
             key = key.split('pause')[1]
             self.assertEqual(value,pauseMode.getPause(key))