|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.logging.Log4jConfigurer
public abstract class Log4jConfigurer
Log4j initializer. Loads the file specified using the log4j.config
init parameter and optionally set a
system property containing the magnolia web application root directory with the name specified by the
magnolia.root.sysproperty
init parameter.
If magnolia.root.sysproperty
is empty no system variable will be set; if log4j.config
is empty no log4j initialization will be performed.
You can easily specify relative paths for log4j configuration files using the magnolia root system property, for
example using ${magnolia.root}logs/magnolia-debug.log
Note: if you drop multiple magnolia wars in a container which doesn't isolate system properties (e.g. tomcat) you
could need to change the name of the magnolia.root.sysproperty
variable in web.xml and in log4j
configuration files.
Some ideas and snippets borrowed from the more complex Spring implementation http://www.springframework.org
Field Summary | |
---|---|
static java.lang.String |
LOG4J_CONFIG
Init parameter specifying the location of the Log4J config file. |
Method Summary | |
---|---|
static void |
initLogging()
Initialize Log4J, including setting the web app root system property. |
static void |
shutdownLogging()
Shuts down Log4J. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LOG4J_CONFIG
Method Detail |
---|
public static void initLogging()
public static void shutdownLogging()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |