-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rejuvenate log levels #7737
Rejuvenate log levels #7737
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the updated PR. I've added comments explaining why the levels are the way they are for those places where I feel that the tool has erred. If those are cleaned up, I'd be happy to merge the remaining changes :)
@@ -76,7 +76,7 @@ private static URL getServiceUrl() { | |||
.findFirst().orElseThrow(WebDriverException::new); | |||
|
|||
service = (EdgeDriverService) builder.withVerbose(true).withLogFile(logFile.toFile()).build(); | |||
LOG.info("edgedriver will log to " + logFile); | |||
LOG.fine("edgedriver will log to " + logFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is deliberately at this level.
@@ -80,7 +80,7 @@ public Connection(HttpClient client, String url) { | |||
serialized.put("sessionId", sessionId); | |||
} | |||
|
|||
LOG.info(JSON.toJson(serialized.build())); | |||
LOG.finest(JSON.toJson(serialized.build())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now this is experimental and deeply flaky. We left this at info
to make debugging user reports a lot easier.
@@ -40,7 +40,7 @@ public void build(String target) { | |||
if (target == null || "".equals(target)) { | |||
throw new IllegalStateException("No targets specified"); | |||
} | |||
log.info("\nBuilding " + target + " ..."); | |||
log.finest("\nBuilding " + target + " ..."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to let people know that the tooling is doing something during a build. Please leave.
@@ -110,7 +110,7 @@ public HttpResponse execute(HttpRequest req) throws UncheckedIOException { | |||
StringBuilder printableArgs = new StringBuilder("["); | |||
Joiner.on(", ").appendTo(printableArgs, args); | |||
printableArgs.append("]"); | |||
LOG.info(String.format("Command request: %s%s on session %s", cmd, printableArgs, sessionId)); | |||
LOG.finest(String.format("Command request: %s%s on session %s", cmd, printableArgs, sessionId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
info
was chosen deliberately to mirror the old behaviour that users expected.
@@ -58,7 +58,7 @@ public void start() { | |||
public void stop(Duration timeout) { | |||
Objects.requireNonNull(timeout); | |||
|
|||
LOG.info("Stopping " + getId()); | |||
LOG.warning("Stopping " + getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a warning. It's an informational message.
@@ -93,7 +93,7 @@ public Image pull(String name, String tag) { | |||
throw new WebDriverException("Unable to pull container: " + name); | |||
} | |||
|
|||
LOG.info(String.format("Pull of %s:%s complete", name, tag)); | |||
LOG.fine(String.format("Pull of %s:%s complete", name, tag)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for the pull takes a long time. This message informs the user that at least one of the images being pulled is available. Please leave.
@@ -70,7 +70,7 @@ private void addSystemDrivers( | |||
Capabilities caps = info.getCanonicalCapabilities(); | |||
builders.stream() | |||
.filter(builder -> builder.score(caps) > 0) | |||
.peek(builder -> LOG.info(String.format("Adding %s %d times", caps, info.getMaximumSimultaneousSessions()))) | |||
.peek(builder -> LOG.finest(String.format("Adding %s %d times", caps, info.getMaximumSimultaneousSessions()))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an informational message that allows someone to read the console output and understand how the grid node is configured. Please leave.
@@ -74,7 +74,7 @@ private Routable getRcHandler(ActiveSessions sessions) { | |||
getClass().getClassLoader()) | |||
.asSubclass(Routable.class); | |||
Constructor<? extends Routable> constructor = rcHandler.getConstructor(ActiveSessions.class); | |||
LOG.info("Bound legacy RC support"); | |||
LOG.finest("Bound legacy RC support"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This informational message is important to users. Please leave.
@@ -582,7 +582,7 @@ public void shouldPrioritizeHostsWithTheMostSlotsAvailableForASessionType() { | |||
); | |||
|
|||
Session firefoxSession = distributor.newSession(createRequest(firefoxPayload)).getSession(); | |||
LOG.info(String.format("Firefox Session %d assigned to %s", i, chromeSession.getUri())); | |||
LOG.finer(String.format("Firefox Session %d assigned to %s", i, chromeSession.getUri())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is in a test, I imagine that the choice of info
level was deliberate.
Thank you for your in-depth feedback! We will discuss it and improve this PR! |
Hi, I cleaned up all the transformations that you disagreed with. We appreciate your valuable feedback! |
If there's anything we can do before merging the request, please let us know. Thanks! |
@shs96c Is there anything else we can do to merge the request? |
930ad5d
to
6660595
Compare
The last two commits are only used to correct my email address to sign the CLA. |
I also updated the branch (685f9a9) because the PR was showing that "This branch is out-of-date with the base branch". |
@shs96c Can we get it merged? Are there any other things we can do? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for nudging, and apologies for the delay getting this into the tree. Thank you!
Thank you so much!! |
We appreciate your previous feedback and it's very helpful! Here's a reissue of #7170 with a new version of our tool. It takes a long time, sorry for waiting. The tool made many fewer transformations, however, there were a few that we removed that you did not agree with in the original PR. Again, we'd appreciate any feedback and are willing to make further changes if you wish to incorporate our PR into your project.
Settings
We have several analysis settings. We can vary these settings and rerun if you desire. The settings we are using in this pull request are:
Treat CONFIG levels as a category and not a traditional level, i.e., our tool ignores these log levels.
Never lower the logging level of logging statements within catch blocks.
Never lower the logging level of logging statements within if statements.
Never lower the logging level of logging statements containing certain (important) keywords.
Never raise the logging level of logging statements without particular keywords in their messages.
Avoid log wrapping by disregarding logging statements contained in if statements mentioning log levels.
The greatest number of commits from HEAD evaluated: 1000.
The head at the time of analysis was: a49fb60
X
in the preceding checkbox, I verify that I have signed the Contributor License Agreement