zephyr_mirror: Print out the message before logging it.

This should make debugging easier.

(imported from commit 101bab269b98ee5c2f56780d97e6b94c0887a306)
This commit is contained in:
Tim Abbott 2012-10-10 16:33:21 -04:00
parent 9cb4e253f4
commit 9915ebf3ed

View file

@ -161,11 +161,11 @@ def process_loop(log):
'zsig' : zsig, # logged here but not used by app
'content' : body }
print "%s: received a message on %s/%s from %s..." % \
(datetime.datetime.now(), notice.cls, notice.instance, notice.sender)
log.write(simplejson.dumps(zeph) + '\n')
log.flush()
print "%s: received a message on %s/%s from %s..." % \
(datetime.datetime.now(), notice.cls, notice.instance, notice.sender)
res = send_humbug(zeph)
if res.get("result") != "success":
print >>sys.stderr, 'Error relaying zephyr'