Return to Snippet

Revision: 4710
at January 17, 2008 03:05 by narkisr


Initial Code
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%p - %C{1}.%M(%L) | %m%n"/>
        </layout>
    </appender>

    <appender name="ERRORS_FILE" class="org.apache.log4j.FileAppender">
        <param name="File" value="errors.log"/>
        <param name="Append" value="false"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%p - %C{1}.%M(%L) | %m%n"/>
        </layout>
    </appender>

    <logger name="net.sf.hibernate">
        <level value="DEBUG"/>
    </logger>


    <logger name="org.springframework">
        <level value="WARN"/>
    </logger>


    <root>
        <level value="ERROR"/>
        <appender-ref ref="CONSOLE"/>
    </root>
</log4j:configuration>

Initial URL

                                

Initial Description
All you need todo in order to use this is just to add it to your path

Initial Title
An example for some realy simple Log4.xml

Initial Tags
xml

Initial Language
Java