|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.ext.spring.LogbackConfigurer
public class LogbackConfigurer
Convenience class that features simple methods for custom Log4J configuration.
Only needed for non-default Logback initialization with a custom config location. By default, Logback will simply read its configuration from a "logback.xml" or "logback_test.xml" file in the root of the classpath. For web environments, the analogous LogbackWebConfigurer class can be found in the web package, reading in its configuration from context-params in web.xml. In a JEE web application, Logback is usually set up via LogbackConfigListener or LogbackConfigServlet, delegating to LogbackWebConfigurer underneath.
WebLogbackConfigurer
,
LogbackConfigListener
,
LogbackConfigServlet
Method Summary | |
---|---|
static void |
initLogging(String location)
Initialize logback from the given file. |
static void |
setWorkingDirSystemProperty(String key)
Set the specified system property to the current working directory. |
static void |
shutdownLogging()
Shut down Logback. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void initLogging(String location) throws FileNotFoundException, ch.qos.logback.core.joran.spi.JoranException
location
- the location of the config file: either a "classpath:" location
(e.g. "classpath:logback.xml"), an absolute file URL
(e.g. "file:C:/logback.xml), or a plain absolute path in the file system
(e.g. "C:/logback.xml")
FileNotFoundException
- if the location specifies an invalid file path
ch.qos.logback.core.joran.spi.JoranException
- Thrownpublic static void setWorkingDirSystemProperty(String key)
key
- system property key to use, as expected in Logback configuration
(for example: "demo.root", used as "${demo.root}/WEB-INF/demo.log")WebLogbackConfigurer
public static void shutdownLogging()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |