logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Känngård <jo...@kanngard.net>
Subject Advice regarding PatternParser / PatternConverter
Date Wed, 05 Dec 2001 07:42:31 GMT
Hello,

I´am currently developing an Appender for use with Lotus Domino R5.x. I
would like some advice regarding how Log4j-users / administrators may
configure it. The fields that this Appender will use in Domino databases,
must be configurable with the standard PropertyConfigurator (or my
DominoConfigurator, but uses a Domino database as source).
I do not want to hardwire the "field names" as setters in the Appender, like
"setMessageField", "setSourceField" etc. I want to have a method that takes
the remote field as the first argument, and a PatternLayout pattern, like:

setField("Message", "%m")
setField("Date", "%d")

, and in the configuration file:

log4j.appender.domino.field=Message, %m
log4j.appender.domino.field=Date, %d

The DominoAppender will use the PatternParser and PatternConverter to handle
these settings.
Is this "the right way" of doing things? Am I thinking right? A simple yes
or no is quite enough for me right now. :-) Anyone who have tried this
successfully with other types of Appenders?

Anyone interested in this "Dominopackage", so it could be added as a
"contribution" to Log4j?

Regards,

Johan Känngård - "Another newbie in the open source community"


____________________
Johan Känngård
johan@kanngard.net



Mime
View raw message