Show More
@@ -107,6 +107,7 b' class HTTPConnection(httpclient.HTTPConn' | |||||
107 |
|
107 | |||
108 |
|
108 | |||
109 | _configuredlogging = False |
|
109 | _configuredlogging = False | |
|
110 | LOGFMT = '%(levelname)s:%(name)s:%(lineno)d:%(message)s' | |||
110 | # Subclass BOTH of these because otherwise urllib2 "helpfully" |
|
111 | # Subclass BOTH of these because otherwise urllib2 "helpfully" | |
111 | # reinserts them since it notices we don't include any subclasses of |
|
112 | # reinserts them since it notices we don't include any subclasses of | |
112 | # them. |
|
113 | # them. | |
@@ -122,7 +123,9 b' class http2handler(urllib2.HTTPHandler, ' | |||||
122 | _configuredlogging = True |
|
123 | _configuredlogging = True | |
123 | logger = logging.getLogger('mercurial.httpclient') |
|
124 | logger = logging.getLogger('mercurial.httpclient') | |
124 | logger.setLevel(getattr(logging, loglevel.upper())) |
|
125 | logger.setLevel(getattr(logging, loglevel.upper())) | |
125 |
|
|
126 | handler = logging.StreamHandler() | |
|
127 | handler.setFormatter(logging.Formatter(LOGFMT)) | |||
|
128 | logger.addHandler(handler) | |||
126 |
|
129 | |||
127 | def close_all(self): |
|
130 | def close_all(self): | |
128 | """Close and remove all connection objects being kept for reuse.""" |
|
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