0

When a client has our web application loaded, a particular webservice is called every 5 seconds and it returns a very large piece of data. This floods the catalina.out log with redundant info which makes it hard to find information about other webservices.

Is there a way to exclude logging for this particular webservice or route it to a different file? Or exclude showing cookies from logs? Or other header information?

Currently using log4j2 instead of JULI, but I can switch back if solution requires.

Thanks for help in advance :)

1 Answers1

0

So, it turns out my understanding of how catalina works was incorrect. I assumed tomcat was the one logging our webservice calls to catalina, but it was actually my own logger from within the java app (i did not know this, coming onto a project).

So my solution for this problem has to do with org.glassfish.jersey.filter.LoggingFilter

Below is a link of an explanation from Tim Holloway on code ranch https://coderanch.com/t/670442/Tomcat/Tomcat-catalina-flooded-custom-logging#3132818

I have still not come up with a true solution to this problem, but I have found that you can make a custom LoggingFilter like below

http://howtodoinjava.com/jersey/jersey-custom-logging-request-and-response-entities-using-filter/

hope this helps someone else :)