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 |
LevelLogger.getMessageFactory()
Gets the message factory used to convert message Objects and Strings into actual log Messages.
|
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<?> clazz,
MessageFactory messageFactory)
Returns a Logger using the fully qualified name of the Class as the Logger name.
|
static Logger |
LogManager.getLogger(MessageFactory messageFactory)
Returns a Logger with the name of the calling class.
|
static Logger |
LogManager.getLogger(Object value,
MessageFactory messageFactory)
Returns a Logger using the fully qualified class name of the value as the Logger name.
|
static Logger |
LogManager.getLogger(String name,
MessageFactory messageFactory)
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.newMessage(String, Object...) . |
class |
LocalizedMessageFactory
Creates
LocalizedMessage instances for
LocalizedMessageFactory.newMessage(String, Object...) . |
class |
MessageFormatMessageFactory
Creates
MessageFormatMessage instances for
MessageFormatMessageFactory.newMessage(String, Object...) . |
class |
ParameterizedMessageFactory
Enables use of
{} parameter markers in message strings. |
class |
StringFormatterMessageFactory
Enables use of
Formatter strings in message strings. |
Modifier and Type | Method and Description |
---|---|
ExtendedLogger |
SimpleLoggerContext.getLogger(String name,
MessageFactory messageFactory) |
Constructor and Description |
---|
SimpleLogger(String name,
Level defaultLevel,
boolean showLogName,
boolean showShortLogName,
boolean showDateTime,
boolean showContextMap,
String dateTimeFormat,
MessageFactory messageFactory,
PropertiesUtil props,
PrintStream stream) |
Modifier and Type | Field and Description |
---|---|
static Class<? extends MessageFactory> |
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 logger,
MessageFactory messageFactory)
Checks that the message factory a logger was created with is the same as the given messageFactory.
|
ExtendedLogger |
LoggerContext.getLogger(String name,
MessageFactory messageFactory)
Returns a Logger.
|
Constructor and Description |
---|
AbstractLogger(String name,
MessageFactory messageFactory)
Creates a new named logger with a particular
MessageFactory . |
ExtendedLoggerWrapper(ExtendedLogger logger,
String name,
MessageFactory messageFactory)
Constructor that wraps and existing Logger.
|
Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.