##// END OF EJS Templates
httpconnection: improved logging formatting...
Augie Fackler -
r14375:436e5379 default
parent child Browse files
Show More
@@ -107,6 +107,7 b' class HTTPConnection(httpclient.HTTPConn'
107 107
108 108
109 109 _configuredlogging = False
110 LOGFMT = '%(levelname)s:%(name)s:%(lineno)d:%(message)s'
110 111 # Subclass BOTH of these because otherwise urllib2 "helpfully"
111 112 # reinserts them since it notices we don't include any subclasses of
112 113 # them.
@@ -122,7 +123,9 b' class http2handler(urllib2.HTTPHandler, '
122 123 _configuredlogging = True
123 124 logger = logging.getLogger('mercurial.httpclient')
124 125 logger.setLevel(getattr(logging, loglevel.upper()))
125 logger.addHandler(logging.StreamHandler())
126 handler = logging.StreamHandler()
127 handler.setFormatter(logging.Formatter(LOGFMT))
128 logger.addHandler(handler)
126 129
127 130 def close_all(self):
128 131 """Close and remove all connection objects being kept for reuse."""
General Comments 0
You need to be logged in to leave comments. Login now