logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43619] - Simple proposal for pluggable sys-props resolvers
Date Fri, 26 Oct 2007 18:29:14 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43619>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43619





------- Additional Comments From lilianne_blaze@tlen.pl  2007-10-26 11:29 -------
I'm not sure I understand that completely.

> What I meant as hard to explain is that in either case you can't say something
like the default value of 
this new property is some existing class that the user will be familiar.

It's simply DefaultPropertyResolver.resolveProperty, which does exactly what
404-409 lines in OptionConverter did.

However, there's one major issue I see with your version - no access to 'local'
properties, and no ability to choose order. With setting a 'source', as opposed
to 'strategy', you have to hardcode the overriding order, either the custom
source overrides local properties, or local properties override the custom
source. Also, your version depends on reflection, does it not? And that is
hardly easier for Joe Newbie, no compile-time checks, etc.

With 'strategies' you can have things like system properties "x" and
"x.allowOverride=false", and a strategy which disallows overriding by local
properties if a property with ".allowOverride" suffix and "false" value exists.

Well, why not have both? Have "log4j.propertyResolver" for 'strategies' and
"log4j.propertySource" for 'sources', with the default being a
use-source-strategy with "java.lang.System.getProperty(String)"?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message