logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Config files naming conventions [WAS: Config XSD naming convention]
Date Wed, 14 Aug 2013 15:22:50 GMT
I am renaming this thread from "Config XSD naming convention" to "Config
files naming conventions" because it is not just about the XSD, so let me
rephrase:

I find the mixed use of naming conventions messy and confusing and for lack
of a better term, not very "pro" as in "professional".

I'd like to use the following convention in the XML configs, which I've
used in the log events XSD:

- Elements are CamelCase
- Attributes are camelCase

This is just like ClassNames and instanceVariables in Java and other
languages.

This means that I would also like to change names I am sure I am not alone
in finding abhorrent: "some-ref", which would become SomeRef for an element
and someRef for an attribute.

The fact that the current code is case-insensitive is an oddity I'd rather
not document such that XML Validation can work based on the conventions
above.

At work, we generate Log4j 1 configurations from a proprietary GUI tool,
and soon Log4j 2 :) so any perceived convenience of case-insensitivity is
not only wasted on us but also can lead to false errors when used with XML
validation. It's always a good idea to validate XML as a sanity check
before sending it out in the real world.

Gary

On Sat, Aug 10, 2013 at 12:01 PM, Nick Williams <
nicholas@nicholaswilliams.net> wrote:

>
> On Aug 10, 2013, at 10:57 AM, Gary Gregory wrote:
>
> > Hi All:
> >
> > I'd like to use the following convention in the XML config XSD [1],
> which I've used in the events XSD [2]:
> >
> > - Elements are CamelCase
> > - Attributes are camelCase
>
> +1
>
> >
> > Just like ClassNames and instanceVariables in Java.
> >
> > After that, I would also like to change names I am sure I am not alone
> in finding abhorant: some-ref, which would become someRef.
>
> I actually really like hyphenated attributes, but I like consistency
> better.
>
> Nick
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
View raw message