Skip to content

Commit

Permalink
Avoid capturing Request in LogRecord parameters (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick authored Oct 25, 2023
1 parent 9ee6d61 commit c3b7249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hudson/remoting/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public void run() {
// this means the caller will block forever
if (e instanceof ChannelClosedException && !logger.isLoggable(Level.FINE)) {
// TODO if this is from CloseCommand reduce level to FINE
logger.log(Level.INFO, "Failed to send back a reply to the request {0}: {1}", new Object[] {Request.this, e});
logger.info(() -> "Failed to send back a reply to the request " + Request.this + ": " + e);
} else {
logger.log(Level.WARNING, e, () -> "Failed to send back a reply to the request " + Request.this);
}
Expand Down

0 comments on commit c3b7249

Please sign in to comment.