velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Byron Foster <by...@base2.cc>
Subject Re: Velocity Logging
Date Wed, 08 Oct 2008 04:53:17 GMT

On Oct 7, 2008, at 15:08 , Nathan Bubna wrote:

> On Tue, Oct 7, 2008 at 2:29 PM, Byron Foster <byron@base2.cc> wrote:
>> Mark Fenbers wrote:
>>>
>>> Thanks!  Your info was quite helpful and I was able to read in the
>>> file (finally!) using Velocity.init() -- as you show below, but when
>>> I used Velocity.setProperty() to set the "runtime.log" as you have
>>> shown below, it gets ignored.
>>
>> If you use setProperty() make sure you do it AFTER the init(),  
>> because init
>> will wipe out any previous setProperties(), this may be the problem.
>
> no, once any of the init() methods are called, the log system is
> initialized and further setProperty() calls are ignored.  So, if you
> are using init(pathToPropsFile), then any properties set in that file
> override previous properties set and that's it.  do your setProperty
> calls before init().

Yep, true, my bad.  However, you can't set it before either in the  
case of the init(String) method because it removes all prior  
properties set with the Velocity.setProperty method.  So, I guess the  
short version is that you can't use setProperty if you are going to  
use init(String).




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message