You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Ha...@daimlerchrysler.com on 2002/01/16 09:42:49 UTC

Velocity w/o logging?

Hi!

We're using using the Velocity/Turbine framework for generating dynamic views 
on data. We would like to distribute this data browser on a CD, so we have to 
start the server from a CD. This works in principle, but we couldn't find a way 
to switch off the velocity logging mechanism (the logging path is always 
relative to the top level directory, which is on the CD and cannot be written 
to). Could you include a way to either 1) Set an absolute logging path, or 2) 
Switch off the logging altogether?

Thanks for your product, thanks for your effort!

Hauke Hildebrandt

Dr. Hauke Hildebrandt
DaimlerChrysler AG - Research & Technology
Knowledge Based Engineering (RIC/EK)
Visitors: Alt-Moabit 96a, D-10559 Berlin
HPC: 096/BLN
Phone: +49 30 39982 271
Fax: +49 30 39982 107
E-Mail: Hauke.Hildebrandt@DaimlerChrysler.com
--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity w/o logging?

Posted by Christoph Reck <Ch...@dlr.de>.
You can also use the stderr logger from the contributions:
  http://cvs.apache.org/viewcvs/jakarta-velocity/contrib/temporary/stderrlogsystem/

:) Christoph

Hauke.Hildebrandt@daimlerchrysler.com wrote:
> 
> Hi!
> 
> We're using using the Velocity/Turbine framework for generating dynamic views
> on data. We would like to distribute this data browser on a CD, so we have to
> start the server from a CD. This works in principle, but we couldn't find a way
> to switch off the velocity logging mechanism (the logging path is always
> relative to the top level directory, which is on the CD and cannot be written
> to). Could you include a way to either 1) Set an absolute logging path, or 2)
> Switch off the logging altogether?
> 
> Thanks for your product, thanks for your effort!
> 
> Hauke Hildebrandt
> 
> Dr. Hauke Hildebrandt
> DaimlerChrysler AG - Research & Technology
> Knowledge Based Engineering (RIC/EK)
> Visitors: Alt-Moabit 96a, D-10559 Berlin
> HPC: 096/BLN
> Phone: +49 30 39982 271
> Fax: +49 30 39982 107
> E-Mail: Hauke.Hildebrandt@DaimlerChrysler.com
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 
:) Christoph Reck

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity w/o logging?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 1/16/02 3:42 AM, "Hauke.Hildebrandt@daimlerchrysler.com"
<Ha...@daimlerchrysler.com> wrote:

> Hi!
> 
> We're using using the Velocity/Turbine framework for generating dynamic views
> on data. We would like to distribute this data browser on a CD, so we have to
> start the server from a CD. This works in principle, but we couldn't find a
> way 
> to switch off the velocity logging mechanism (the logging path is always
> relative to the top level directory, which is on the CD and cannot be written
> to). Could you include a way to either 1) Set an absolute logging path, or 2)
> Switch off the logging altogether?
> 
> Thanks for your product, thanks for your effort!

There is a bit-bucket logger floating around somewhere...  It's in the core
distro -  

  org.apache.velocity.runtime.log.NullLogSystem

You should be able to configure it this way via velocity properties or in
code :


  Velocity.setProperty( RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
     "org.apache.velocity.runtime.log.NullLogSystem" );


if you get my drift.

This logger class literally does nothing. (But does it well.)

Another approach, which is less scary (as if something does go wrong, you
can put to a screen/window/view ) is to implement LogSystem interface on one
of your classes, and pass an instance of that class to Velocity to use.  See
the logger example in /examples.

geir

P.S. And as always, if you are using Velocity and company (or personal)
policy doesn't prohibit the disclosure of technologies used, and you want us
to list it,  we would love to add your product / usage of Velocity to our
powered-by list.


> 
> Hauke Hildebrandt
> 
> Dr. Hauke Hildebrandt
> DaimlerChrysler AG - Research & Technology
> Knowledge Based Engineering (RIC/EK)
> Visitors: Alt-Moabit 96a, D-10559 Berlin
> HPC: 096/BLN
> Phone: +49 30 39982 271
> Fax: +49 30 39982 107
> E-Mail: Hauke.Hildebrandt@DaimlerChrysler.com
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"He who throws mud only loses ground." - Fat Albert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>