From: James Andrewartha Date: Sun, 25 Oct 2009 13:17:52 +0000 (+0800) Subject: remove no longer needed logging X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=3daa805b2cbeb88adf5130028399c052440de64e;p=uccdoor.git remove no longer needed logging --- diff --git a/server.py b/server.py index 11fe9de..91fa630 100755 --- a/server.py +++ b/server.py @@ -19,38 +19,29 @@ def check_LAT_service(servicename, retries=3): rfh, wfh = latclient.get_fh() results = {'error': retries, 'closed': retries, 'open': retries} test_string = "got wombles?" - syslog.syslog(142, "start check_LAT_service:" + servicename) # Only return after n(retries) consistent results, although not necessarily # in order. This means we poll at least (retries) and up to (retries ** 2) times. # This is mtearle's original code. No idea if it's the Right Thing. while True: - syslog.syslog(142, "running c_L_s loop:" + servicename) try: wfh.write(test_string) wfh.flush() except: results['error'] -= 1 - syslog.syslog(142, "c_L_s write error:" + servicename) if results['error'] == 0: return -1 continue - syslog.syslog(142, "c_Ls written data to " + servicename) rr, wr, er = select([rfh], [], [], 3.0) if rfh not in rr: results['open'] -= 1 if results['open'] == 0: return 1 - syslog.syslog(142, "c_L_s open: " + servicename) continue - syslog.syslog(142, "c_L_s select() succeeded: " + servicename) recv = rfh.read(len(test_string)) - syslog.syslog(142, "c_L_s read() succeeded: " + servicename) if recv <> test_string: - syslog.syslog(142, "c_L_s not the data we sent " + servicename) results['error'] -= 1 if results['error'] == 0: return -1 continue results['closed'] -= 1 - syslog.syslog(142, "c_L_s closed " + servicename) if results['closed'] == 0: return 0 class Door(dbus.service.Object): @@ -80,9 +71,8 @@ class Door(dbus.service.Object): except: newstatus = -1 - syslog.syslog(142, "status, newstatus for %s is %i, %i" % (self.service, self.status, newstatus)) if newstatus != self.status: - syslog.syslog(142, "status changed detected for %s" % self.service) + syslog.syslog(142, "status changed detected for %s; status: %i, newstatus: %i" % self.service, self.status, newstatus) self.status = newstatus # emit signal self.status_changed(newstatus)