title: Enable Verbose Logging for Java (rt.jar)
body: <p>I am new to stack overflow, please pardon if I make any mistake on my first post.</p>
  
  <p>I am trying to enable VERBOSE logging for all classes under java package: sun.rmi.*
  the container being used is JBOSS-4.2.2 and there is a jboss-log4.xml  in our application.</p>
  
  <p>I have used the following JAVA_OPTS during start-up hoping to see the verbose logging within TCPChannel.java which is part of rt.jar(<a href="http://www.docjar.com/html/api/sun/rmi/transport/tcp/TCPChannel.java.html" rel="nofollow noreferrer">http://www.docjar.com/html/api/sun/rmi/transport/tcp/TCPChannel.java.html</a>) but it did not work.</p>
  
  <pre><code>JAVA_OPTS="$JAVA_OPTS  -Djava.rmi.server.logCalls=true 
  -Dsun.rmi.server.logLevel=VERBOSE 
  -Dsun.rmi.client.logCalls=true 
  -Dsun.rmi.transport.tcp.logLevel=VERBOSE 
  -Dsun.rmi.transport.logLevel=VERBOSE"
  </code></pre>
  
  <p>Below is jboss-log4j.xml. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt;
  
  &lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" 
   debug="false"&gt;
  
  &lt;!-- A time/date based rolling appender --&gt;
  &lt;appender name="FILE" 
     class="org.jboss.logging.appender.DailyRollingFileAppender"&gt;
  &lt;errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/&gt;
  &lt;param name="File" value="${jboss.server.log.dir}/trace.log"/&gt;
  &lt;param name="Append" value="true"/&gt;
  &lt;param name="Threshold" value="TRACE#org.jboss.logging.XLevel"/&gt;
  &lt;!-- Rollover at midnight each day --&gt;
  &lt;param name="DatePattern" value="'.'yyyy-MM-dd"/&gt;
  &lt;layout class="org.apache.log4j.PatternLayout"&gt;
  &lt;param name="ConversionPattern" value="%d{ISO8601} %-5p [%X{jobName} 
    %X{token}] [%c] - %m%n"/&gt;
  &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;!-- Limit the org.apache category to INFO as its DEBUG is verbose --&gt;
  &lt;category name="org.apache"&gt;
  &lt;priority value="INFO"/&gt;
  &lt;/category&gt;
  
  &lt;!-- Limit the jacorb category to WARN as its INFO is verbose --&gt;
  &lt;category name="jacorb"&gt;
  &lt;priority value="WARN"/&gt;
  &lt;/category&gt;
  
  &lt;!-- Limit the org.jgroups category to WARN as its INFO is verbose --&gt;
  &lt;category name="org.jgroups"&gt;
   &lt;priority value="DEBUG"/&gt;
  &lt;/category&gt;
  
  &lt;!-- Limit the org.quartz category to INFO as its DEBUG is verbose --&gt;
  &lt;category name="org.quartz"&gt;
    &lt;priority value="INFO"/&gt;
  &lt;/category&gt;
  
  &lt;!-- Limit the JSR77 categories --&gt;
  &lt;category name="org.jboss.management"&gt;
    &lt;priority value="DEBUG"/&gt;
  &lt;/category&gt;
  
  &lt;category name="org.jboss.serial"&gt;
    &lt;priority value="TRACE"/&gt;
  &lt;/category&gt;
  
  &lt;category name="org.jboss.remoting"&gt;
    &lt;priority value="TRACE" class="org.jboss.logging.XLevel"&gt;&lt;/priority&gt;
  &lt;/category&gt;
  
  &lt;category name="org.jboss"&gt;
    &lt;priority value="TRACE" class="org.jboss.logging.XLevel"&gt;&lt;/priority&gt;
  &lt;/category&gt;  
  
  &lt;category name="org.jnp"&gt;
    &lt;priority value="TRACE"/&gt;
  &lt;/category&gt;
  
   &lt;root&gt;
   &lt;appender-ref ref="FILE"/&gt;
   &lt;!--appender-ref ref="SYSLOG"/--&gt;
  &lt;/root&gt;
  &lt;/log4j:configuration&gt;
  </code></pre>
  
  <p>How do I enable logging using system property in jboss-log4j.xml if I believe the log4j.xml is overriding my java_opts
  I am using this link as reference: 
  <a href="https://docs.oracle.com/javase/6/docs/technotes/guides/rmi/logging.html" rel="nofollow noreferrer">https://docs.oracle.com/javase/6/docs/technotes/guides/rmi/logging.html</a></p>
  
  <p>I want to try the category "client-side" "server-side" described in the above link, but I am clear on the syntax, if any example syntax can be provided, it would be helpful.</p>
  
  <p>Any help in getting Verbose logging turned on is much appreciated.</p>