velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nbu...@gmail.com>
Subject Re: Velocity Logging
Date Tue, 07 Oct 2008 23:04:42 GMT
On Tue, Oct 7, 2008 at 3:18 PM, Mark Fenbers <Mark.Fenbers@noaa.gov> wrote:
>
>> 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.

ok, leaving method aside for the moment, what logging properties are
you setting?

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

did you set a property for runtime.log.logsystem.log4j.logger?  if so,
then you are telling Velocity to send message there, rather than set
up its own logger.  With Velocity's Log4jLogChute, the runtime.log
property is only relevant if velocity is picking the logger.  We try
to be a good citizen and not add file appender's to other people's
loggers.

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

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


Mime
View raw message