RE: Problem with log4java

"Tim Anderson" <[email protected]>
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
 > From: Fernando Zuriaga
> 
> Hi, I use lastest versión of openjms 0.7.7-alpha1, and I 
> can't view the log of the server. The file 
> /opt/openjms-0.7.7-alpha-1/config/log4j.xml is the
> following:
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> 
> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
>   <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
>     <layout class="org.apache.log4j.PatternLayout">
>       <param name="ConversionPattern" 
>              value="%d{HH:mm:ss.SSS} %-5p [%t] - %m\n"/>
>     </layout>
>   </appender>
>   <appender name="openjms" class="org.apache.log4j.FileAppender">
>     <param name="File" value="openjms.log" />
>     <layout class="org.apache.log4j.PatternLayout">
>       <param name="ConversionPattern" 
>              value="%d{HH:mm:ss.SSS} %-5p [%t] - %m\n"/>
>     </layout>
>   </appender>
>   <category name="org.exolab">
>     <priority value="DEBUG"/>
>     <appender-ref ref="STDOUT"/>
>     <appender-ref ref="openjms"/>
>   </category>
> </log4j:configuration>
> 
> The file openjms.log is created, but the size is always 0.
> 

The openjms jar contains a log4j.properties with the entry
log4j.category.org.exolab.jms=WARN, STDOUT

This is probably masking your "org.exolab" category.
Try changing it to:
   <category name="org.exolab.jms">
      <priority value="DEBUG"/>
      <appender-ref ref="STDOUT"/>
      <appender-ref ref="openjms"/>
   </category>

-Tim


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.