Mercurial > templog
changeset 163:bf2a17873ba1
less verbose logging
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 12 Jan 2013 21:54:55 +0800 |
parents | d73077e8cd67 |
children | 573f37091655 5d5424acfed0 |
files | py/fridge.py py/tempserver.py py/uploader.py |
diffstat | 3 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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:
--- 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: