I'm only working on this because it sounds interesting and has been
requested by several people. I personally never use this file format in
Log4j 1, so I'm not entirely sure on how to best maintain compatibility or
similarity to the old format.

The technical side of parsing a flat properties map into a tree of Nodes
isn't that difficult. I'm sure we all took data structures at some point in
our lives ;)

Due to the limitations of properties files, the format has to be slightly
different than the usual hierarchy used in all the other formats. The key
difference I'd say is that instead of the "name" attribute used on all the
appenders and loggers, the name would be the child "node" of the appenders
element. For instance:

appenders.Name.attribute = ...
appenders.Name.anotherAttribute = ...

Of course, the keys would be converted to lower case for case insensitivity
(which makes me think we could really use a CaseInsensitiveHashMap or
something).

The old format uses something more like:

log4j.appender.Name.attribute = ...

For consistency, I think this should be appenders, and we could use
"log4j2" as the prefix (or even "configuration" for ultimate consistency).
Thoughts?

-- 
Matt Sicker <[email protected]>

Reply via email to