[PATCH 1 of 2] httpconnection: improved logging formatting
durin42 at gmail.com
Tue May 17 13:36:50 CDT 2011
# HG changeset patch
# User Augie Fackler <durin42 at gmail.com>
# Date 1305583185 18000
# Node ID 8689945a9491d807e3a7154c544166a82423efa3
# Parent bf85c2639700e7e56c01afaf7e33e818ec922919
httpconnection: improved logging formatting
I had to use this debugging output for the first time recently when
looking for a problem, and the lack of good formatting made things
diff --git a/mercurial/httpconnection.py b/mercurial/httpconnection.py
@@ -107,6 +107,7 @@
_configuredlogging = False
+LOGFMT = '%(levelname)s:%(name)s:%(lineno)d:%(message)s'
# Subclass BOTH of these because otherwise urllib2 "helpfully"
# reinserts them since it notices we don't include any subclasses of
@@ -122,7 +123,9 @@
_configuredlogging = True
logger = logging.getLogger('mercurial.httpclient')
+ handler = logging.StreamHandler()
"""Close and remove all connection objects being kept for reuse."""
More information about the Mercurial-devel