velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Rodriguez" <jr...@columbia.edu>
Subject RE: setting up velocity to log to servlet log
Date Mon, 10 Jan 2005 14:58:29 GMT
Another pecularity is that a 'blah.log' appears in another webapp
hierarchy, using AvalonLogSystem even though I commented it out in the
velocity.properties file?

By now, I'm assuming that Log4j is not built into velocity-dep.jar and
so when it's looked for, it fails, and attempts to save face by
including AvalonLogSystem rather than complain to the user (possibly too
user-friendly since it may be a pain for sysadmins to debug?).  But why
what setting could cause it to log messages for one project into
another's file hierarchy?

Slightly befuddled,
-John

-----Original Message-----
From: John Rodriguez [mailto:jr534@columbia.edu] 
Sent: Monday, January 10, 2005 8:55 AM
To: 'Velocity Users List'
Subject: setting up velocity to log to servlet log

Right now, Tomcat is set up to log to
${TOMCAT_HOME}/logs/localhost_log.yyyy-mm-dd.txt (yyyy-mm-dd being the
current date, of course).
I tire of Velocity using the AvalonLogSystem and logging to my app tree,
instead I wish to point it to the servlet logs (at least for this
particular app).
 
I read the manual and several docs online but I don't seem to be setting
it up correctly.  One way I figure this is the case, is that none of the
info messages I used to get in the WEB-INF/logs/velocity.log appear now,
e.g.
 
Resource Loader Instantiated:
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
 
I set up my velocity.properties as follows:
runtime.log.logsystem.class =
org.apache.velocity.runtime.log.SimpleLog4JLogSystem
runtime.log = blah.log #from my understanding, not needed, but just
renamed as check to make sure
 
This is all I do, and I reload the webapp in Tomcat and nothing happens.
 
I have seen configurations where the webapp creates logger objects at
runtime but I'd like to configure this outside of the code (via config
files or env vars) if possible.
 
All I want is to see something similar to the following in my
localhost_log.yyyy-mm-dd.txt (I'll worry about date formatting, etc.
later)
 
.
2005-01-10 00:05:44 StandardContext[/jrod/myproject]: Reloading this
Context is completed    #tomcat logs
Thu Jan 06 17:37:03 EST 2005   [info] Resource Loader Instantiated:
org.apache.velocity.runtime.resource.loader.FileResourceLoader
#velocity logs
.
 
Any ideas for this noob? :-)
 
Respectfully,
-John


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


Mime
View raw message