Rev 4909: Clean up the logging slightly. in http://bazaar.launchpad.net/~jameinel/bzr/2.1-client-reconnect-819604

John Arbash Meinel john at arbash-meinel.com
Mon Oct 10 12:33:48 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.1-client-reconnect-819604

------------------------------------------------------------
revno: 4909
revision-id: john at arbash-meinel.com-20111010123331-9wilgl2mdut5fiw6
parent: john at arbash-meinel.com-20111010120648-h5er54hkfzmowt3j
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-client-reconnect-819604
timestamp: Mon 2011-10-10 14:33:31 +0200
message:
  Clean up the logging slightly.
  
  It is nicer to log the 'why' for the exception before we actually log the traceback.
  
  At least from how I was reading the logs and trying to understand it.
-------------- next part --------------
=== modified file 'bzrlib/smart/client.py'
--- a/bzrlib/smart/client.py	2011-10-08 10:23:15 +0000
+++ b/bzrlib/smart/client.py	2011-10-10 12:33:31 +0000
@@ -241,9 +241,9 @@
                 # We can't restart a body_stream that has been partially
                 # consumed, so we don't retry.
                 raise
+            trace.warning('ConnectionReset calling %r, retrying'
+                          % (self.method,))
             trace.log_exception_quietly()
-            trace.warning('ConnectionReset calling %s, retrying'
-                          % (self.method,))
             encoder, response_handler = self._construct_protocol(
                 protocol_version)
             self._send_no_retry(encoder)



More information about the bazaar-commits mailing list