-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
BugFor general bugs on Jetty sideFor general bugs on Jetty side
Description
Jetty version(s) 12.1.4
Jetty Environment core
HTTP version Not relevant for this issue
Java version/vendor (use: java -version) openjdk version "25.0.1" 2025-10-21 LTS
OS type/version Windows 11 25H2
Description
There were a lot of invalid logger usages that were fixed in jetty 12.1.4 (see #13883 and #13884). However, I found a function that is still using invalid loggers in class org.eclipse.jetty.util.thread.ThreadPool:
static boolean reject(Runnable task, Throwable cause)
{
Logger log = LoggerFactory.getLogger(ThreadPool.class);
if (log.isDebugEnabled())
log.debug("rejected {}", task, cause);
if (task instanceof Closeable closeable)
{
try
{
closeable.close();
}
catch (Throwable t)
{
log.warn("Unable to close rejected job: {}", task, t);
ExceptionUtil.addSuppressedIfNotAssociated(cause, t);
}
return true;
}
return false;
}Both loggers in this function have only one parameter in the message but two are provided (because the exception counts as a parameter).
It produces this warning when debug logs are enabled:
WARN found 1 argument placeholders, but provided 2 for pattern `rejected {}`
How to reproduce?
- Use log4j-slf4j2-impl SLF4J backend
- Enable debug logs for org.eclipse.jetty
- Not sure exactly how to get into that method. In my application, it seems to happen most of the times when jetty is shutting down.
Metadata
Metadata
Assignees
Labels
BugFor general bugs on Jetty sideFor general bugs on Jetty side
Type
Projects
Status
🏗 In progress