Do not disable Google HTTP Client logging for custom logger in Gradle#2357
Merged
Conversation
Member
Author
|
Travis seems to have completely stalled. Will try closing and reopening. |
| // https://github.com/GoogleContainerTools/jib/issues/2356 | ||
| if (System.getProperty("java.util.logging.config.file") == null) { | ||
| // Disables Google HTTP client logging. | ||
| java.util.logging.Logger.getLogger(HttpTransport.class.getName()).setLevel(Level.OFF); |
Member
There was a problem hiding this comment.
I'm not sure I understand how this solves the problem? Does gradle have it's own custom logger? And if we disable this, does this show that weird log information that we turned this off for?
Member
Author
There was a problem hiding this comment.
Perhaps my code comment is confusing.
To explain,
- Google HTTP Client's
HttpTransportclass usesJUL.Logger.getLogger(HttpTransport.class.getName())to log detailed network traffic. HttpTransportclass outputs detailed network traffic at INFO level.- In Gradle, increasing general verbosity to at least
--infoallows JUL to print INFO messages, as expected. - Therefore, running
gradle --infogenerates a lot of network traffic output. This is unnecessary clutter, so we universally disabled the JUL logging ofHttpTransportby callingsetLevel(Level.OFF)when we start a task. We still want this. - Therefore, our FAQ instructions to capture detailed networks logs using JUL (via
-Djava.util.logging.config.file) doesn't work.
Does this make it clear?
Member
There was a problem hiding this comment.
ooooh I see, yeah sounds good.
loosebazooka
approved these changes
Mar 26, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2356.
One of the ways to have a custom logger is through the system property
java.util.logging.config.file. If it's defined, don't disable Google HTTP Client logging.