Package | Description |
---|---|
org.apache.logging.log4j.core |
Implementation of Log4j 2.
|
org.apache.logging.log4j.core.appender |
Log4j 2 Appenders.
|
org.apache.logging.log4j.core.appender.db.jdbc |
The JDBC Appender supports writing log events to a relational database using standard JDBC connections.
|
org.apache.logging.log4j.core.appender.rewrite |
Apache Flume Appender.
|
org.apache.logging.log4j.core.appender.rolling |
Rolling File Appender and support classes.
|
org.apache.logging.log4j.core.appender.rolling.action |
Support classes for the Rolling File Appender.
|
org.apache.logging.log4j.core.appender.routing |
Apache Flume Appender.
|
org.apache.logging.log4j.core.async |
Provides Asynchronous Logger classes and interfaces for low-latency logging.
|
org.apache.logging.log4j.core.config |
Configuration of Log4j 2.
|
org.apache.logging.log4j.core.config.builder.api |
Configuration Builder API for programmatically configuring Log4j.
|
org.apache.logging.log4j.core.config.builder.impl |
Configuration Builder Implementation.
|
org.apache.logging.log4j.core.config.json |
Classes and interfaces supporting configuration of Log4j 2 with JSON.
|
org.apache.logging.log4j.core.config.plugins.util |
Utility and manager classes for Log4j 2 plugins.
|
org.apache.logging.log4j.core.config.plugins.visitors |
Visitor classes for extracting values from a Configuration or Node corresponding to a plugin annotation.
|
org.apache.logging.log4j.core.config.properties |
Configuration using Properties files.
|
org.apache.logging.log4j.core.config.xml |
Classes and interfaces supporting configuration of Log4j 2 with XML.
|
org.apache.logging.log4j.core.config.yaml |
Classes and interfaces supporting configuration of Log4j 2 with YAML.
|
org.apache.logging.log4j.core.filter |
Log4j 2 Filter support.
|
org.apache.logging.log4j.core.impl |
Log4j 2 private implementation classes.
|
org.apache.logging.log4j.core.layout |
Log4j 2 Layout support.
|
org.apache.logging.log4j.core.net.server |
Standalone server classes for consuming log events over a network.
|
org.apache.logging.log4j.core.pattern |
Provides classes implementing format specifiers in conversion patterns.
|
org.apache.logging.log4j.core.script |
Log4j 2 Script support.
|
Modifier and Type | Field and Description |
---|---|
Configuration |
Logger.PrivateConfig.config
The current Configuration associated with the LoggerConfig.
|
Modifier and Type | Method and Description |
---|---|
Configuration |
LoggerContext.getConfiguration()
Returns the current Configuration.
|
Modifier and Type | Method and Description |
---|---|
void |
LoggerContext.start(Configuration config)
Starts with a specific configuration.
|
protected void |
Logger.updateConfiguration(Configuration newConfig)
Associates this Logger with a new Configuration.
|
void |
LoggerContext.updateLoggers(Configuration config)
Causes all Logger to be updated against the specified Configuration.
|
Constructor and Description |
---|
PrivateConfig(Configuration config,
Logger logger) |
Modifier and Type | Method and Description |
---|---|
static AsyncAppender |
AsyncAppender.createAppender(AppenderRef[] appenderRefs,
String errorRef,
boolean blocking,
long shutdownTimeout,
int size,
String name,
boolean includeLocation,
Filter filter,
Configuration config,
boolean ignoreExceptions)
Create an AsyncAppender.
|
static SocketAppender |
SocketAppender.createAppender(String host,
int port,
Protocol protocol,
SslConfiguration sslConfig,
int connectTimeoutMillis,
int reconnectDelayMillis,
boolean immediateFail,
String name,
boolean immediateFlush,
boolean ignoreExceptions,
Layout<? extends Serializable> layout,
Filter filter,
boolean advertise,
Configuration config)
Creates a socket appender.
|
static SyslogAppender |
SyslogAppender.createAppender(String host,
int port,
String protocolStr,
SslConfiguration sslConfig,
int connectTimeoutMillis,
int reconnectionDelayMillis,
boolean immediateFail,
String name,
boolean immediateFlush,
boolean ignoreExceptions,
Facility facility,
String id,
int enterpriseNumber,
boolean includeMdc,
String mdcId,
String mdcPrefix,
String eventPrefix,
boolean newLine,
String escapeNL,
String appName,
String msgId,
String excludes,
String includes,
String required,
String format,
Filter filter,
Configuration config,
Charset charsetName,
String exceptionPattern,
LoggerFields[] loggerFields,
boolean advertise)
Create a SyslogAppender.
|
static FailoverAppender |
FailoverAppender.createAppender(String name,
String primary,
String[] failovers,
String retryIntervalSeconds,
Configuration config,
Filter filter,
String ignore)
Create a Failover Appender.
|
static SocketAppender |
SocketAppender.createAppender(String host,
String portNum,
String protocolIn,
SslConfiguration sslConfig,
int connectTimeoutMillis,
String delayMillis,
String immediateFail,
String name,
String immediateFlush,
String ignore,
Layout<? extends Serializable> layout,
Filter filter,
String advertise,
Configuration config)
Deprecated.
Use
#createAppender(String, String, Protocol, SslConfiguration, int, String, String, String, String, String, Layout, Filter, String, Configuration) . |
static RandomAccessFileAppender |
RandomAccessFileAppender.createAppender(String fileName,
String append,
String name,
String immediateFlush,
String bufferSizeStr,
String ignore,
Layout<? extends Serializable> layout,
Filter filter,
String advertise,
String advertiseURI,
Configuration config)
Create a File Appender.
|
static MemoryMappedFileAppender |
MemoryMappedFileAppender.createAppender(String fileName,
String append,
String name,
String immediateFlush,
String regionLengthStr,
String ignore,
Layout<? extends Serializable> layout,
Filter filter,
String advertise,
String advertiseURI,
Configuration config)
Create a Memory Mapped File Appender.
|
static FileAppender |
FileAppender.createAppender(String fileName,
String append,
String locking,
String name,
String immediateFlush,
String ignore,
String bufferedIo,
String bufferSizeStr,
Layout<? extends Serializable> layout,
Filter filter,
String advertise,
String advertiseUri,
Configuration config)
Create a File Appender.
|
static RollingFileAppender |
RollingFileAppender.createAppender(String fileName,
String filePattern,
String append,
String name,
String bufferedIO,
String bufferSizeStr,
String immediateFlush,
TriggeringPolicy policy,
RolloverStrategy strategy,
Layout<? extends Serializable> layout,
Filter filter,
String ignore,
String advertise,
String advertiseURI,
Configuration config)
Create a RollingFileAppender.
|
static RollingRandomAccessFileAppender |
RollingRandomAccessFileAppender.createAppender(String fileName,
String filePattern,
String append,
String name,
String immediateFlush,
String bufferSizeStr,
TriggeringPolicy policy,
RolloverStrategy strategy,
Layout<? extends Serializable> layout,
Filter filter,
String ignore,
String advertise,
String advertiseURI,
Configuration config)
Create a RollingRandomAccessFileAppender.
|
Modifier and Type | Method and Description |
---|---|
static ColumnConfig |
ColumnConfig.createColumnConfig(Configuration config,
String name,
String pattern,
String literalValue,
String eventTimestamp,
String unicode,
String clob)
Factory method for creating a column config within the plugin manager.
|
Modifier and Type | Method and Description |
---|---|
static RewriteAppender |
RewriteAppender.createAppender(String name,
String ignore,
AppenderRef[] appenderRefs,
Configuration config,
RewritePolicy rewritePolicy,
Filter filter)
Creates a RewriteAppender.
|
static PropertiesRewritePolicy |
PropertiesRewritePolicy.createPolicy(Configuration config,
Property[] props)
The factory method to create the PropertiesRewritePolicy.
|
Modifier and Type | Method and Description |
---|---|
static CronTriggeringPolicy |
CronTriggeringPolicy.createPolicy(Configuration configuration,
String evaluateOnStartup,
String schedule)
Creates a ScheduledTriggeringPolicy.
|
static DefaultRolloverStrategy |
DefaultRolloverStrategy.createStrategy(String max,
String min,
String fileIndex,
String compressionLevelStr,
Action[] customActions,
boolean stopCustomActionsOnError,
Configuration config)
Create the DefaultRolloverStrategy.
|
Modifier and Type | Method and Description |
---|---|
static ScriptCondition |
ScriptCondition.createCondition(AbstractScript script,
Configuration configuration)
Creates the ScriptCondition.
|
static DeleteAction |
DeleteAction.createDeleteAction(String basePath,
boolean followLinks,
int maxDepth,
boolean testMode,
PathSorter sorterParameter,
PathCondition[] pathConditions,
ScriptCondition scriptCondition,
Configuration config)
Create a DeleteAction.
|
Constructor and Description |
---|
ScriptCondition(AbstractScript script,
Configuration configuration)
Constructs a new ScriptCondition.
|
Modifier and Type | Method and Description |
---|---|
static RoutingAppender |
RoutingAppender.createAppender(String name,
String ignore,
Routes routes,
Configuration config,
RewritePolicy rewritePolicy,
PurgePolicy purgePolicy,
Filter filter)
Create a RoutingAppender.
|
static PurgePolicy |
IdlePurgePolicy.createPurgePolicy(String timeToLive,
String timeUnit,
Configuration configuration)
Create the PurgePolicy
|
Modifier and Type | Method and Description |
---|---|
static LoggerConfig |
AsyncLoggerConfig.RootLogger.createLogger(String additivity,
String levelName,
String includeLocation,
AppenderRef[] refs,
Property[] properties,
Configuration config,
Filter filter) |
static LoggerConfig |
AsyncLoggerConfig.createLogger(String additivity,
String levelName,
String loggerName,
String includeLocation,
AppenderRef[] refs,
Property[] properties,
Configuration config,
Filter filter)
Factory method to create a LoggerConfig.
|
void |
AsyncLoggerContext.start(Configuration config) |
protected void |
AsyncLogger.updateConfiguration(Configuration newConfig) |
Constructor and Description |
---|
AsyncLoggerConfig(String name,
List<AppenderRef> appenders,
Filter filter,
Level level,
boolean additive,
Property[] properties,
Configuration config,
boolean includeLocation) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractConfiguration
The base Configuration.
|
class |
DefaultConfiguration
The default configuration writes all output to the Console using the default logging level.
|
class |
NullConfiguration
This configuration defaults to no logging.
|
Modifier and Type | Method and Description |
---|---|
abstract Configuration |
ConfigurationFactory.getConfiguration(ConfigurationSource source) |
Configuration |
ConfigurationFactory.getConfiguration(String name,
URI configLocation)
Returns the Configuration.
|
Configuration |
ConfigurationFactory.getConfiguration(String name,
URI configLocation,
ClassLoader loader)
Returns the Configuration obtained using a given ClassLoader.
|
Configuration |
Reconfigurable.reconfigure() |
Modifier and Type | Method and Description |
---|---|
void |
DefaultReliabilityStrategy.beforeStopConfiguration(Configuration configuration) |
void |
AwaitCompletionReliabilityStrategy.beforeStopConfiguration(Configuration configuration) |
void |
AwaitUnconditionallyReliabilityStrategy.beforeStopConfiguration(Configuration configuration) |
void |
ReliabilityStrategy.beforeStopConfiguration(Configuration configuration)
Called before the configuration is stopped.
|
void |
LockingReliabilityStrategy.beforeStopConfiguration(Configuration configuration) |
static StrLookup |
PropertiesPlugin.configureSubstitutor(Property[] properties,
Configuration config)
Creates the Properties component.
|
static LoggerConfig |
LoggerConfig.RootLogger.createLogger(String additivity,
Level level,
String includeLocation,
AppenderRef[] refs,
Property[] properties,
Configuration config,
Filter filter) |
static LoggerConfig |
LoggerConfig.createLogger(String additivity,
Level level,
String loggerName,
String includeLocation,
AppenderRef[] refs,
Property[] properties,
Configuration config,
Filter filter)
Factory method to create a LoggerConfig.
|
static LoggerContext |
Configurator.initialize(ClassLoader loader,
Configuration configuration)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(ClassLoader loader,
Configuration configuration,
Object externalContext)
Initializes the Logging Context.
|
static LoggerContext |
Configurator.initialize(Configuration configuration)
Initializes the Logging Context.
|
Constructor and Description |
---|
LoggerConfig(String name,
List<AppenderRef> appenders,
Filter filter,
Level level,
boolean additive,
Property[] properties,
Configuration config,
boolean includeLocation) |
Modifier and Type | Interface and Description |
---|---|
interface |
ConfigurationBuilder<T extends Configuration>
Interface for building logging configurations.
|
Modifier and Type | Method and Description |
---|---|
ConfigurationBuilder<? extends Configuration> |
ComponentBuilder.getBuilder()
Retrieves the ConfigurationBuilder.
|
Modifier and Type | Class and Description |
---|---|
class |
BuiltConfiguration
This is the general version of the Configuration created by the Builder.
|
Modifier and Type | Class and Description |
---|---|
class |
JsonConfiguration
Creates a Node hierarchy from a JSON file.
|
Modifier and Type | Method and Description |
---|---|
Configuration |
JsonConfigurationFactory.getConfiguration(ConfigurationSource source) |
Configuration |
JsonConfiguration.reconfigure() |
Modifier and Type | Method and Description |
---|---|
PluginBuilder |
PluginBuilder.withConfiguration(Configuration configuration)
Specifies the Configuration to use for constructing the plugin instance.
|
Modifier and Type | Method and Description |
---|---|
Object |
PluginValueVisitor.visit(Configuration configuration,
Node node,
LogEvent event,
StringBuilder log) |
Object |
PluginAttributeVisitor.visit(Configuration configuration,
Node node,
LogEvent event,
StringBuilder log) |
Object |
PluginBuilderAttributeVisitor.visit(Configuration configuration,
Node node,
LogEvent event,
StringBuilder log) |
Object |
PluginVisitor.visit(Configuration configuration,
Node node,
LogEvent event,
StringBuilder log)
Visits a Node to obtain a value for constructing a Plugin object.
|
Object |
PluginElementVisitor.visit(Configuration configuration,
Node node,
LogEvent event,
StringBuilder log) |
Object |
PluginConfigurationVisitor.visit(Configuration configuration,
Node node,
LogEvent event,
StringBuilder log) |
Object |
PluginNodeVisitor.visit(Configuration configuration,
Node node,
LogEvent event,
StringBuilder log) |
Modifier and Type | Class and Description |
---|---|
class |
PropertiesConfiguration
Configuration created from a properties file.
|
Modifier and Type | Method and Description |
---|---|
Configuration |
PropertiesConfiguration.reconfigure() |
Modifier and Type | Class and Description |
---|---|
class |
XmlConfiguration
Creates a Node hierarchy from an XML file.
|
Modifier and Type | Method and Description |
---|---|
Configuration |
XmlConfigurationFactory.getConfiguration(ConfigurationSource source)
Returns the Configuration.
|
Configuration |
XmlConfiguration.reconfigure() |
Modifier and Type | Class and Description |
---|---|
class |
YamlConfiguration |
Modifier and Type | Method and Description |
---|---|
Configuration |
YamlConfigurationFactory.getConfiguration(ConfigurationSource source) |
Configuration |
YamlConfiguration.reconfigure() |
Modifier and Type | Method and Description |
---|---|
static ScriptFilter |
ScriptFilter.createFilter(AbstractScript script,
Filter.Result match,
Filter.Result mismatch,
Configuration configuration)
Creates the ScriptFilter.
|
Modifier and Type | Method and Description |
---|---|
LoggerContext |
Log4jContextFactory.getContext(String fqcn,
ClassLoader loader,
Object externalContext,
boolean currentContext,
Configuration configuration)
Loads the LoggerContext using the ContextSelector using the provided Configuration
|
Modifier and Type | Method and Description |
---|---|
static PatternLayout |
PatternLayout.createDefaultLayout(Configuration configuration)
Creates a PatternLayout using the default options and the given
configuration.
|
static Rfc5424Layout |
Rfc5424Layout.createLayout(Facility facility,
String id,
int enterpriseNumber,
boolean includeMDC,
String mdcId,
String mdcPrefix,
String eventPrefix,
boolean newLine,
String escapeNL,
String appName,
String msgId,
String excludes,
String includes,
String required,
String exceptionPattern,
boolean useTlsMessageFormat,
LoggerFields[] loggerFields,
Configuration config)
Create the RFC 5424 Layout.
|
static PatternLayout |
PatternLayout.createLayout(String pattern,
PatternSelector patternSelector,
Configuration config,
RegexReplacement replace,
Charset charset,
boolean alwaysWriteExceptions,
boolean noConsoleNoAnsi,
String header,
String footer)
Creates a pattern layout.
|
static PatternParser |
PatternLayout.createPatternParser(Configuration config)
Creates a PatternParser.
|
static ScriptPatternSelector |
ScriptPatternSelector.createSelector(AbstractScript script,
PatternMatch[] properties,
String defaultPattern,
boolean alwaysWriteExceptions,
boolean noConsoleNoAnsi,
Configuration config) |
static MarkerPatternSelector |
MarkerPatternSelector.createSelector(PatternMatch[] properties,
String defaultPattern,
boolean alwaysWriteExceptions,
boolean noConsoleNoAnsi,
Configuration config) |
PatternLayout.Builder |
PatternLayout.Builder.withConfiguration(Configuration configuration) |
Constructor and Description |
---|
MarkerPatternSelector(PatternMatch[] properties,
String defaultPattern,
boolean alwaysWriteExceptions,
boolean noConsoleNoAnsi,
Configuration config) |
ScriptPatternSelector(AbstractScript script,
PatternMatch[] properties,
String defaultPattern,
boolean alwaysWriteExceptions,
boolean noConsoleNoAnsi,
Configuration config) |
Modifier and Type | Method and Description |
---|---|
Configuration |
AbstractSocketServer.ServerConfigurationFactory.getConfiguration(String name,
URI configLocation) |
Modifier and Type | Method and Description |
---|---|
protected static <T extends AbstractStyleNameConverter> |
AbstractStyleNameConverter.newInstance(Class<T> asnConverterClass,
String name,
Configuration config,
String[] options)
Gets an instance of the class (called via reflection).
|
static EncodingPatternConverter |
EncodingPatternConverter.newInstance(Configuration config,
String[] options)
Obtains an instance of pattern converter.
|
static MessagePatternConverter |
MessagePatternConverter.newInstance(Configuration config,
String[] options)
Obtains an instance of pattern converter.
|
static AbstractStyleNameConverter.Black |
AbstractStyleNameConverter.Black.newInstance(Configuration config,
String[] options)
Gets an instance of the class (called via reflection).
|
static AbstractStyleNameConverter.Blue |
AbstractStyleNameConverter.Blue.newInstance(Configuration config,
String[] options)
Gets an instance of the class (called via reflection).
|
static AbstractStyleNameConverter.Cyan |
AbstractStyleNameConverter.Cyan.newInstance(Configuration config,
String[] options)
Gets an instance of the class (called via reflection).
|
static AbstractStyleNameConverter.Green |
AbstractStyleNameConverter.Green.newInstance(Configuration config,
String[] options)
Gets an instance of the class (called via reflection).
|
static AbstractStyleNameConverter.Magenta |
AbstractStyleNameConverter.Magenta.newInstance(Configuration config,
String[] options)
Gets an instance of the class (called via reflection).
|
static AbstractStyleNameConverter.Red |
AbstractStyleNameConverter.Red.newInstance(Configuration config,
String[] options)
Gets an instance of the class (called via reflection).
|
static AbstractStyleNameConverter.White |
AbstractStyleNameConverter.White.newInstance(Configuration config,
String[] options)
Gets an instance of the class (called via reflection).
|
static AbstractStyleNameConverter.Yellow |
AbstractStyleNameConverter.Yellow.newInstance(Configuration config,
String[] options)
Gets an instance of the class (called via reflection).
|
static RegexReplacementConverter |
RegexReplacementConverter.newInstance(Configuration config,
String[] options)
Gets an instance of the class.
|
static StyleConverter |
StyleConverter.newInstance(Configuration config,
String[] options)
Gets an instance of the class.
|
static EqualsReplacementConverter |
EqualsReplacementConverter.newInstance(Configuration config,
String[] options)
Gets an instance of the class.
|
static HighlightConverter |
HighlightConverter.newInstance(Configuration config,
String[] options)
Gets an instance of the class.
|
static VariablesNotEmptyReplacementConverter |
VariablesNotEmptyReplacementConverter.newInstance(Configuration config,
String[] options)
Gets an instance of the class.
|
static EqualsIgnoreCaseReplacementConverter |
EqualsIgnoreCaseReplacementConverter.newInstance(Configuration config,
String[] options)
Gets an instance of the class.
|
Constructor and Description |
---|
LiteralPatternConverter(Configuration config,
String literal,
boolean convertBackslashes)
Create a new instance.
|
PatternParser(Configuration config,
String converterKey,
Class<?> expected)
Constructor.
|
PatternParser(Configuration config,
String converterKey,
Class<?> expectedClass,
Class<?> filterClass)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static ScriptRef |
ScriptRef.createReference(String name,
Configuration configuration) |
Copyright © 1999-2017 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.