Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

configure the log4j.xml file

843836Jun 14 2005 — edited Aug 3 2005
Hello All,

I am trying to configure the log4j.xml file, so that i can get differnet logging messages based on the level to different log files. for ex: info messages in info.log, debug messages in debug.log and so on...i tried using the below...but, no luck.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<appender name="UCF_Exception" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="UCF_Exception.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="1000KB"/>
<param name="MaxBackupIndex" value="2"/>
<layout class="org.apache.log4j.xml.XMLLayout">
<param name="LocationInfo" value="true"/>
</layout>
</appender>
<log4j.logger.UCFExceptionLogger>
<level value ="debug"/>
<appender-ref ref="UCF_Exception" />
</log4j.logger.UCFExceptionLogger>
</log4j:configuration>

getting exception

log4j:WARN No appenders could be found for logger (UCFExceptionLogger).
log4j:WARN Please initialize the log4j system properly.

Can someone help me...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2005
Added on Jun 14 2005
3 comments
149 views