Jake, > > One thing I noticed with the default behavior in InitShutdownController > is > > that if you deploy using a war file, then the WEB-INF/log directory > > typically ends up in the temp directory the container (like jboss) uses > to > > expand/explode the war file. Tracking down the location can be a bit > > tricky. Can't think of anything better there though. > > > > Well, that's why it is a default. I don't have the javadoc in front of > me, but > I think it is documented. If one cares enough to have the files be > located in > a particular location, then one can define the "log4j-log-home" context > param, > and generally override it in Appserver-specific config files. For > instance, in > Tomcat, you can override a context param by adding the following to you > Context > Configuration File... > > <Context ...> > <Parameter name="log-log-home" value="/path/to/log/directory" > override="false" > description="location for Log4j-generated log files"/> > </Context>
Got it. Do you think that supporting a JNDI resource is a better standard way to do this? I mean I still had to modify 2 configuration files (server.xml & context.xml) for Tomcat to get the JNDI to show up. Theoretically it might be easier for the administrator to change the JNDI value using the Tomcat admin tool. I am assuming that there is a similar way for context params and JNDI configuration in jBoss, though I have to figure it out still. > > I was also thinking that it would be good if the code that reads the > > log4j-log-home context parameter value could use OptionConverter to > > substitute system properties before attempting to verify/create the > > directory. That way system properties could be used in the web.xml > context > > parameter as well as the log4j config file itself. > > > > You mean something like setting log4j-log-home to something like > "${catalina.home}/logs" and then ${catalina.home} gets expanded before > being > applied to the "[MyApp].log.home" property? Sounds intersting as long as > ${catalina.home} is set from something analogous to the <Parameter> > element in > the Context Configuration File rather than setting it in the web.xml file. They are system properties, not context parameters. But I think this will be less important if values are set in the context params or via JNDI. > > BTW, did you consider anything that I wrote (below) about > ServletContextLogAppender? All you have to know to configure it is the > context > path, such as "/Myapp" and you define the log file for your servlet > context at > the appserver level. I did not get a chance. This is in the sandbox or core? We are still using 1.2.8 in prod. -Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]