Filtering notifications to output a bit less
authorepage <eopage@byu.net>
Sat, 9 Jan 2010 00:38:03 +0000 (00:38 +0000)
committerepage <eopage@byu.net>
Sat, 9 Jan 2010 00:38:03 +0000 (00:38 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@617 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

src/alarm_notify.py
src/examples/log_notifier.py
src/examples/sound_notifier.py

index 6b4f434..7b7e93f 100755 (executable)
@@ -154,7 +154,7 @@ def notify_on_change():
 
 
 if __name__ == "__main__":
-       logging.basicConfig(level=logging.DEBUG, filename=constants._notifier_logpath_)
+       logging.basicConfig(level=logging.WARNING, filename=constants._notifier_logpath_)
        logging.info("Notifier %s-%s" % (constants.__version__, constants.__build__))
        logging.info("OS: %s" % (os.uname()[0], ))
        logging.info("Kernel: %s (%s) for %s" % os.uname()[2:])
index 6e63b5d..2318549 100644 (file)
@@ -16,7 +16,7 @@ import alarm_notify
 
 def notify_on_change():
        filename = "%s/notification.log" % constants._data_path_
-       with open(filename, "a") as file:
+       with open(constants._notifier_logpath_, "a") as file:
                file.write("Notification: %r\n" % (datetime.datetime.now(), ))
 
                config = ConfigParser.SafeConfigParser()
index 97cf106..c31e413 100644 (file)
@@ -36,7 +36,7 @@ def notify_on_change():
 
 
 if __name__ == "__main__":
-       logging.basicConfig(level=logging.DEBUG, filename=constants._notifier_logpath_)
+       logging.basicConfig(level=logging.WARNING, filename=constants._notifier_logpath_)
        logging.info("Sound Notifier %s-%s" % (constants.__version__, constants.__build__))
        logging.info("OS: %s" % (os.uname()[0], ))
        logging.info("Kernel: %s (%s) for %s" % os.uname()[2:])