I'm having the same issue as Aaron, if anyone can give a few pointers. My ultimate goal is to create an audit log as described at http://owulff.blogspot.ch/2013/05/logging-in-apache-cxf-sts-enhanced.html. I've done the following (running CXF 2.7.12-SNAPSHOT on Tomcat 7.0.52):
1. Added a bunch of dependencies to my pom.xml file (log4j-api, log4j-core, log4j-1.2-api). The pom.xml file also includes dependencies on slf4j-log4j12 and slf4j-jdk14. 2. Added the file WEB-INF/classes/META-INF/cxf/org.apache.cxf.Logger 3. Added the file WEB-INF/classes/log4j.properties, configured pretty much as shown on the website above. 4. Added this bean definition (different than the article states, it looks like there was some refactoring in 2.7.8 that changed things a bit): <bean id="loggerListener" class="org.apache.cxf.sts.event.map.MapEventLogger" /> Everything still looks like it's going to catalina.out, and there aren't any additional files being created - I'd have expected the tomcat/logs/audit.log file to be created, at least. Does anyone have any ideas that can help out? Thanx, Stephen W. Chappell -----Original Message----- From: Aaron Titus [mailto:ati...@fwdco.com] Sent: Tuesday, June 17, 2014 6:16 PM To: users@cxf.apache.org Subject: cxf logging and log4j I've read the documentation on the CXF web site, and I've also done some searches and read a bunch of posts and I still cannot get this working or figure out what I am doing wrong. I have : 1. created the file WEB-INF/classes/META-INF/cxf/org.apache.cxf.logger and inside of it placed the content: org.apache.cxf.common.logging.Log4jLogger 2. I configured log4j to write the data to a file appender for all services using this logger definition: log4j.logger.org.apache.cxf.services=INFO, file1 where file1 is a file appender. For whatever reason, it seems to refuse to use log4j. It DOES produce logging however it goes into the main catalina.out log of tomcat and the file is empty. It appears that its still using standard java logging still. Any suggestions as to how I can can track down what is happening? For reference this is Apache Tomcat 7.0.42 and CXF 2.7.6, using a java 7 jdk.