Weblogic 11g log4j:WARN Please initialize the log4j system properly

1.8k views Asked by At

i use log4j with weblogic 11g version, i get the below error in the server console

log4j:WARN No appenders could be found for logger (org.apache.wicket.protocol.http.pagestore.FileChannelPool).
log4j:WARN Please initialize the log4j system properly.

i use the below server start

-Dlog4j.configuration=/apps/users/projects/domains/java_domain/log4j.xml

My log4j.xml is

<!DOCTYPE log4j:configuration SYSTEM "D:/Java/apache-log4j-1.2.15/src/main/resources/org/apache/log4j/xml/log4j.dtd" >
<log4j:configuration> 
<!--  Appenders -->
<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%5p %d{ISO8601} [%t][%x] %c - %m%n" />
    </layout>
</appender>

<!--  Loggers for ibatus and JDBC database -->
<logger name="java.sql.PreparedStatement" additivity="false">
    <level value="debug"/>
</logger>
<logger name="java.sql.Connection" additivity="false">
<level value="debug"/>
</logger>
<!--  The Root Logger -->
<root>
    <level value="error"/>
    <appender-ref ref="stdout"/>
</root>

</log4j:configuration>

Expected result in server console is something like this

2014-07-03 18:00:34,154 [java.sql.ResultSet] DEBUG - {rset-100060} Header: [ID, PERSON_NAME, BIRTH_DATE, GENDER, EMAIL]
2014-07-03 18:00:34,154 [java.sql.ResultSet] DEBUG - {rset-100060} Result: [1600, MARK, 1980-11-18, M, null]
2014-07-03 18:00:34,154 [java.sql.ResultSet] DEBUG - {rset-100060} Result: [2032,STEVEN, 1980-10-18, M, null]
2014-07-03 18:00:34,154 [java.sql.Connection] DEBUG - {conn-100061} Connection
2014-07-03 18:00:34,154 [java.sql.Connection] DEBUG - {conn-100061} Preparing Statement:select ID, EMAIL, MOBILE,TELEPHONE_NUMBER from USER

I have to use iBatis to print SQL statements but if you see the WARN in the console, i see org.apache.wicket.protocol.http.pagestore.FileChannelPool prints. i also use wicket framework in my applications

log4j:WARN No appenders could be found for logger (org.apache.wicket.protocol.http.pagestore.FileChannelPool).

i also tried placing the log4j.xml inside WEB-INF/classes but it didnt work.

Any help will be of more use

Thanks.

0

There are 0 answers