Agreed. I've made those methods protected in the CVS archive.

Anders

Ernie Parker wrote:
> 
> Hello Log4j,
> 
> I'm adding my own conversion specifier %v{option} using subclassed
> PatternLayout, PatternParser and PatternConverter.  I have a small
> problem with the {option} part. There doesn't seem to be a method for me
> to extract it. In the finalizeConverter method of my PatternParser subclass,
> I would like to be able to call
> 
>    addConverter(new MyPatternConverter(formattingInfo, extractOption()));
> 
> The problem is that extractOption() is a private method of PatternParser.
>  I can't access it from my subclass.
> 
> The org.apache.log4j.helpers.PatternParser has private methods,
> extractOption()and extractPrecisionOption(), which, I believe, should be
> protected so that a subclass, also, can access the option for conversion
> specifiers.  Interestingly enough, these methods access protected
> data members.  As a result I can copy the entire method in my subclass
> and everything works fine. But I'm sure that is not an approved way
> to modify the format buffer.
> 
> Maybe I've missed something in the architecture. If so, please let me know.
> 
> Regards,
> Ernest Parker
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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

Reply via email to