RE: Logging best practices?
Mark Womack <womack <at> adobe.com>
2004-12-07 17:03:22 GMT
Ed,
I think your idea of using a system property to somehow choose the log4j
configuration to use for the region deployment is the right way to go. Then
you can reuse your war across all of your regions, but you will need to
package all of the region configurations in the war. At least it will be
the same build across all of the regions, and the only difference should be
the configuration, which hopefully will not affect your runtime behaviors
being tested (just the output of the log messages).
I am not familiar with the level of support in Spring, but besides an init
servlet, you may also want to consider including a configuration servlet so
that log4j settings can be changed during runtime. There is an example of a
simple, evolving version in the log4j-sandbox repository.
-Mark
-----Original Message-----
From: Moynihan, Edward [mailto:EMoynihan <at> russellmellon.com]
Sent: Tuesday, December 07, 2004 8:06 AM
To: Logging General
Subject: RE: Logging best practices?
While I understand and appreciate your comments, I unfortunately have to
work within the framework that I outlined.
To summarize, when I create a WAR file, it must contain the difference
logging levels for all managed regions. In this case, those regions are
Test, QA and Prod. I am working within the application server
administrators policy and there policy states that one build will be
(Continue reading)