Skip to content

Commit c3b7249

Browse files
authored
Avoid capturing Request in LogRecord parameters (#694)
1 parent 9ee6d61 commit c3b7249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/hudson/remoting/Request.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ public void run() {
393393
// this means the caller will block forever
394394
if (e instanceof ChannelClosedException && !logger.isLoggable(Level.FINE)) {
395395
// TODO if this is from CloseCommand reduce level to FINE
396-
logger.log(Level.INFO, "Failed to send back a reply to the request {0}: {1}", new Object[] {Request.this, e});
396+
logger.info(() -> "Failed to send back a reply to the request " + Request.this + ": " + e);
397397
} else {
398398
logger.log(Level.WARNING, e, () -> "Failed to send back a reply to the request " + Request.this);
399399
}

0 commit comments

Comments
 (0)