Mercurial > ~darius > hgwebdir.cgi > beermon
comparison beermon.py @ 18:ff12367786a7
Bigger lo file.
author | darius |
---|---|
date | Tue, 29 Jan 2008 11:41:49 +0000 |
parents | 17449d52d5e5 |
children |
comparison
equal
deleted
inserted
replaced
17:d313f744e10f | 18:ff12367786a7 |
---|---|
2 | 2 |
3 ############################################################################ | 3 ############################################################################ |
4 # Monitor & control fermenter temperature | 4 # Monitor & control fermenter temperature |
5 # v1.0 | 5 # v1.0 |
6 # | 6 # |
7 # $Id: beermon.py,v 1.8 2007/10/23 01:00:19 darius Exp $ | 7 # $Id: beermon.py,v 1.9 2008/01/29 11:41:49 darius Exp $ |
8 # | 8 # |
9 # Depends on: Python 2.3 (I think) | 9 # Depends on: Python 2.3 (I think) |
10 # | 10 # |
11 ############################################################################ | 11 ############################################################################ |
12 # | 12 # |
46 # Default to warts and all logging | 46 # Default to warts and all logging |
47 log.setLevel(logging.DEBUG) | 47 log.setLevel(logging.DEBUG) |
48 | 48 |
49 # Log to this file | 49 # Log to this file |
50 logfile = logging.handlers.RotatingFileHandler(filename = "beermon.log", | 50 logfile = logging.handlers.RotatingFileHandler(filename = "beermon.log", |
51 maxBytes = 1000000, backupCount = 3) | 51 maxBytes = 5000000, backupCount = 3) |
52 | 52 |
53 # And stderr | 53 # And stderr |
54 logstderr = logging.StreamHandler() | 54 logstderr = logging.StreamHandler() |
55 | 55 |
56 # Format it nicely | 56 # Format it nicely |
74 if (not conf.has_section(s)): | 74 if (not conf.has_section(s)): |
75 log.debug("Mandatory '%s' section missing from config file, exiting" % (s)) | 75 log.debug("Mandatory '%s' section missing from config file, exiting" % (s)) |
76 sys.exit(1) | 76 sys.exit(1) |
77 | 77 |
78 log.debug("=== Initing ===") | 78 log.debug("=== Initing ===") |
79 log.debug("$Id: beermon.py,v 1.8 2007/10/23 01:00:19 darius Exp $") | 79 log.debug("$Id: beermon.py,v 1.9 2008/01/29 11:41:49 darius Exp $") |
80 | 80 |
81 try: | 81 try: |
82 m = MonitorDev.MonitorDev(log, conf) | 82 m = MonitorDev.MonitorDev(log, conf) |
83 c = Control.Control(log, m, conf) | 83 c = Control.Control(log, m, conf) |
84 except ConfigParser.NoOptionError, e: | 84 except ConfigParser.NoOptionError, e: |