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)
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