Create a log4j.xml like below :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="true" xmlns:log4j="http://jakarta. apache.org/log4j/">
<!--APPENDER FOR FRAMEWORK -->
<appender name="STDOUT" class="org.apache.log4j. ConsoleAppender">
< layout class="org.apache.log4j. PatternLayout">
< param name="ConversionPattern" value="[%d %5p](%c{1}) -%m%n"/>
< /layout>
< /appender>
<appender name="SSP_APPENDER" class="org.apache.log4j. RollingFileAppender">
< param name="MaxFileSize" value="512MB"/>
< param name="MaxBackupIndex" value="15"/>
< param name="File" value="PATH OF THE LOG FILE CREATED UNDER THE DOMAIN" />(For Linux Box)
< !--param name="File" value="PATH OF THE LOG FILE CREATED UNDER THE DOMAIN" /-->(For Windows Box)
< param name="Append" value="true"/>
< layout class="org.apache.log4j. PatternLayout">
< param name="ConversionPattern" value="[%d %5p](%c) -%m%n"/>
< /layout>
< /appender>
< !--logger name="webtest" additivity="false">
< level value="debug"/>
< appender-ref ref="SSP_APPENDER"/>
<appender-ref ref="STDOUT"/>
</logger-->
<!--LOGGERS FOR FRAME WORKEND -->
<!--turn off Spring, Axis, Jarkarta, Apache, etc logging -->
< !--logger name="org" additivity="false">
< level value="error"/>
< /logger-->
<root>
< level value="debug"/>
< appender-ref ref="STDOUT"/>
< /root>
</log4j:configuration>
· Copy log4j.jar to< DOMAIN_DIR >/lib
· Copy wllog4j.jar from <Weblogic Install Dir>/server/lob to < DOMAIN_DIR >/lib
· Restart the WebLogic Server
No comments:
Post a Comment