• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make Log4j2 take over apache.catalina logging?  RSS feed

 
tangara goh
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi expert,

I run my web app again and I saw the following lines appear :



I'd like to know how to make Log4j2 logger take over the logging and disabled the catalina logging (not sure if they can co-exist though )

Any advice is greatly appreciated.


 
Tim Cooke
Marshal
Posts: 3961
234
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Catalina output you see there is the log output from the Tomcat application. I'm not aware of a way, or even a need, to mess with the way Tomcat logs its output.
 
Tim Holloway
Bartender
Posts: 18778
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something that the Tomcat docs do not make clear. Each webapp is completely and totally responsible for its own logging using whatever log framework it wants.

Tomcat also does logging, but it only logs Tomcat log messages and knows nothing about what the webapps are doing.

You can construct a custom Tomcat that uses log4j, but the standard image that ships uses juli logging. For details, see the Tomcat docs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!