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:
<root>
<level value="debug" />
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
To configure specifically a given logger, you can use the logger element:
<logger name="my.logger.name">
<level value="INFO" />
<appender-ref ref="FILE2" />
</logger>
If you have any questions about logback, feel free to ask on the list.
Sébastien
[1]http://logback.qos.ch/documentation.html
[2]http://logback.qos.ch/manual/index.html
[3]http://logback.qos.ch/shortIntro.html
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@qos.ch
http://qos.ch/mailman/listinfo/logback-user
--
Sébastien Pennec
[EMAIL PROTECTED]
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch/
_______________________________________________
Logback-user mailing list
Logback-user@qos.ch
http://qos.ch/mailman/listinfo/logback-user