public class LogManager extends Object
Log
.Modifier and Type | Field and Description |
---|---|
static String |
LOGSYSTEM_JAVA_UTIL_LOGGING
Log systems currently known
|
static String |
LOGSYSTEM_LOG4J2 |
Modifier | Constructor and Description |
---|---|
protected |
LogManager()
Prevents instantiation
|
Modifier and Type | Method and Description |
---|---|
static Log |
getLog(Class<?> clazz)
Returns a Log using the fully qualified name of the Class as the Log
name.
|
static Log |
getLog(String name)
Returns a Log with the specified name.
|
static Log |
getRootLogger()
Returns the root logger.
|
static void |
setLogSystem(String logSystem)
Set the log system.
|
static void |
shutdown()
Shutdown the logging system if the logging system supports it.
|
public static final String LOGSYSTEM_JAVA_UTIL_LOGGING
public static final String LOGSYSTEM_LOG4J2
protected LogManager()
public static void setLogSystem(String logSystem)
logSystem
- the logSystem to setpublic static void shutdown()
public static Log getLog(Class<?> clazz)
clazz
- The Class whose name should be used as the Log name.UnsupportedOperationException
- if clazz
is null
public static Log getLog(String name)
name
- The logger name.UnsupportedOperationException
- if name
is null
public static Log getRootLogger()
LogFactory.ROOT_LOGGER_NAME
.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.