Skip to content

Commit

Permalink
chore: Update browser details parse log output (#20852)
Browse files Browse the repository at this point in the history
Do not log the exception stack trace
when failing version parse.
Message contains alrready required
information and the result is -1
and the app stays running.

touches #20838
  • Loading branch information
caalador authored and vaadin-bot committed Jan 16, 2025
1 parent 84c908b commit 7d23cf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public class WebBrowser implements Serializable {
browserDetails = new BrowserDetails(agent) {
@Override
protected void log(String error, Exception e) {
LoggerFactory.getLogger(BrowserDetails.class).error(error,
e);
LoggerFactory.getLogger(BrowserDetails.class).error(error);
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ private int parseVersionPart(String versionString, String partName,
try {
return Integer.parseInt(versionString);
} catch (Exception e) {
log(partName + " version parsing failed for: " + versionString
+ "\nWith userAgent: " + userAgent, e);
log(partName + " version parsing failed for: \"" + versionString
+ "\"\nWith userAgent: " + userAgent, e);
}
return -1;
}
Expand Down

0 comments on commit 7d23cf5

Please sign in to comment.