XML schema or DTD for logback.xml? XML schema or DTD for logback.xml? xml xml

XML schema or DTD for logback.xml?


As of June 2011, the official documentation states

As shall become clear, the syntax of logback configuration files is extremely flexible. As such, it is not possible specify the allowed syntax with a DTD file or an XML Schema.

There was a brief thread on the topic, but didn't seem to go anywhere.


Just to get rid of the annoying warning in Eclipse add <!DOCTYPE xml> after <?xml version="1.0" encoding="UTF-8"?>.

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xml>

To get rid of the exclamation point icon after you fix it, you might need to trigger the validation again by right-clicking the file and choosing Validate.


It is not supported officially according to the documentation, but there is an independent project to provide Schema for Logback

However, due to extreme flexibility of the Logback configuration, Schema cannot support all possible configuration options.