Configuring logging levels
In the /etc
folder of the CXF distribution there is a sample Java SE logging.properties
file you can use to configure logging. For example, if you want to change the console logging level from WARNING
to FINE
, you need to update two properties in this logging.properties
file as below:
.level= FINE
java.util.logging.ConsoleHandler.level = FINE
N.B: If you want to change FINE
to other LEVEL, just change FINE
to others
Once this is done, you will need to set the -Djava.util.logging.config.file property to the location of the logging.properties
file. As an example, the Ant target below has this property set:
<target name="runClient">
<java classname="client.WSClient" fork="true">
<classpath>
<pathelement location="${build.classes.dir}"/>
<fileset dir="${env.CXF_HOME}/lib">
<include name="*.jar"/>
</fileset>
</classpath>
<jvmarg value="-Djava.util.logging.config.file=/usr/myclientapp/logging.properties"/>
</java>
</target>
Alternatively, for SOAP clients, you can modify the Java-wide logging.properties
file in the JDK_HOME/jre/lib
folder, or for servlet-hosted web service providers, placing a logging.properties
file in the WEB-INF/classes
folder (see here for more details.)
Resource Link:
- http://cxf.apache.org/docs/general-cxf-logging.html
To remove cxf logging just comment out or remove code the following
code from your cxf configuration xml file.
<cxf:bus>
<cxf:features>
<cxf:logging></cxf:logging>
</cxf:features>
</cxf:bus>
Turn off extra logging:
To turn off extra logging, change the org.apache.cxf
Logger level to ERROR
. Add this line to log4j.properties
:
log4j.logger.org.apache.cxf=ERROR
Resource Link:
How can I turn off extra logging?