Skip to content

Commit

Permalink
Merge pull request #85 from scop/logging
Browse files Browse the repository at this point in the history
Let logging expand messages on demand
  • Loading branch information
jasonrbriggs committed Jan 18, 2016
2 parents c07bd2f + 601e17a commit 4058051
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stomp/adapter/multicast.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def process_frame(self, f, frame_str):
receipt_frame = Frame('RECEIPT', {'receipt-id': f.headers['receipt']})
lines = convert_frame_to_lines(receipt_frame)
self.send(encode(pack(lines)))
log.debug("Received frame: %r, headers=%r, body=%r" % (f.cmd, f.headers, f.body))
log.debug("Received frame: %r, headers=%r, body=%r", f.cmd, f.headers, f.body)

def stop(self):
self.running = False
Expand Down
2 changes: 1 addition & 1 deletion stomp/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def __heartbeat_loop(self):
log.debug("Lost connection, unable to send heartbeat")
except Exception:
_, e, _ = sys.exc_info()
log.debug("Unable to send heartbeat, due to: %s" % e)
log.debug("Unable to send heartbeat, due to: %s", e)

if self.receive_sleep != 0:
diff_receive = now - self.received_heartbeat
Expand Down
2 changes: 1 addition & 1 deletion stomp/test/s11_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def testheartbeat_timeout(self):
server.running = False
except Exception:
_, e, _ = sys.exc_info()
log.error("Error: %s" % e)
log.error("Error: %s", e)
finally:
server.stop()

Expand Down
2 changes: 1 addition & 1 deletion stomp/test/ss_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_disconnect(self):
_, e, _ = sys.exc_info()
if e.__class__ == AssertionError:
self.fail(str(e))
log.debug('stopping conn after expected exception %s' % e)
log.debug('stopping conn after expected exception %s', e)
# lost connection, now restart the server
try:
conn.disconnect(receipt=None)
Expand Down

0 comments on commit 4058051

Please sign in to comment.