velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: Setting logging for Velocity singlton doesnt work
Date Fri, 08 Mar 2002 15:27:16 GMT
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>


Mime
View raw message