public class Log4j2Factory extends Object implements LogFactory
ROOT_LOGGER_NAME
Constructor and Description |
---|
Log4j2Factory() |
Modifier and Type | Method and Description |
---|---|
Log |
getLog(Class<?> clazz)
Returns a Log using the fully qualified name of the Class as the Log
name.
|
Log |
getLog(String name)
Returns a Log with the specified name.
|
String |
getName()
Return the name of the Log subsystem managed by this factory
|
void |
shutdown()
Shutdown the logging system if the logging system supports it.
|
public Log4j2Factory()
public String getName()
getName
in interface LogFactory
public void shutdown()
shutdown
in interface LogFactory
public Log getLog(Class<?> clazz)
getLog
in interface LogFactory
clazz
- The Class whose name should be used as the Log name. If null
it will default to the calling class.UnsupportedOperationException
- if clazz
is null
and the calling class cannot
be determined.public Log getLog(String name)
getLog
in interface LogFactory
name
- The logger name. If null the name of the calling class will be
used.UnsupportedOperationException
- if name
is null
and the calling class cannot
be determined.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.