# HG changeset patch # User Matt Johnston # Date 1357998895 -28800 # Node ID bf2a17873ba13086c1224d1ab012803e611a4f37 # Parent d73077e8cd67b9428c432171e9c0c38d952c7a36 less verbose logging diff -r d73077e8cd67 -r bf2a17873ba1 py/fridge.py --- a/py/fridge.py Fri Jan 11 23:41:56 2013 +0800 +++ b/py/fridge.py Sat Jan 12 21:54:55 2013 +0800 @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from utils import L,W,E,EX +from utils import L,W,E,EX,D import config import gevent @@ -101,7 +101,7 @@ overshoot = params.overshoot_factor \ * min(self.OVERSHOOT_MAX_DIV, on_time) \ / self.OVERSHOOT_MAX_DIV - L("on_time %(on_time)f, overshoot %(overshoot)f" % locals()) + D("on_time %(on_time)f, overshoot %(overshoot)f" % locals()) if wort is not None: if (wort - overshoot) < params.fridge_setpoint: @@ -123,7 +123,7 @@ turn_on = False if wort is not None: if wort >= wort_max: - L("Wort is too hot") + L("Wort is too hot %f, max %f" % (wort, wort_max)) turn_on = True else: # wort sensor is broken diff -r d73077e8cd67 -r bf2a17873ba1 py/tempserver.py --- a/py/tempserver.py Fri Jan 11 23:41:56 2013 +0800 +++ b/py/tempserver.py Sat Jan 12 21:54:55 2013 +0800 @@ -94,7 +94,7 @@ def setup_logging(): logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', - level=logging.DEBUG) + level=logging.INFO) def start(): with Tempserver() as server: diff -r d73077e8cd67 -r bf2a17873ba1 py/uploader.py --- a/py/uploader.py Fri Jan 11 23:41:56 2013 +0800 +++ b/py/uploader.py Sat Jan 12 21:54:55 2013 +0800 @@ -57,7 +57,7 @@ nreadings = len(readings) self.send(tosend) readings = None - L("Sent updated %d readings" % nreadings) + D("Sent updated %d readings" % nreadings) except urllib2.HTTPError, e: E("Error in uploader: %s" % str(e)) except Exception, e: