At 13:53 20.03.2001 +0100, Anders Kristensen wrote:
>If these are all the errors you get it would be a small effort to modify
>log4j to support velocity in its current incarnation. The
>
> public void setMaxFileSize(long maxFileSize)
>
>should probably be added anyway, and then we're just talking about a
>bunch of constants and a single deprecated method on SMTPAppender.
>Unless I hear protests I'll make those changes sometime later today.
Great!
>Come to think of it, it would arguably have been better to make
>setOption deprecated everywhere instead of removing them. They're not
>usually invoked from app programs directly, though.
Yes, setOption is not usually used directly, but when thousands of projects depend on
a library, the "unusual" case still numbers in the hundreds... It took Sam a day to
point out an unusual case!
Deprecating setOption seems the most reasonable course of action at this point. Ceki
>Sam Ruby wrote:
>>
>> Background: jakarta-velocity is about to ship a release. It now uses
>> jakarta-log4j. It is often used in combination with other subprojects.
>>
>> And some of the methods velocity uses from log4j were just removed.
>>
>> This means that we either need to tell people not to upgrade to the latest
>> log4j until everybody can (a logistical nightmare), get log4j to support
>> the old interfaces for a period of time in a deprecated fashion, or we need
>> to find a technique that velocity can use that works with both the prior
>> and intended future releases of log4j.
>>
>> If we don't do one of these three things, then the first log4j in the
>> classpath will likely break somebody.
>>
>> Note: due to a stupid error on my part, the last gump run didn't pick up
>> the recent changes to the project definitions. Here is the set of errrors
>> that would have been found:
>>
>> compile:
>> [javac] Compiling 150 source files to D:\jakarta\jakarta-velocity\bin\classes
>> [javac]
>D:\jakarta\jakarta-velocity\bin\src\org\apache\velocity\runtime\log\Log4JLogSystem.java:162:
> Incompatible type for method. Can't convert
>> int to java.lang.String.
>> [javac] ((RollingFileAppender)appender).setMaxFileSize(fileSize);
>> [javac] ^
>> [javac]
>D:\jakarta\jakarta-velocity\bin\src\org\apache\velocity\runtime\log\Log4JLogSystem.java:243:
> No variable SMTP_HOST_OPTION defined in class
>> org.apache.log4j.net.SMTPAppender.
>> [javac] appender.setOption(SMTPAppender.SMTP_HOST_OPTION, smtpHost);
>> [javac] ^
>> [javac]
>D:\jakarta\jakarta-velocity\bin\src\org\apache\velocity\runtime\log\Log4JLogSystem.java:244:
> No variable FROM_OPTION defined in class
>> org.apache.log4j.net.SMTPAppender.
>> [javac] appender.setOption(SMTPAppender.FROM_OPTION, emailFrom);
>> [javac] ^
>> [javac]
>D:\jakarta\jakarta-velocity\bin\src\org\apache\velocity\runtime\log\Log4JLogSystem.java:245:
> No variable TO_OPTION defined in class
>> org.apache.log4j.net.SMTPAppender.
>> [javac] appender.setOption(SMTPAppender.TO_OPTION, emailTo);
>> [javac] ^
>> [javac]
>D:\jakarta\jakarta-velocity\bin\src\org\apache\velocity\runtime\log\Log4JLogSystem.java:246:
> No variable SUBJECT_OPTION defined in class
>> org.apache.log4j.net.SMTPAppender.
>> [javac] appender.setOption(SMTPAppender.SUBJECT_OPTION, emailSubject);
>> [javac] ^
>> [javac]
>D:\jakarta\jakarta-velocity\bin\src\org\apache\velocity\runtime\log\Log4JLogSystem.java:247:
> No variable BUFFER_SIZE_OPTION defined in
>> class org.apache.log4j.net.SMTPAppender.
>> [javac] appender.setOption(SMTPAppender.BUFFER_SIZE_OPTION, bufferSize);
>> [javac] ^
>> [javac] Note: 2 files use or override a deprecated API. Recompile with
>"-deprecation" for details.
>> [javac] 6 errors, 1 warning
>>
>> - Sam Ruby
>>
>> ---------------------------------------------------------------------
>> 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]
I hope to see you at my ApacheCon 2001 presentation
entitled "Log4j, A Logging Package for Java".
See http://ApacheCon.Com/2001/US/ for more details.
----
Ceki Gülcü Web: http://qos.ch
av. de Rumine 5 email: [EMAIL PROTECTED] (preferred)
CH-1005 Lausanne [EMAIL PROTECTED]
Switzerland Tel: ++41 21 351 23 15
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]