Geir, Sam,

This is to be expected. The new version of log4j (still under
development) has removed some methods deprecated in 1.1. These methods
are

  setOption(String key, String value), 
  getOptionStrings()

and related option constants which were defined in all appenders and layouts.

In log4j 1.2, we moved to JavaBeans type of configuration using
introspection and these methods and constants are no longer required.

Compatibility with both log4j 1.1 and future 1.2 should be easy to achieve. If an 
option
was called "Toto", then you should call:

  appender.setToto(optionValue);

instead of the previous:

  appender.setOption(TOTO_OPTION, optionValue);

For example, replace:

  appender.setOption(SMTPAppender.SMTP_HOST_OPTION, smtpHost);

with 
 
  appender.setSMTPHost(smtpHost);


The case with setMaxFileSize in RollingFileAppender is unique. Without
delving into the details, I would like to ask you to call
setMaximumFileSize(long maxFileSize) instead of setMaxFileSize(long).

Let me know if you have any difficulty in making these
changes. Regards, Ceki




At 07:32 28.07.2001 -0400, Geir Magnusson Jr. wrote:
>Hi,
>
>Lately, we have been seeing failures with the nightly Gump run for
>Velocity, failing in the following way :
>
>    [javac] Compiling 163 source files to
>/home/rubys/jakarta/jakarta-velocity/bin/classes
>    [javac]
>/home/rubys/jakarta/jakarta-velocity/bin/src/org/apache/velocity/runtime/log/Log4JLogSystem.java:162:
>setMaxFileSize(java.lang.String) in org.apache.log4j.RollingFileAppender
>cannot be applied to (int)
>    [javac]            
>((RollingFileAppender)appender).setMaxFileSize(fileSize);
>    [javac]             ^
>    [javac]
>/home/rubys/jakarta/jakarta-velocity/bin/src/org/apache/velocity/runtime/log/Log4JLogSystem.java:243:
>cannot resolve symbol
>    [javac] symbol  : variable SMTP_HOST_OPTION  
>    [javac] location: class org.apache.log4j.net.SMTPAppender
>    [javac]         appender.setOption(SMTPAppender.SMTP_HOST_OPTION,
>smtpHost);
> 
>etc
>
>Simply put, is this something you overlooked in recent changes, or
>something we have to change?
>
>geir
>
>-- 
>Geir Magnusson Jr.                           [EMAIL PROTECTED]
>System and Software Consulting
>Developing for the web?  See http://jakarta.apache.org/velocity/
>Be well, do good work, and keep in touch.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

--
Ceki Gülcü - http://qos.ch


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

Reply via email to