gradle-tomcat-plugin
gradle-tomcat-plugin copied to clipboard
Hide logs after closing Tomcat
I have logs in terminal during executing tomcatStop. How can I hide it?
The web application [/] appears to have started a thread named [com.google.inject.internal.util.$Finalizer] but has failed to stop it. This is very likely to create a memory leak. The web application [/] appears to have started a thread named [Thread-8] but has failed to stop it. This is very likely to create a memory leak. The web application [/] appears to have started a thread named [Thread-9] but has failed to stop it. This is very likely to create a memory leak. The web application [/] appears to have started a thread named [Thread-10] but has failed to stop it. This is very likely to create a memory leak. The web application [/] appears to have started a thread named [Thread-11] but has failed to stop it. This is very likely to create a memory leak. The web application [/] appears to have started a thread named [cluster-ClusterId{value='5892f28c04c5ef1491e92154', description='null'}-10.0.1.19:27017] but has failed to stop it. This is very likely to create a memory leak. The web application [/] appears to have started a thread named [pool-2-thread-1] but has failed to stop it. This is very likely to create a memory leak. The web application [/] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. The web application [/] appears to have started a thread named [cluster-ClusterId{value='5892f28d04c5ef1491e92155', description='null'}-10.0.1.19:27017] but has failed to stop it. This is very likely to create a memory leak. The web application [/] appears to have started a thread named [pool-3-thread-1] but has failed to stop it. This is very likely to create a memory leak. The web application [/] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6d15ff32]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@26958a4b]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
As I can see in https://github.com/bmuschko/gradle-tomcat-plugin/blob/master/plugin/src/main/groovy/com/bmuschko/gradle/tomcat/tasks/TomcatStop.groovy we couldn't configure it.
That's correct. I don't think you can at the moment. The Tomcat embedded container implementation simply writes out to the console I believe. My guess is that we could make it configurable. Please provide a pull request if you are interested. The solution should generally configure the logging coming from Tomcat - not just the output that is triggered by stopping embedded Tomcat.
Another option you have already at the moment is to simply write the logs to an output file.
Closing as issue got no traction.