You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Scott Eade <se...@backstagetech.com.au> on 2001/08/27 12:54:28 UTC

Velocity Logging

Is there a simple way to get velocity in turbine 2.1 to
use log4j rather than Avalon for its logging?

Thanks,

Scott



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


Re: Velocity Logging

Posted by Scott Eade <se...@backstagetech.com.au>.
From: <ps...@comcen.com.au>
To: <tu...@jakarta.apache.org>
Sent: Tuesday, August 28, 2001 9:34 AM
Subject: Re: Velocity Logging


> Scott,
> All you need to do is use the singleton class "Log" like this
>      Log.Info('Somethings wrong:' + msg);
>   OR
>      Log.Debug('Totally screwed now');
> after importing the class
> with 
>   import Turbine.services.Logger.Log (cant remeber exact syntax).
> 
> pat.

Pat,

I don't have a problem with using the logging service in the
manner you suggest.  What I want to do is switch the 
velocity service logging from Avalon to log4j so that I can 
have my production site email errors to me, roll logs, etc.  
I have these things working for turbine.log and now I want 
them for velocity.log.

Cheers,

Scott


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


Re: Velocity Logging

Posted by ps...@comcen.com.au.
Scott,
All you need to do is use the singleton class "Log" like this
     Log.Info('Somethings wrong:' + msg);
  OR
     Log.Debug('Totally screwed now');
after importing the class
with 
  import Turbine.services.Logger.Log (cant remeber exact syntax).

pat.


Quoting Scott Eade <se...@backstagetech.com.au>:
> From: "Geir Magnusson Jr." <ge...@optonline.net>
> > Yes - there is a log4j adapter currently in Velocity, and there is
> > another one coming (I can put in today if you are interested) that is
> > very simple to set up.
> 
> "Very simple to set up" sounds interesting to me.  Can you give me a 
> rough idea of how I would set this up in turbine 2.1?
> > 
> > geir
> > 
> Thanks,
> 
> Scott
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
> 

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


Re: Velocity Logging

Posted by Scott Eade <se...@backstagetech.com.au>.
From: "Geir Magnusson Jr." <ge...@optonline.net>
> I will get that code in place, and then give it a look-see. Ich nicht bin
> ein Turbiner, so I really haven't a clue - however, I do understand that you
> can set turbine properties to pass right through to Velocity, so I will keep
> that strategy in mind.
> 
> Geir

Geir,

Did you manage to get to this?  If you did, can you please point me
to a class name to get me going?  I'm assuming there will be a couple
of classes I can patch into the version of Velocity bundled with 
TDK 2.1 (velocity-1.2-dev.jar).

[OT] Should we be replacing velocity-1.2-dev.jar with the released
version of Velocity 1.2 in out TDK lib directories?

Thanks,

Scott



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


Re: Velocity Logging

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 8/27/01 6:37 PM, "Scott Eade" <se...@backstagetech.com.au> wrote:

> From: "Geir Magnusson Jr." <ge...@optonline.net>
>> Yes - there is a log4j adapter currently in Velocity, and there is
>> another one coming (I can put in today if you are interested) that is
>> very simple to set up.
> 
> "Very simple to set up" sounds interesting to me.  Can you give me a
> rough idea of how I would set this up in turbine 2.1?

I will get that code in place, and then give it a look-see. Ich nicht bin
ein Turbiner, so I really haven't a clue - however, I do understand that you
can set turbine properties to pass right through to Velocity, so I will keep
that strategy in mind.

Geir


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


Re: Velocity Logging

Posted by Scott Eade <se...@backstagetech.com.au>.
From: "Geir Magnusson Jr." <ge...@optonline.net>
> Yes - there is a log4j adapter currently in Velocity, and there is
> another one coming (I can put in today if you are interested) that is
> very simple to set up.

"Very simple to set up" sounds interesting to me.  Can you give me a 
rough idea of how I would set this up in turbine 2.1?
> 
> geir
> 
Thanks,

Scott


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


Re: Velocity Logging

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Scott Eade wrote:
> 
> Is there a simple way to get velocity in turbine 2.1 to
> use log4j rather than Avalon for its logging?
> 

Yes - there is a log4j adapter currently in Velocity, and there is
another one coming (I can put in today if you are interested) that is
very simple to set up.

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Well done is better than well said - New England Proverb

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