[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    Re: XML config style
From:       Ralph Goers <ralph.goers () dslextreme ! com>
Date:       2012-09-26 16:39:55
Message-ID: D6B80578-2E41-416B-8811-F854E2E9C666 () dslextreme ! com
[Download RAW message or body]

On Sep 26, 2012, at 8:32 AM, Gary Gregory wrote:

> On Wed, Sep 26, 2012 at 11:04 AM, Ralph Goers <ralph.goers@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


[Attachment #3 (unknown)]

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; "><br><div><div>On Sep 26, 2012, at 8:32 AM, \
Gary Gregory wrote:</div><br class="Apple-interchange-newline"><blockquote \
type="cite"><div class="gmail_quote">On Wed, Sep 26, 2012 at 11:04 AM, Ralph Goers \
<span dir="ltr">&lt;<a href="mailto:ralph.goers@dslextreme.com" \
target="_blank">ralph.goers@dslextreme.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <div style="word-wrap:break-word">Have you guys read&nbsp;<a \
href="http://logging.apache.org/log4j/2.x/manual/configuration.html#ConfigurationSyntax" \
target="_blank">http://logging.apache.org/log4j/2.x/manual/configuration.html#ConfigurationSyntax</a>?&nbsp;In \
particular the "strict" and "schema" attributes.<div> <br></div><div>IMO, using a \
schema for the concise format would be very impractical. &nbsp;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. &nbsp;The \
schema would also have to be updated as new components are added.&nbsp;</div> \
</div></blockquote><div><br>Well, yes, that's the whole point!<br><br>With an XSD, \
you can also generate code with JAXB, or you can annotate classes and have JAXB \
generate the schema.<br></div></div></blockquote><div><br></div><div>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. &nbsp;I originally considered it, along with several other \
approaches, but discarded it as a way to do configuration. &nbsp;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. &nbsp;Not a showstopper, but it \
will create maintenance issues as we update the \
schema.</div><div><br></div><div>Ralph</div></div><br></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic