Changeset 15799 in josm
- Timestamp:
- 2020-01-30T11:43:18+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/HttpClient.java
r15742 r15799 140 140 boolean successfulConnection = false; 141 141 try { 142 Stopwatch stopwatch = Stopwatch.createStarted(); 142 143 ConnectionResponse cr; 143 144 try { 144 145 cr = performConnection(); 145 146 final boolean hasReason = reasonForRequest != null && !reasonForRequest.isEmpty(); 146 logRequest("{0} {1}{2} -> {3} {4} {5}",147 logRequest("{0} {1}{2} -> {3} {4} ({5}{6})", 147 148 getRequestMethod(), getURL(), hasReason ? (" (" + reasonForRequest + ')') : "", 148 149 cr.getResponseVersion(), cr.getResponseCode(), 150 stopwatch, 149 151 cr.getContentLengthLong() > 0 150 ? (" (" + Utils.getSizeString(cr.getContentLengthLong(), Locale.getDefault()) + ')')152 ? ("; " + Utils.getSizeString(cr.getContentLengthLong(), Locale.getDefault())) 151 153 : "" 152 154 ); … … 162 164 } 163 165 } catch (IOException | RuntimeException e) { 164 logRequest("{0} {1} -> !!! ", requestMethod, url);166 logRequest("{0} {1} -> !!! ({2})", requestMethod, url, stopwatch); 165 167 Logging.warn(e); 166 168 //noinspection ThrowableResultOfMethodCallIgnored
Note:
See TracChangeset
for help on using the changeset viewer.