velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Lawler" <justindlaw...@eircom.net>
Subject Re: Setting logging for Velocity singlton doesnt work
Date Fri, 08 Mar 2002 17:06:02 GMT
ok, i now know the problem, i was setting the property and then initialising
velocity with a properties file, so all previously set properties would get
over writen. Is this intentional behviour or should it add the properties
from a configuration file if the overriding properties is not null?


----- Original Message -----
From: Geir Magnusson Jr. <geirm@optonline.net>
To: <velocity-user@jakarta.apache.org>
Sent: Friday, March 08, 2002 3:27 PM
Subject: Re: Setting logging for Velocity singlton doesnt work


> On 3/8/02 10:22 AM, "Justin Lawler" <justindlawler@eircom.net> wrote:
>
> > Why is it that when I set a logging system for the VelocityEngine class
eg.
> >   VelocityEngine.setProperty (RuntimeConstants.RUNTIME_LOG_LOGSYSTEM,
new
> > LogSystemImpl());
> >
> > the logging works, but when i do the same for the Velocity singlton, eg.
> >   Velocity.setProperty (RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, new
> > LogSystemImpl());
> >
> > it just resorts to the SimpleLog4JLogSystem. I had a good look through
the
> > code and I cant find any reason why it should do this.
>
> It should work just fine - the Singleton is just a static wrapper around
the
> same RuntimeImpl that the VelocityEngine uses.
>
> Are you sure that the singleton hasn't been initialized already?  Once
> Velocity.init() is called, no more configuration is allowed...
>
> --
> Geir Magnusson Jr.                                     geirm@optonline.net
> System and Software Consulting
>
> Age and treachery will always triumph over youth and talent
>
>
> --
> To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>
>
>


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


Mime
View raw message