comparison beermon.py @ 13:c029d2195d19

Put the log file in CWD.
author darius
date Tue, 23 Oct 2007 01:00:19 +0000
parents 483375ca5d10
children
comparison
equal deleted inserted replaced
12:9d5b291cfd01 13:c029d2195d19
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.7 2007/09/29 14:39:59 darius Exp $ 7 # $Id: beermon.py,v 1.8 2007/10/23 01:00:19 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 #
45 45
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 = "/tmp/beermon.log", 50 logfile = logging.handlers.RotatingFileHandler(filename = "beermon.log",
51 maxBytes = 1000000, backupCount = 3) 51 maxBytes = 1000000, backupCount = 3)
52 52
53 # And stderr 53 # And stderr
54 logstderr = logging.StreamHandler() 54 logstderr = logging.StreamHandler()
55 55
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.7 2007/09/29 14:39:59 darius Exp $") 79 log.debug("$Id: beermon.py,v 1.8 2007/10/23 01:00:19 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: