logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <duvelbier-tsm...@yahoo.com>
Subject Log4J 1.3 configuration example ... ?
Date Wed, 15 Mar 2006 16:22:04 GMT

I use the sample files in the 1.3 zip to output to a file & the console (see below).
But I get thte following message in the console :

[SNIP]
log4j:INFO Using URL [file:/C:/data/workspaces/Log4JDBC/TestLog4/etc/log4j.xml] for automatic
log4j configuration of repository named [default].
Reported error: "no applicable action for <category>, current pattern is [/configuration/category]"
at line 20 column -1
Reported error: "no applicable action for <priority>, current pattern is [/configuration/category/priority]"
at line 21 column -1
Reported error: "no applicable action for <appender-ref>, current pattern is [/configuration/category/appender-ref]"
at line 22 column -1
Reported error: "no applicable action for <appender-ref>, current pattern is [/configuration/category/appender-ref]"
at line 23 column -1
[/SNIP]

What is wrong ... ?




\T,
 
-- Any fool can write code that a computer can understand. 
Good programmers write code that humans can understand.
                                                   Martin Fowler 
T. : +32 (0)2 742 05 94
M. : +32 (0)497 44 68 12
@  : duvelbier-tsmets@yahoo.com
Do you skype too ... ?



<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >



    <appender name="File" class="org.apache.log4j.FileAppender">
            <param name="File"   value="./log/DB-appender.log" />
            <param name="Append" value="false" />            
            <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>
            </layout>        
    </appender>
    
    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n "/>
        </layout>        
    </appender>
    
    <category name="be.post">
      <priority value="debug" />
        <appender-ref ref="File" />
        <appender-ref ref="CONSOLE" />
    </category>    
</log4j:configuration>





---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message