8000 Merge pull request #382 from mahiuchun/dev · monical1/google-http-java-client@395bb17 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 395bb17

Browse files
authored
Merge pull request googleapis#382 from mahiuchun/dev
Log exception only when logging is enabled
2 parents 7b0c01c + 5f40e34 commit 395bb17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,9 @@ public HttpResponse execute() throws IOException {
999999
}
10001000
// Save the exception in case the retries do not work and we need to re-throw it later.
10011001
executeException = e;
1002-
logger.log(Level.WARNING, "exception thrown while executing request", e);
1002+
if (loggable) {
1003+
logger.log(Level.WARNING, "exception thrown while executing request", e);
1004+
}
10031005
}
10041006

10051007
// Flag used to indicate if an exception is thrown before the response has completed

0 commit comments

Comments
 (0)
0