-
Notifications
You must be signed in to change notification settings - Fork 167
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
chore: More detailed logging for ignored handling #20007
Conversation
Make log more detailed for ignored invocation handle.
@@ -723,4 +724,14 @@ public static Router getRouter(HasElement component) { | |||
return router; | |||
} | |||
|
|||
public static Optional<Component> getRouteComponent(Component component) { |
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.
JavaDoc missing from a public API.
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.
added
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.
Maybe not for this PR, but we have a findAncestor(Class)
method in Component
class.
It could be useful to have also a findAncestor(Predicate<Component>)
for similar cases
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.
Perhaps if there comes up a need for this.
getLogger().info( | ||
"Ignored RPC for invocation handler '{}' from " | ||
+ "the client side for an {} node id='{}' {}", | ||
getClass().getName(), reason, node.getId(), targetInfo); |
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.
Both if-else blocks ends with mostly duplicate lines of code so it can be moved out side the if-else blocks in the end of the method and targetInfo
could be blank by default.
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.
done
unify log.
Quality Gate passedIssues Measures |
if (routeComponent.isPresent()) { | ||
targetInfo.append(" Route: ").append("'") | ||
.append(routeComponent.get().getClass() | ||
.getAnnotation(Route.class).value()) |
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.
I assume this will not work with dynamically registered routes using the RouteConfig?
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.
No that would need checking each parent against the registry which sounds like too much for a default info log message. Perhaps if running a trace log ...
* chore: More detailed logging for ignored handling Make log more detailed for ignored invocation handle. * Add javadoc unify log.
* chore: More detailed logging for ignored handling Make log more detailed for ignored invocation handle. * Add javadoc unify log.
Hi @caalador and @mshabarov, when i performed cherry-pick to this commit to 23.5, i have encountered the following issue. Can you take a look and pick it manually? |
Hi @caalador and @mshabarov, when i performed cherry-pick to this commit to 24.3, i have encountered the following issue. Can you take a look and pick it manually? |
* chore: More detailed logging for ignored handling Make log more detailed for ignored invocation handle. * Add javadoc unify log. # Conflicts: # flow-server/src/main/java/com/vaadin/flow/server/communication/rpc/AbstractRpcInvocationHandler.java
Make log more detailed for ignored invocation handle.
* chore: More detailed logging for ignored handling Make log more detailed for ignored invocation handle. * Add javadoc unify log.
Make log more detailed for
ignored invocation handle.