On 6/21/05, Bruno Melloni <[EMAIL PROTECTED]> wrote: > But I'd like to suggest that you don't "just" put the XML config file > in the webapp. You really want to do both. A few days ago someone > mentioned the name of an environment variable that if passed at app > server startup (with -D... option) it would say where to pick up the > log4j file.
But you must be careful with this - sometimes, you get somebody else's jar with a log4j.properties buried inside it, and it decides it wants the root logger in DEBUG level, or your Layour isn't as nice as the one defined in said log4j.properties file. Or, God forbid, you get a jar that gets into its head the idea of setting the log4j.configuration property to its own secret log4j file. Now, you get your tomcat running, and it logs fine. Reload your context and all your logger configurations are gone. If your logs start disappearing or formatting wrong after a context reload, check your jars for a rogue log4j.properties, or the log4j.configuration system variable. Might save you the time I lost finding it out :) -- Javier Gonzalez Nicolini --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
