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.

Gary


>
> Ralph
>
>
> On Sep 26, 2012, at 6:55 AM, Paul Benedict wrote:
>
> It's true that validation can add a bit of grogginess to the system.
> However, that can simply be controlled by a Java system property if
> necessary. I don't think we need the validation at runtime, however, having
> an XSD at design time is a definite. I need all the help I can get inside
> Eclipse :-)
>
> If not already, we should provide an XSD in the log4j api or impl jar.
>
> Paul
>
> On Wed, Sep 26, 2012 at 8:07 AM, Ivan Habunek <ivan.habu...@gmail.com>wrote:
>
>> On 26 September 2012 13:39, Gary Gregory <garydgreg...@gmail.com> wrote:
>> > Incorrect!
>>
>> I stand corrected. Still, it's probably not wise to have automatic XSD
>> validation before configuration because of performance issues. But it
>> would be nice to have a method which users can call and validate their
>> XML configuration files manually.
>>
>> Regards,
>> Ivan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-dev-h...@logging.apache.org
>>
>>
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to