Re: shutdownHook and programmatic configuration

2014-06-05 Thread Ralph Goers
If you create a file named log4j2.component.properties and place it in the class path you can specify any of the log4j system properties to tailor the desired behavior. The log4j-web module does this to disable the shutdown hook when running in a web container. Ralph On Jun 5, 2014, at 11:42

Re: shutdownHook and programmatic configuration

2014-06-05 Thread Matt Sicker
That doesn't sound too far off from what I'd expect is the case (or desired case) in a lot of environments. You can use property placeholders in a lot of places to be later configured through various means, and you can even specify the configuration via JNDI. In regards to the shutdown hook, perha

Re: shutdownHook and programmatic configuration

2014-06-04 Thread James Bellenger
Hi Matt. Our environment is a custom scala application server. Our use case is the same as most standalone java apps -- we just want to log stuff and have it go somewhere. We're extremely vanilla in what we need from log4j -- it's really just different combinations of console, rollingfile, and flum

Re: shutdownHook and programmatic configuration

2014-06-04 Thread Matt Sicker
It's supposed to help clean up any resources and commit anything necessary. It sounds like you're having the opposite effect, though. Any details about environment or plugins that might help? On 4 June 2014 16:59, James Bellenger wrote: > (sorry for the fat-fingered send earlier) > > Hello. > O

Re: shutdownHook and programmatic configuration

2014-06-04 Thread James Bellenger
(sorry for the fat-fingered send earlier) Hello. Our environment depends on these things: - programmatic log4j configuration - having "shutdownHook" disabled - ideally: not having to depend on the log4j.configurationFile environment var I've had a hard time balancing all three of the

shutdownHook and programmatic configuration

2014-06-04 Thread James Bellenger
Hello. Our environment depends on two things: - programmatic log4j configuration - having "shutdownHook" disabled - ideally: not having to depend on the log4j.configurationFile environment var programmatic configuration of log4j2. In trying to remove any dependencies on the log4j.con