On Sep 26, 2012, at 8:32 AM, Gary Gregory wrote: > On Wed, Sep 26, 2012 at 11:04 AM, Ralph Goers <ralph.go...@dslextreme.com> > wrote: > Have you guys read > http://logging.apache.org/log4j/2.x/manual/configuration.html#ConfigurationSyntax? > In particular the "strict" and "schema" attributes. > > IMO, using a schema for the concise format would be very impractical. > Personally, I'm not sure it makes sense even for the strict format as it > would have to "know" about the attributes the various Appenders and Filters > can accept to be of any value. The schema would also have to be updated as > new components are added. > > Well, yes, that's the whole point! > > With an XSD, you can also generate code with JAXB, or you can annotate > classes and have JAXB generate the schema.
Yes - we use JAXB for for our REST services. But I can't imagine why I'd want to use it with a Log4j configuration file. I originally considered it, along with several other approaches, but discarded it as a way to do configuration. Remember, one of the goals is to make it easy for users to add custom components. If they do that they would have to add their definitions to the schema. Not a showstopper, but it will create maintenance issues as we update the schema. Ralph