Package | Description |
---|---|
org.apache.log4j.layout | |
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.mom.jeromq |
Classes and interfaces for ZeroMQ/JeroMQ support.
|
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.filter |
Log4j 2 Filter support.
|
org.apache.logging.log4j.core.layout |
Log4j 2 Layout support.
|
org.apache.logging.log4j.core.net.ssl |
Log4j 2 SSL support
|
org.apache.logging.log4j.core.pattern |
Provides classes implementing format specifiers in conversion patterns.
|
org.apache.logging.log4j.core.script |
Log4j 2 Script support.
|
org.apache.logging.log4j.couchdb |
The classes in this package contain the Apache CouchDB provider for the NoSQL Appender.
|
Modifier and Type | Method | Description |
---|---|---|
static Log4j1XmlLayout |
Log4j1XmlLayout.createLayout(boolean locationInfo,
boolean properties) |
Modifier and Type | Method | Description |
---|---|---|
static CountingNoOpAppender |
CountingNoOpAppender.createAppender(String name) |
Creates a CountingNoOp Appender.
|
static FailoverAppender |
FailoverAppender.createAppender(String name,
String primary,
String[] failovers,
String retryIntervalSeconds,
Configuration config,
Filter filter,
String ignore) |
Create a Failover Appender.
|
static NullAppender |
NullAppender.createAppender(String name) |
|
static OutputStreamAppender |
OutputStreamAppender.createAppender(Layout<? extends Serializable> layout,
Filter filter,
OutputStream target,
String name,
boolean follow,
boolean ignore) |
Creates an OutputStream Appender.
|
static SmtpAppender |
SmtpAppender.createAppender(Configuration config,
String name,
String to,
String cc,
String bcc,
String from,
String replyTo,
String subject,
String smtpProtocol,
String smtpHost,
String smtpPortStr,
String smtpUsername,
String smtpPassword,
String smtpDebug,
String bufferSizeStr,
Layout<? extends Serializable> layout,
Filter filter,
String ignore) |
Create a SmtpAppender.
|
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 configuration) |
Deprecated.
Deprecated in 2.7; use
SocketAppender.newBuilder() |
static WriterAppender |
WriterAppender.createAppender(StringLayout layout,
Filter filter,
Writer target,
String name,
boolean follow,
boolean ignore) |
Creates a WriterAppender.
|
static String[] |
FailoversPlugin.createFailovers(AppenderRef... refs) |
Returns the appender references.
|
Modifier and Type | Method | Description |
---|---|---|
static DataSourceConnectionSource |
DataSourceConnectionSource.createConnectionSource(String jndiName) |
Factory method for creating a connection source within the plugin manager.
|
static FactoryMethodConnectionSource |
FactoryMethodConnectionSource.createConnectionSource(String className,
String methodName) |
Factory method for creating a connection source within the plugin manager.
|
Modifier and Type | Method | Description |
---|---|---|
static JeroMqAppender |
JeroMqAppender.createAppender(String name,
Layout<?> layout,
Filter filter,
Property[] properties,
boolean ignoreExceptions,
long affinity,
long backlog,
boolean delayAttachOnConnect,
byte[] identity,
boolean ipv4Only,
long linger,
long maxMsgSize,
long rcvHwm,
long receiveBufferSize,
int receiveTimeOut,
long reconnectIVL,
long reconnectIVLMax,
long sendBufferSize,
int sendTimeOut,
long sndHwm,
int tcpKeepAlive,
long tcpKeepAliveCount,
long tcpKeepAliveIdle,
long tcpKeepAliveInterval,
boolean xpubVerbose) |
Modifier and Type | Method | Description |
---|---|---|
static RewriteAppender |
RewriteAppender.createAppender(String name,
String ignore,
AppenderRef[] appenderRefs,
Configuration config,
RewritePolicy rewritePolicy,
Filter filter) |
Creates a RewriteAppender.
|
static LoggerNameLevelRewritePolicy |
LoggerNameLevelRewritePolicy.createPolicy(String loggerNamePrefix,
KeyValuePair[] levelPairs) |
Creates a policy to rewrite levels for a given logger name.
|
static MapRewritePolicy |
MapRewritePolicy.createPolicy(String mode,
KeyValuePair[] pairs) |
The factory method to create the MapRewritePolicy.
|
static PropertiesRewritePolicy |
PropertiesRewritePolicy.createPolicy(Configuration config,
Property[] props) |
Creates a PropertiesRewritePolicy.
|
Modifier and Type | Method | Description |
---|---|---|
static CompositeTriggeringPolicy |
CompositeTriggeringPolicy.createPolicy(TriggeringPolicy... triggeringPolicy) |
Creates a CompositeTriggeringPolicy.
|
static CronTriggeringPolicy |
CronTriggeringPolicy.createPolicy(Configuration configuration,
String evaluateOnStartup,
String schedule) |
Creates a ScheduledTriggeringPolicy.
|
static NoOpTriggeringPolicy |
NoOpTriggeringPolicy.createPolicy() |
|
static OnStartupTriggeringPolicy |
OnStartupTriggeringPolicy.createPolicy(long minSize) |
|
static SizeBasedTriggeringPolicy |
SizeBasedTriggeringPolicy.createPolicy(String size) |
Create a SizeBasedTriggeringPolicy.
|
static DefaultRolloverStrategy |
DefaultRolloverStrategy.createStrategy(String max,
String min,
String fileIndex,
String compressionLevelStr,
Action[] customActions,
boolean stopCustomActionsOnError,
Configuration config) |
Deprecated.
Since 2.9 Usage of Builder API is preferable
|
static DirectWriteRolloverStrategy |
DirectWriteRolloverStrategy.createStrategy(String maxFiles,
String compressionLevelStr,
Action[] customActions,
boolean stopCustomActionsOnError,
Configuration config) |
Deprecated.
Since 2.9 Usage of Builder API is preferable
|
Modifier and Type | Method | Description |
---|---|---|
static IfLastModified |
IfLastModified.createAgeCondition(Duration age,
PathCondition... nestedConditions) |
Create an IfLastModified condition.
|
static IfAll |
IfAll.createAndCondition(PathCondition... components) |
Create a Composite PathCondition whose components all need to accept before this condition accepts.
|
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.
|
static IfAccumulatedFileCount |
IfAccumulatedFileCount.createFileCountCondition(int threshold,
PathCondition... nestedConditions) |
Create an IfAccumulatedFileCount condition.
|
static IfAccumulatedFileSize |
IfAccumulatedFileSize.createFileSizeCondition(String size,
PathCondition... nestedConditions) |
Create an IfAccumulatedFileSize condition.
|
static IfFileName |
IfFileName.createNameCondition(String glob,
String regex,
PathCondition... nestedConditions) |
Creates a IfFileName condition that returns true if either the specified
glob pattern or the regular expression matches the relative path.
|
static IfNot |
IfNot.createNotCondition(PathCondition condition) |
Create an IfNot PathCondition.
|
static IfAny |
IfAny.createOrCondition(PathCondition... components) |
Create a Composite PathCondition: accepts if any of the nested conditions accepts.
|
static PathSorter |
PathSortByModificationTime.createSorter(boolean recentFirst) |
Create a PathSorter that sorts by lastModified time.
|
Modifier and Type | Method | Description |
---|---|---|
static PurgePolicy |
IdlePurgePolicy.createPurgePolicy(String timeToLive,
String checkInterval,
String timeUnit,
Configuration configuration) |
Create the PurgePolicy
|
static Route |
Route.createRoute(String appenderRef,
String key,
Node node) |
Create the Route.
|
Modifier and Type | Method | Description |
---|---|---|
static <E> ArrayBlockingQueueFactory<E> |
ArrayBlockingQueueFactory.createFactory() |
|
static <E> DisruptorBlockingQueueFactory<E> |
DisruptorBlockingQueueFactory.createFactory(com.conversantmedia.util.concurrent.SpinPolicy spinPolicy) |
|
static <E> JCToolsBlockingQueueFactory<E> |
JCToolsBlockingQueueFactory.createFactory(JCToolsBlockingQueueFactory.WaitStrategy waitStrategy) |
|
static <E> LinkedTransferQueueFactory<E> |
LinkedTransferQueueFactory.createFactory() |
|
static LoggerConfig |
AsyncLoggerConfig.createLogger(boolean additivity,
Level level,
String loggerName,
String includeLocation,
AppenderRef[] refs,
Property[] properties,
Configuration config,
Filter filter) |
Factory method to create a LoggerConfig.
|
static LoggerConfig |
AsyncLoggerConfig.RootLogger.createLogger(String additivity,
Level level,
String includeLocation,
AppenderRef[] refs,
Property[] properties,
Configuration config,
Filter filter) |
Modifier and Type | Method | Description |
---|---|---|
static StrLookup |
PropertiesPlugin.configureSubstitutor(Property[] properties,
Configuration config) |
Creates the Properties component.
|
static AppenderRef |
AppenderRef.createAppenderRef(String ref,
Level level,
Filter filter) |
Create an Appender reference.
|
static ConcurrentMap<String,Appender> |
AppendersPlugin.createAppenders(Appender[] appenders) |
Creates a Map of the Appenders.
|
static CustomLevels |
CustomLevels.createCustomLevels(CustomLevelConfig[] customLevels) |
Create a CustomLevels object to contain all the CustomLevelConfigs.
|
static CustomLevelConfig |
CustomLevelConfig.createLevel(String levelName,
int intLevel) |
Creates a CustomLevelConfig object.
|
static LoggerConfig |
LoggerConfig.createLogger(boolean additivity,
Level level,
String loggerName,
String includeLocation,
AppenderRef[] refs,
Property[] properties,
Configuration config,
Filter filter) |
Factory method to create a LoggerConfig.
|
static LoggerConfig |
LoggerConfig.RootLogger.createLogger(String additivity,
Level level,
String includeLocation,
AppenderRef[] refs,
Property[] properties,
Configuration config,
Filter filter) |
|
static Loggers |
LoggersPlugin.createLoggers(LoggerConfig[] loggers) |
Create a Loggers object to contain all the Loggers.
|
static Property |
Property.createProperty(String name,
String value) |
Creates a Property.
|
static AbstractScript[] |
ScriptsPlugin.createScripts(AbstractScript[] scripts) |
Return the array of scripts
|
Modifier and Type | Method | Description |
---|---|---|
static DynamicThresholdFilter |
DynamicThresholdFilter.createFilter(String key,
KeyValuePair[] pairs,
Level defaultThreshold,
Filter.Result onMatch,
Filter.Result onMismatch) |
Creates a DynamicThresholdFilter.
|
static LevelRangeFilter |
LevelRangeFilter.createFilter(Level minLevel,
Level maxLevel,
Filter.Result match,
Filter.Result mismatch) |
Creates a ThresholdFilter.
|
static MapFilter |
MapFilter.createFilter(KeyValuePair[] pairs,
String oper,
Filter.Result match,
Filter.Result mismatch) |
|
static MarkerFilter |
MarkerFilter.createFilter(String marker,
Filter.Result match,
Filter.Result mismatch) |
Creates the MarkerFilter.
|
static RegexFilter |
RegexFilter.createFilter(String regex,
String[] patternFlags,
Boolean useRawMsg,
Filter.Result match,
Filter.Result mismatch) |
Creates a Filter that matches a regular expression.
|
static ScriptFilter |
ScriptFilter.createFilter(AbstractScript script,
Filter.Result match,
Filter.Result mismatch,
Configuration configuration) |
Creates the ScriptFilter.
|
static StructuredDataFilter |
StructuredDataFilter.createFilter(KeyValuePair[] pairs,
String oper,
Filter.Result match,
Filter.Result mismatch) |
Creates the StructuredDataFilter.
|
static ThreadContextMapFilter |
ThreadContextMapFilter.createFilter(KeyValuePair[] pairs,
String oper,
Filter.Result match,
Filter.Result mismatch) |
|
static ThresholdFilter |
ThresholdFilter.createFilter(Level level,
Filter.Result match,
Filter.Result mismatch) |
Creates a ThresholdFilter.
|
static TimeFilter |
TimeFilter.createFilter(String start,
String end,
String tz,
Filter.Result match,
Filter.Result mismatch) |
Creates a TimeFilter.
|
static CompositeFilter |
CompositeFilter.createFilters(Filter[] filters) |
Creates a CompositeFilter.
|
Modifier and Type | Method | Description |
---|---|---|
static CsvLogEventLayout |
CsvLogEventLayout.createLayout(Configuration config,
String format,
Character delimiter,
Character escape,
Character quote,
org.apache.commons.csv.QuoteMode quoteMode,
String nullString,
String recordSeparator,
Charset charset,
String header,
String footer) |
|
static AbstractCsvLayout |
CsvParameterLayout.createLayout(Configuration config,
String format,
Character delimiter,
Character escape,
Character quote,
org.apache.commons.csv.QuoteMode quoteMode,
String nullString,
String recordSeparator,
Charset charset,
String header,
String footer) |
|
static HtmlLayout |
HtmlLayout.createLayout(boolean locationInfo,
String title,
String contentType,
Charset charset,
String fontSize,
String font) |
Creates an HTML Layout.
|
static Layout<?> |
MessageLayout.createLayout() |
|
static PatternLayout |
PatternLayout.createLayout(String pattern,
PatternSelector patternSelector,
Configuration config,
RegexReplacement replace,
Charset charset,
boolean alwaysWriteExceptions,
boolean noConsoleNoAnsi,
String headerPattern,
String footerPattern) |
Deprecated.
Use
PatternLayout.newBuilder() instead. |
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 SerializedLayout |
SerializedLayout.createLayout() |
Deprecated.
|
static LoggerFields |
LoggerFields.createLoggerFields(KeyValuePair[] keyValuePairs,
String sdId,
String enterpriseId,
boolean discardIfAllFieldsAreEmpty) |
Create a LoggerFields from KeyValuePairs.
|
Modifier and Type | Method | Description |
---|---|---|
static KeyStoreConfiguration |
KeyStoreConfiguration.createKeyStoreConfiguration(String location,
char[] password,
String passwordEnvironmentVariable,
String passwordFile,
String keyStoreType,
String keyManagerFactoryAlgorithm) |
Creates a KeyStoreConfiguration.
|
static TrustStoreConfiguration |
TrustStoreConfiguration.createKeyStoreConfiguration(String location,
char[] password,
String passwordEnvironmentVariable,
String passwordFile,
String keyStoreType,
String trustManagerFactoryAlgorithm) |
Creates a KeyStoreConfiguration.
|
static SslConfiguration |
SslConfiguration.createSSLConfiguration(String protocol,
KeyStoreConfiguration keyStoreConfig,
TrustStoreConfiguration trustStoreConfig) |
Creates an SslConfiguration from a KeyStoreConfiguration and a TrustStoreConfiguration.
|
Modifier and Type | Method | Description |
---|---|---|
static RegexReplacement |
RegexReplacement.createRegexReplacement(Pattern regex,
String replacement) |
Create a RegexReplacement.
|
Modifier and Type | Method | Description |
---|---|---|
static ScriptRef |
ScriptRef.createReference(String name,
Configuration configuration) |
|
static Script |
Script.createScript(String name,
String language,
String scriptText) |
|
static ScriptFile |
ScriptFile.createScript(String name,
String language,
String filePathOrUri,
Boolean isWatched,
Charset charset) |
Modifier and Type | Method | Description |
---|---|---|
static CouchDbProvider |
CouchDbProvider.createNoSqlProvider(String databaseName,
String protocol,
String server,
String port,
String username,
String password,
String factoryClassName,
String factoryMethodName) |
Factory method for creating an Apache CouchDB provider within the plugin manager.
|
Copyright © 1999-2018. 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.