• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

How to make Log4j2 take over apache.catalina logging?

 
Ranch Hand
Posts: 518
  • 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.


 
Sheriff
Posts: 4633
300
IntelliJ IDE Clojure 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.
 
Bartender
Posts: 20834
125
Android Eclipse IDE Tomcat Server Redhat Java 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!