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: Configuring runtime.log for production use
Date Sat, 05 Oct 2002 19:11:23 GMT
On 10/4/02 2:11 PM, "Barbara Baughman" <baughman@utdallas.edu> wrote:

> May I suggest using Log4j for the velocity log?  Velocity uses a rolling
> file log type in log4j, so it will write to a log file until it reaches
> a certain size, then create a new file.  When the new file gets to a
> certain size, it overwrites the backup with the current file and creates
> another new file.  That way you can limit the amount of space used by the
> Velocity log, but still have the most recent messages for debugging.
> 
> See the Developer's Guide for information about setting up log4j as the
> velocity logging system.  These are the lines in velocity.properties that
> I use to keep the file size to 10K and keep one backup file.
> 
> runtime.log.logsystem.log4j.file.size=10000
> runtime.log.logsystem.log4j.file.backups=1

That logger has been deprecated because Velocity had to support all the
configuration options of log4j.

Instead, there is a simple log4j logger that just takes the category name,
and velocity will log to that.  That way, you can setup log4j in any way you
want in your program - you aren't limited to what Velocity supports.

Information on the new logger should be in the docs.

Geir

> 
> 
> Barbara Baughman
> X2157
> 
> On Fri, 4 Oct 2002, Curt Larock wrote:
> 
>> You can turn off the log entirely by changing the logsystem
>> in your Velocity configuration like this:
>> 
>> runtime.log.logsystem.class = org.apache.velocity.runtime.log.NullLogSystem
>> 
>> -----Original Message-----
>> From: Joshua.Levy@reasoning.com [mailto:Joshua.Levy@reasoning.com]
>> Sent: Friday, October 04, 2002 1:30 PM
>> To: velocity-user@jakarta.apache.org
>> Subject: Configuring runtime.log for production use
>> 
>> 
>> 
>> I have some questions about the Velocity's runtime log file.
>> 
>> The first is simple, is there a way to turn it off?  Something like
>> this:
>> setProperty("runtime.log", null);
>> setProperty("runtime.log", "");
>> 
>> If not, can I minimize the amount of stuff written to the log?
>> I'm switching from a testing type environment to a production
>> type environment.  Velocity will be used by a TTY application,
>> so errors will be obvious to the user immeadiately.  On the
>> other hand, I'm worried about the log file growing and growing
>> off in a corner somewhere (or leaving little 'velocity.log' turds
>> all over the file system).  I looked at the on line docs, but
>> didn't see the answer to this exact question.
>> 
>> Joshua
>> 
>> 
>> 
>> 
>> --
>> 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>
> 

-- 
Geir Magnusson Jr. 
geirm@adeptra.com                                    +1-203-355-2219 (w)
Adeptra Inc.                                         +1-203-247-1713 (m)



--
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