velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Fenbers <Mark.Fenb...@noaa.gov>
Subject Re: Velocity Logging
Date Tue, 07 Oct 2008 22:18:12 GMT

> If you use setProperty() make sure you do it AFTER the init(), because 
> init will wipe out any previous setProperties(), this may be the problem.
I tried it both before and after, and either way the setProperty() is 
being ignored.
> I don't follow here because ./velocity.log is the default log, you 
> seem to refer to a different default log.
I didn't mean to.  My program is intended to be used by several people 
at once on a local area network -- each person running his own 
instance.  The network filesystem is shared and so every instance of my 
app reads the same velocity.properties file and is writing to one 
central log file, which makes it messy.  Instead, I want each instance 
to have a unique filename (determined by each instance right after 
launch) for the velocity log, so that the log is easier to browse/trace 
if something goes wrong.  In other words, when John runs my app, his 
velocity log file would be velocity-John.log, and Steve's would be 
velocity-Steve.log, and so on.
> Sounds like your intent is to set runtime.log each time you process a 
> velocity template for a given user.  
No, not for each template, but for each instance of my application. (see 
above)
> Or maybe a logging package like Log4J or the java logging facility has 
> an appender that does what you need.
Actually, I've already set up Velocity to use the log4j chute.

Hopefully, my clarifications will help prompt more ideas...

Mark.


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


Mime
View raw message