https://bz.apache.org/bugzilla/show_bug.cgi?id=63879
Bug ID: 63879
Summary: Unessesary log noise under DEBUG
Product: Tomcat 9
Version: 9.0.21
Hardware: Macintosh
Status: NEW
Severity: trivial
Priority: P2
Component: Util
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: -----
Introduced in tomcat 9.0.21 there was a log DEBUG message introduced in
org.apache.tomcat.util.net.NioEndpoint.NioSocketWrapper#doClose
```
@Override
protected void doClose() {
if (log.isDebugEnabled()) {
log.debug("Calling [" + getEndpoint() + "].closeSocket([" +
this + "])", new Exception());
}
```
Adding log message with the exception like this causes noise to clients and
could be alarming here is a sample output from the clients perspective:
[10-24-19 10:29:44.066] [http-nio-8080-exec-8] DEBUG
o.a.tomcat.util.net.NioEndpoint - Calling
[org.apache.tomcat.util.net.NioEndpoint@7073a1db].closeSocket([org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@5e5a7392:org.apache.tomcat.util.net.NioChannel@5fa6a12b:java.nio.channels.SocketChannel[connected
local=/0:0:0:0:0:0:0:1:8080 remote=/0:0:0:0:0:0:0:1:57802]])
java.lang.Exception: null
at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doClose(NioEndpoint.java:1163)
~[tomcat-embed-core-9.0.27.jar:9.0.27]
at
org.apache.tomcat.util.net.SocketWrapperBase.close(SocketWrapperBase.java:402)
~[tomcat-embed-core-9.0.27.jar:9.0.27]
at
org.apache.tomcat.util.net.NioEndpoint$Poller.cancelledKey(NioEndpoint.java:665)
~[tomcat-embed-core-9.0.27.jar:9.0.27]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1582)
~[tomcat-embed-core-9.0.27.jar:9.0.27]
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
~[tomcat-embed-core-9.0.27.jar:9.0.27]
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
~[na:na]
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
~[na:na]
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
~[tomcat-embed-core-9.0.27.jar:9.0.27]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
I think it would be best to remove the Exception from the debug statement or if
the stack trace is needed to output this in a better manner.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]