Home > OS >  Apache Tomcat stop one of two catalina files
Apache Tomcat stop one of two catalina files

Time:08-08

I have Apache Tomcat 9, not sure why I have two files with the name "catalina".

catalina.log
catalina.out

How can I disable the catalina.log file?

2nd question, I have another log file called "localhost_access_log.2022-08-05.txt" I want that to be in "localhost_access_log.txt" format without the date.

Please help me to achieve the above two queries.

I have Apache Tomcat 9 which is deployed in OS RHEL 7.9.

CodePudding user response:

You need to change the Tomcat logging configuration. See the documentation at https://tomcat.apache.org/tomcat-9.0-doc/logging.html.

Especially the Considerations for production usage at the end of the page mention:

Consider removing ConsoleHandler from configuration. By default (thanks to the .handlers setting) logging goes both to a FileHandler and to a ConsoleHandler. The output of the latter one is usually captured into a file, such as catalina.out. Thus you end up with two copies of the same messages.

  • Related