Skip to content

Documentation; "at most one <root> element" not true #953

@dnsmkl2

Description

@dnsmkl2

https://logback.qos.ch/manual/configuration.html#syntax

Nevertheless, the very basic structure of the configuration file can be described as, element, containing zero or more elements, followed by zero or more elements, followed by at most one element.

But I see log back configs with

  <root level="debug">
    <appender-ref ref="FILE" />
  </root>
  <root level="info">
    <appender-ref ref="STDOUT" />
  </root>

I do recognize that full and lawyerish reading of the docs could allow putting some peaces together.

But it would be quite useful for docs to contain such blunt example:

  <root level="debug">
    <appender-ref ref="FILE" />
  </root>
  <root level="info">
    <appender-ref ref="STDOUT" />
  </root>

getLogger("a.b").logAtDebug("This message goes to XXX?");

Related: https://stackoverflow.com/questions/41647036/multiple-root-loggers-with-logback-conditionals

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions