changeset 462:a91adc95543d

less verbose logging
author Matt Johnston <matt@ucc.asn.au>
date Sat, 12 Jan 2013 21:54:55 +0800
parents 1eb68df9f8ab
children f2cca8062128 a40f30fad8f6
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: