logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36700] New: - joranconfigurator instantiating unreferenced appender
Date Mon, 19 Sep 2005 00:35:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36700>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36700

           Summary: joranconfigurator instantiating unreferenced appender
           Product: Log4j
           Version: 1.3alpha
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P2
         Component: Configurator
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: sdeboy@iname.com


I've noticed two issues with an xml-based configuration that works fine with the 1.2.x jars
but does not work using log4j 1.3x alpha jars:

1. An appender that's defined but not referenced is still constructed and activateOptions
is called (the IRC appender in the example below)

2. Using a 'category' instead of 'logger' node prevents the configuration from being loaded
with the following error (using a 'logger' node works fine):
Reported error: "no applicable action for <category>, current pattern is [/configuration/category]"
at line 27 column 24
Reported error: "no applicable action for <priority>, current pattern is [/configuration/category/priority]"
at line 28 column 32
Reported error: "no applicable action for <appender-ref>, current pattern is [/configuration/category/appender-ref]"
at line 29 column 30
Here is the configuration I was using:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
      <appender name="IRC" class="irc.IRCAppender">
        <param name="Port" value="6667"/>
        <param name="remoteHost" value="irc.freenode.net"/>
        <param name="nickName" value="sdeboy4"/>
        <param name="userName" value="sdeboy4"/>
        <param name="channel" value="#log4j"/>
        <param name="password" value="sdeboy4"/>
        <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
                    value="%p %c %m %throwable%n"/>
        </layout>           
      </appender>
      <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
           <layout class="org.apache.log4j.PatternLayout">
             <param name="ConversionPattern"
                    value="%p %c %m %n"/>
           </layout>        
      </appender>
      <category name="test">
        <priority value="debug"/>
        <appender-ref ref="STDOUT"/>
      </category>
        <root>
           <priority value ="debug" />
        </root>
       
</log4j:configuration>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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