Byron,

Thanks! Your info was quite helpful and I was able to read in the file (finally!) using Velocity.init() -- as you show below, but when I used Velocity.setProperty() to set the "runtime.log" as you have shown below, it gets ignored. If I remove the runtime.log entry in the properties file, then the default log is used instead (./velocity.log). What I wish is to use a different velocity log file for each user (as different users will use separate instances of my software concurrently). My software is a standalone GUI application written in Java 5, not a web app. How can I specify a log file name (determined at run-time) if the setProperty() method does not work??

Mark

Byron Foster wrote:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to