better log messages
authorKonstantin Stepanov <kstep@p-nut.info>
Wed, 15 Dec 2010 05:43:53 +0000 (07:43 +0200)
committerKonstantin Stepanov <kstep@p-nut.info>
Wed, 15 Dec 2010 05:43:53 +0000 (07:43 +0200)
dbuscron.py
dbuscron/command.py

index 89d3130..4588f61 100755 (executable)
@@ -50,16 +50,16 @@ if __name__ == '__main__':
             matcher = DbusRule(**rule)
             command = Command(cmd)
             matcher.register()
-            log.info('%s %s' % (matcher, command))
+            log('rule parsed', matcher, command)
             commands.add(matcher, command)
 
     load_config(crontab)
 
     def reload_config_on_signal(sig_no, stack):
-        log.info('Signal #%d received: reloading config...' % (sig_no))
+        log('Signal #%d received: reloading config...' % (sig_no))
         commands.clear()
         load_config(crontab)
-        log.info('Done config reloading.')
+        log('Done config reloading.')
 
     import signal
     signal.signal(signal.SIGHUP, reload_config_on_signal)
index 790ccf0..74a1c46 100644 (file)
@@ -72,7 +72,7 @@ class Commands(object):
     def handler(self, bus, message):
         for rule, command in self.__commands.iteritems():
             if rule.match(bus, message):
-                log.info('matched %s %s' % (rule, command))
+                log('rule matched', rule, command)
                 command(bus, message, self.__environ)
                 return