public class LogbackConfigurer extends Object
WebLogbackConfigurer,
LogbackConfigListener,
LogbackConfigServlet| Modifier and Type | Method and Description |
|---|---|
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.
|
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 pathch.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")WebLogbackConfigurerpublic static void shutdownLogging()
Copyright © 2014. All Rights Reserved.