logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Kristensen <akristen...@dynamicsoft.com>
Subject Re: log4j changes impacting velocity
Date Tue, 20 Mar 2001 12:53:37 GMT
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.

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.


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: log4j-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

View raw message