Actually it seems that the JavaBeans introspector returns the String
setter when a class has something like
setMaxFileSize(long)
setMaxFileSize(String)
so I don't know why setMaxFileSize(long) had to be commented out?
Cheers,
Anders
Ceki Gülcü wrote:
>
> Aaaaaaaaaaaaah!
>
> There are two versions of setMaxFileSize in RollingFileAppender:
>
> setMaxFileSize(long)
>
> and
>
> setMaxFileSize(String)
>
> The problem is that the JabaBeans Introspector returns the former when asked for
>setter methods in RollingFileAppender. However, this causes problems when log4j is
>configured using scripts because the
> max file size is specified using units as in 1048576, 1024KB, or 1MB but 1MB is not
>a valid number calling setMaxFileSize(long) fails.
>
> The only solution I can think of is to add a custom BeanInfo class for
>RollingFileAppender where the setMaxFileSize(long) setter is removed. This is a bit
>cumbersome but can be done.
>
> Well, I never imagined that someone was using the removed method. I guess I was
>wrong. I'll see what I can do.
>
> Anders, do you have a better idea? Cheers, Ceki
>
> ps: Sam, thanks for the info.
>
> At 05:32 18.04.2001 -0400, Sam Ruby wrote:
> >Why was setMaxFileSize(long) in org.apache.log4j.RollingFileAppender removed?
> >
>
>>http://jakarta.apache.org/cvsweb/index.cgi/jakarta-log4j/src/java/org/apache/log4j/RollingFileAppender.java.diff?r1=1.8&r2=1.9&diff_format=h
> >
> >In a few hours, you should be able to see the failure that this produces at:
> >
> >http://jakarta.apache.org/builds/gump/2001-04-18/jakarta-velocity.html
> >
> >- Sam Ruby
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
> Ceki Gülcü
>
> ---------------------------------------------------------------------
> 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]