| Package | Description |
|---|---|
| org.apache.logging.log4j |
Public API for Log4j 2.
|
| org.apache.logging.log4j.message |
Public Message Types used for Log4j 2.
|
| org.apache.logging.log4j.simple |
Simple logging implementation.
|
| org.apache.logging.log4j.spi |
Internal interfaces and classes to be used by authors of logging implementations or for internal use by API classes.
|
| Modifier and Type | Method and Description |
|---|---|
MessageFactory |
Logger.getMessageFactory()
Gets the message factory used to convert message Objects and Strings into actual log Messages.
|
| Modifier and Type | Method and Description |
|---|---|
static Logger |
LogManager.getLogger(Class
Returns a Logger using the fully qualified name of the Class as the Logger name.
|
static Logger |
LogManager.getLogger(MessageFactory
Returns a Logger with the name of the calling class.
|
static Logger |
LogManager.getLogger(Object
Returns a Logger using the fully qualified class name of the value as the Logger name.
|
static Logger |
LogManager.getLogger(String
Returns a Logger with the specified name.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractMessageFactory
Provides an abstract superclass for MessageFactory implementations with default implementations.
|
class |
FormattedMessageFactory
Creates
FormattedMessage instances for
FormattedMessageFactory.
|
class |
LocalizedMessageFactory
Creates
LocalizedMessage instances for
LocalizedMessageFactory.
|
class |
MessageFormatMessageFactory
Creates
MessageFormatMessage instances for
MessageFormatMessageFactory.
|
class |
ParameterizedMessageFactory
Enables use of
{} parameter markers in message strings.
|
class |
ParameterizedNoReferenceMessageFactory
Specialized
ParameterizedMessageFactory that creates
SimpleMessage objects that do not retain a reference to the parameter object.
|
class |
SimpleMessageFactory
Factory for the simplest possible implementation of Message, the Message String given as the constructor argument.
|
class |
StringFormatterMessageFactory
Enables use of
Formatter strings in message strings.
|
| Modifier and Type | Method and Description |
|---|---|
ExtendedLogger |
SimpleLoggerContext.getLogger(String
|
boolean |
SimpleLoggerContext.hasLogger(String
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
SimpleLoggerContext.hasLogger(String
|
| Constructor and Description | |
|---|---|
SimpleLogger(String
|
| Modifier and Type | Field and Description |
|---|---|
static Class |
AbstractLogger.DEFAULT_MESSAGE_FACTORY_CLASS
The default MessageFactory class.
|
| Modifier and Type | Method and Description |
|---|---|
MessageFactory |
AbstractLogger.getMessageFactory()
|
| Modifier and Type | Method and Description |
|---|---|
static void |
AbstractLogger.checkMessageFactory(ExtendedLogger
Checks that the message factory a logger was created with is the same as the given messageFactory.
|
static String |
LoggerContextKey.create(String
|
ExtendedLogger |
LoggerContext.getLogger(String
Returns an ExtendedLogger.
|
boolean |
LoggerContext.hasLogger(String
Detects if a Logger with the specified name and MessageFactory exists.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
LoggerContextKey.create(String
|
boolean |
LoggerContext.hasLogger(String
Detects if a Logger with the specified name and MessageFactory type exists.
|
| Constructor and Description | |
|---|---|
AbstractLogger(String
Creates a new named logger with a particular
MessageFactory.
|
|
ExtendedLoggerWrapper(ExtendedLogger
Constructor that wraps and existing Logger.
|