Hi,
I have small application that is uploading pictures to another website via webservice. My current problem is, that Axis is logging the whole xml message (including the binary data of the picture!) via STDOUT and I can't seem to figure out, how to disable it.
My log4j settings for jboss (jboss-log4j.xml) includes an appender for normal STDOUT Info loggings, and I tried to disable axis with different category settings:
<appender name="STDLOG" class="org.jboss.logging.appender.RollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="${jboss.server.log.dir}/myapplication.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="5MB"/>
<param name="MaxBackupIndex" value="10"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/>
</layout>
</appender>
using this setting for STDOUT:
<category name="STDOUT">
<priority value="DEBUG"/>
<appender-ref ref="STDLOG"/>
</category>
I tried these category settings without any change in the result:
<category name="log4j.logger.org.apache.axis" additivity="false">
<priority value="ERROR"/>
</category>
<category name="org.apache.axis">
<priority value="ERROR"/>
</category>
Some sample log output looks like this:
2009-08-07 10:29:43,911 INFO [STDOUT] (http-127.0.0.1-8080-1) =======================================================
= Elapsed: 2190 milliseconds
= In message: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<addVehicleImage xmlns="urn:VMgrWebService">
<id xmlns="">APP-T4QKR3U</id>
<idType xmlns="">chiffre</idType>
<data xmlns="">9j4AAQSkZJRgABAQAAAQABAAD2wBDAAUDBAQEAwUEBAQFB
QUGBww0TDMnrXAfKlLjnNJZcciiAOtqk9NG99qhZJKuyYq5k3G
8P2bVSOpT7rVddRP2Z/yqidRuMMKaO2CXRQNWP2jfOo4S4Bo3W
removed rest of image data...
IBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGe1UqaZJJy0jSHPGQ
2009-08-07 10:29:43,927 INFO [STDOUT] (http-127.0.0.1-8080-1) Upload result: true for image mypicture.JPG
Update I checked the axis-1.4.jar and there is a file called simplelog.properties:
# Logging detail level,
# Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
org.apache.commons.logging.simplelog.defaultlog=info
Setting this to error within the jar, or as a category in jboss-log4j.xml didn't help at all.
Anyone any idea how I can turn off the Axis logging or at least set it to ERROR level?
Cheers
Frank