|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.logging.log4j.LogManager
public class LogManager
The anchor point for the logging system.
| Field Summary | |
|---|---|
static String |
ROOT_LOGGER_NAME
The name of the root Logger. |
| Constructor Summary | |
|---|---|
protected |
LogManager()
Prevent instantiation |
| Method Summary | |
|---|---|
static LoggerContext |
getContext()
Returns the current LoggerContext. |
static LoggerContext |
getContext(boolean currentContext)
Returns a LoggerContext. |
protected static LoggerContext |
getContext(String fqcn,
boolean currentContext)
Returns a LoggerContext |
static LoggerContextFactory |
getFactory()
Return the LoggerContextFactory. |
static Logger |
getLogger(String name)
Return a Logger with the specified name. |
protected static Logger |
getLogger(String fqcn,
String name)
Return a Logger with the specified name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ROOT_LOGGER_NAME
| Constructor Detail |
|---|
protected LogManager()
| Method Detail |
|---|
public static LoggerContextFactory getFactory()
public static Logger getLogger(String name)
name - The logger name.
protected static Logger getLogger(String fqcn,
String name)
fqcn - The fully qualified class name of the class that this method is a member of.name - The logger name.
public static LoggerContext getContext()
WARNING - The LoggerContext returned by this method may not be the LoggerContext used to create a Logger for the calling class.
public static LoggerContext getContext(boolean currentContext)
currentContext - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may be
returned. If true then only a single LoggerContext will be returned.
protected static LoggerContext getContext(String fqcn,
boolean currentContext)
fqcn - The fully qualified class name of the Class that this method is a member of.currentContext - if false the LoggerContext appropriate for the caller of this method is returned. For
example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext may be
returned and if the caller is a class in the container's classpath then a different LoggerContext may be
returned. If true then only a single LoggerContext will be returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||