You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Geir Magnusson Jr." <ge...@optonline.net> on 2001/07/28 13:32:13 UTC

problems with the Velocity GUMP build

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


Re: problems with the Velocity GUMP build

Posted by Ceki Gülcü <cg...@qos.ch>.
At 08:01 28.07.2001 -0400, Geir Magnusson Jr. wrote:
>Ceki Gülcü wrote:
>> 
>> 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.

Sorry, the above statement is incorrect. It is in log4j 1.1 that  we moved to JavaBeans type of configuration using introspection. In log4j 1.2 deprecated methods will be (are) removed.  

>> 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);
>
>Sounds good.
> 
>> 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).
>
>Ok - will do.  I will assume this was deprecated, as I am sure you live
>in fear of the Deprecation Goon Squad as much as we do... :)
> 
>> Let me know if you have any difficulty in making these
>> changes. Regards, Ceki
>
>I will try to get them in right now... I will be away tonight and
>tomorrow, but will be able to verify if all went well when I get back -
>I guess I can build against the latest log4j to test, too.

Yes. These changes are compatible with log4j 1.1.x and the latest code in our CVS rep (future log4j 1.2).

>Thanks for the prompt response.

You are welcome. Ceki


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


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


Re: problems with the Velocity GUMP build

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Ceki Gülcü wrote:
> 
> 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);

Sounds good.
 
> 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).

Ok - will do.  I will assume this was deprecated, as I am sure you live
in fear of the Deprecation Goon Squad as much as we do... :)
 
> Let me know if you have any difficulty in making these
> changes. Regards, Ceki

I will try to get them in right now... I will be away tonight and
tomorrow, but will be able to verify if all went well when I get back -
I guess I can build against the latest log4j to test, too.

Thanks for the prompt response.

geir

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


Re: problems with the Velocity GUMP build

Posted by Ceki Gülcü <cg...@qos.ch>.
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.                           geirm@optonline.net
>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: log4j-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

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


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