ch.qos.logback.classic.util
Class ContextInitializer

java.lang.Object
  extended by ch.qos.logback.classic.util.ContextInitializer

public class ContextInitializer
extends Object

This class contains logback's logic for automatic configuration

Author:
Ceki Gulcu

Field Summary
static String AUTOCONFIG_FILE
           
static String CONFIG_FILE_PROPERTY
           
static String STATUS_LISTENER_CLASS
           
static String SYSOUT
           
static String TEST_AUTOCONFIG_FILE
           
 
Constructor Summary
ContextInitializer(LoggerContext loggerContext)
           
 
Method Summary
 void autoConfig()
          Configures logback with the first configuration found in the following search path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTOCONFIG_FILE

public static final String AUTOCONFIG_FILE
See Also:
Constant Field Values

TEST_AUTOCONFIG_FILE

public static final String TEST_AUTOCONFIG_FILE
See Also:
Constant Field Values

CONFIG_FILE_PROPERTY

public static final String CONFIG_FILE_PROPERTY
See Also:
Constant Field Values

STATUS_LISTENER_CLASS

public static final String STATUS_LISTENER_CLASS
See Also:
Constant Field Values

SYSOUT

public static final String SYSOUT
See Also:
Constant Field Values
Constructor Detail

ContextInitializer

public ContextInitializer(LoggerContext loggerContext)
Method Detail

autoConfig

public void autoConfig()
                throws JoranException
Configures logback with the first configuration found in the following search path. If no configuration found, nothing is done and logging is disabled.
  1. ${logback.configurationFile} (a system property)
  2. jar:file://assets/logback.xml

Throws:
JoranException


Copyright © 2005-2013 QOS.ch. All Rights Reserved.