>At 16:51 21.03.2001 -0600, Jin Zhao wrote:
>> I just tried the variable substitution solution. It only works on
>>"option values".
>>I can't use a variable for a class name, ie the configurator will
>>complain of not being able to instantiate that class.

>Why not? Class name is just an option value like any other!

I tried to replace Appender and Layout class name using variables and failed again.
Then I look at the code of PropertyConfigurator.java and see only
"configureOptionHandler(....) " call the method
"OptionConverter.findAndSubst(prefix + options[i], props)", which will do the variable substitution.

For "parseAppender(Properties props, String appenderName)", it just call
"OptionConverter.instantiateByKey(...)" which then call call
"OptionConverter.instantiateByClassName(....)", both of which has no calls to
"OptionConverter.findAndSubst(prefix + options[i], props)".

I f the above observation of the code is correct, can I say the current PropertyConfigurator(log4j-1.1b) has no
variable substitution for appenders and layouts class name ?

Anybody has better idea?

Thanks a lot,

Jin

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to