velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Byron Foster <by...@base2.cc>
Subject Re: Velocity Logging
Date Tue, 07 Oct 2008 04:24:34 GMT
Hi Mark, It's hard to tell what's going on without knowing more about  
how you are trying to run Velocity, but... You can set the log  
location programtically (which might give you some insight as to if  
your properties file is being read):

org.apache.velocity.app.Velocity.setProperty("runtime.log",  
"<thepath>");

and the properties file is loaded with:

org.apache.velocity.app.Velocity.init("<the prop path>");

If your running with VelocityServlet, you can set the location of the  
velocity properties file with

     <init-param>
       <param-name>org.apache.velocity.properties</param-name>
       <param-value>/WEB-INF/velocity.props</param-value>
     </init-param>

On Oct 6, 2008, at 16:48 , Mark Fenbers wrote:

> Velocity is working, but I seem to have no control over where  
> Velocity writes its log info.  I changed the "runtime.log" entry in  
> the velocity.properties file to be a custom filename, but it still  
> writes to "velocity.log" in the current directory.  It appears that  
> the velocity.properties file is not being read at all.  I put this  
> file in both, the current directory, and in another place I know is  
> in the classpath, but still, the file isn't being read -- or at  
> least, the runtime.log entry within it is being ignored.  I've spent  
> more than 2 hours trying to hunt down info on what I might be doing  
> wrong, but to no avail.  I consider this posting as my last resort.


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


Mime
View raw message