I have the following problem: Our webapp is running on tomcat 7 and I have an exception that I would like to filter from being written in the log files. The logger is defined in the logging.properties file,
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
followed by the directory, prefix and format.
Is there any possibility to stop tomcat from writing the exception in the file and onto the console? Because thats what happens right now. I know there are log filters for log4j, but I don't know anything for juli. The exception beeing thrown is:
org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [default] in context with path [] threw exception [javax.servlet.ServletException:
I would be glad if anyone could point me in the direction how to get this exception out of the logs.
Ideas I had so far:
JULI supports custom filters by extending java.util.logging.Filter .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.