Log4j2 not working with tomcat and JULI #2092
-
I have a web application(WAR file) which is using log4j2 configuration. My
My tomcat 9.0.36 is configured to use default java logger with default configuration. I don't want to replace log4j2 as default logger in tomcat. Let tomcat use JULI only. I just want the log4j in web application(war) to create a log file at Tomcat JULI config -
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 20 replies
-
Don't use relative paths like Try using |
Beta Was this translation helpful? Give feedback.
-
Remark: I maintain a small set of classes that improve the support of Log4j API and Log4j Core in Tomcat (cf. copernik-eu/log4j-plugins). The main problem with Log4j API + Tomcat is that Tomcat has a very primitive classloader configuration. If a webapp comes with I have used |
Beta Was this translation helpful? Give feedback.
Finally this worked. Something is wrong with
LoggerContext
so I had to set it manually.URI is also not coming as null and giving the proper path of file