title: Disable Axis log4j logging in jboss
body: <p>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.</p>
  
  <p>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:</p>
  
  <pre><code>&lt;appender name="STDLOG" class="org.jboss.logging.appender.RollingFileAppender"&gt;
    &lt;errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/&gt;
    &lt;param name="File" value="${jboss.server.log.dir}/myapplication.log"/&gt;
    &lt;param name="Append" value="true"/&gt;
      &lt;param name="MaxFileSize" value="5MB"/&gt;
      &lt;param name="MaxBackupIndex" value="10"/&gt;
  
      &lt;layout class="org.apache.log4j.PatternLayout"&gt;
      &lt;param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>using this setting for STDOUT:</p>
  
  <pre><code>&lt;category name="STDOUT"&gt;
    &lt;priority value="DEBUG"/&gt;
    &lt;appender-ref ref="STDLOG"/&gt;
  &lt;/category&gt;
  </code></pre>
  
  <p>I tried these category settings without any change in the result:</p>
  
  <pre><code>&lt;category name="log4j.logger.org.apache.axis" additivity="false"&gt;
    &lt;priority value="ERROR"/&gt;
  &lt;/category&gt;
  
  &lt;category name="org.apache.axis"&gt;
    &lt;priority value="ERROR"/&gt;
  &lt;/category&gt;
  </code></pre>
  
  <p>Some sample log output looks like this:</p>
  
  <pre><code>2009-08-07 10:29:43,911 INFO  [STDOUT] (http-127.0.0.1-8080-1) =======================================================
  = Elapsed: 2190 milliseconds
  = In message: &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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"&gt;
   &lt;soapenv:Body&gt;
    &lt;addVehicleImage xmlns="urn:VMgrWebService"&gt;
     &lt;id xmlns=""&gt;APP-T4QKR3U&lt;/id&gt;
     &lt;idType xmlns=""&gt;chiffre&lt;/idType&gt;
     &lt;data xmlns=""&gt;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  
  </code></pre>
  
  <p><b>Update</b>
  I checked the axis-1.4.jar and there is a file called <em>simplelog.properties</em>:</p>
  
  <pre><code># Logging detail level,
  # Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
  org.apache.commons.logging.simplelog.defaultlog=info
  </code></pre>
  
  <p>Setting this to error within the jar, or as a category in jboss-log4j.xml didn't help at all.</p>
  
  <p>Anyone any idea how I can turn off the Axis logging or at least set it to ERROR level?</p>
  
  <p>Cheers<br>
  Frank</p>