[logback-dev] [Bug 27] New: Joran doesn't configure string lists correctly.

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Wed Nov 1 17:51:02 CET 2006


http://bugzilla.qos.ch/show_bug.cgi?id=27

           Summary: Joran doesn't configure string lists correctly.
           Product: logback-core
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: Joran
        AssignedTo: logback-dev at qos.ch
        ReportedBy: noreply.sebastien at qos.ch


Using the following configuration file:

<configuration>
  <turboFilter class="ch.qos.logback.classic.turbo.DebugUsersTurboFilter">
    <user>seb</user>
    <user>ceki</user>
  </turboFilter>

  <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
    <layout class="ch.qos.logback.classic.PatternLayout">
      <Pattern>%d %level - %m%n</Pattern>
    </layout>
  </appender>

  <root>
    <level value="DEBUG" />
    <appender-ref ref="CONSOLE" />
  </root>
</configuration>

(named turbo2.xml, in classic/test/input/joran)

Joran sees the two <user> elements, knows that their "containmentType" is
COLLECTION but doesn't call the addUser method.
Instead, it checks to see if a class attribute exists in the <user> elements,
and since no such attribute is given, it reports an error such as:

|-ERROR in ch.qos.logback.core.joran.action.NestedComponentIA - No class name
attribute in <user>

I guess that Joran has to learn that collection containmentType doesn't
necessarily mean "component that requires a class attribute". Here, the value
between the <user> elements is a String. I guess that inspecting the addUser
method and discovering that the parameter type is a String would help.


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



More information about the logback-dev mailing list