velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nbu...@gmail.com>
Subject Re: Velocity Logging
Date Wed, 08 Oct 2008 15:44:53 GMT
On Tue, Oct 7, 2008 at 9:53 PM, Byron Foster <byron@base2.cc> wrote:
>
> 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).

hmm.  it appears you're right.  i'd never noticed that.  i think i'm
gonna change that.  i can't see any reason it should be that way.

in the meantime, i suppose you will just have to use setProperty() for
all your changes.

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


Mime
View raw message