[logback-user] configuration - why no DTD?

Sebastien Pennec sebastien at qos.ch
Mon Jan 8 20:11:55 CET 2007

Hello Andrew,

You are right that documentation is an important point. As you can see in the manual 
section of the logback site[1], we do not take it lightly: a whole manual[2] is in 
the process of being written and a short introduction, covering many basic needs, 
already exists[3].

There are 4 chapters already online, and a 5th one, about configuring logback, that 
is currently being written. This chapter will be put online when the next release 
comes out. It is expected around the beginning of next week.

There is no DTD to logback configuration files because this is pretty difficult to 
give a description that is not too strict of the possibilities that the components of 
logback may offer.

To answer to your questions more precisely:

Here is how to add multiple appenders to the root logger:

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

To configure specifically a given logger, you can use the logger element:

<logger name="my.logger.name">
   <level value="INFO" />
   <appender-ref ref="FILE2" />

If you have any questions about logback, feel free to ask on the list.



andrew wulf wrote:
> Now that I have logback working, I can't figure out the whole syntax of 
> the logback.xml file - why is there no DTD?
> All the examples show only a single appender and one root element. How 
> would I, for example, add a console appender and a fileappender to the 
> root? Or add a appender at another level?
> Documentation needs to be better, since confusion about configuration is 
> likely to stop people from trying it.
> - andrew
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user

Sébastien Pennec
sebastien at qos.ch

Logback: The reliable, generic, fast and flexible logging framework for Java.

More information about the Logback-user mailing list