From 5b9e59526a8fde0eb53e0c6c00e6438b7b0279dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20Yaz=C4=B1c=C4=B1?= Date: Sun, 12 Apr 2026 10:05:55 +0200 Subject: [PATCH] Add XSD for Log4j version `0.25.4` --- .../modules/ROOT/pages/xml/ns/index.adoc | 4 + .../static/xml/ns/log4j-config-2.25.4.xsd | 616 ++++++++++++++++++ src/site/static/xml/ns/log4j-config-2.xsd | 2 +- 3 files changed, 621 insertions(+), 1 deletion(-) create mode 100644 src/site/static/xml/ns/log4j-config-2.25.4.xsd diff --git a/src/site/antora/modules/ROOT/pages/xml/ns/index.adoc b/src/site/antora/modules/ROOT/pages/xml/ns/index.adoc index 966f6117..2aceb8b6 100644 --- a/src/site/antora/modules/ROOT/pages/xml/ns/index.adoc +++ b/src/site/antora/modules/ROOT/pages/xml/ns/index.adoc @@ -45,6 +45,10 @@ Following schemas model the Log4j runtime configuration, i.e., `log4j2.xml`{empt |link:log4j-config-2.23.1.xsd[log4j-config-2.23.1.xsd] |Released with link:/log4j/2.x/release-notes.html#release-notes-2-23-1[Log4j `2.23.1`] +|2026-03-28 +|link:log4j-config-2.25.4.xsd[log4j-config-2.25.4.xsd] +|Released with link:/log4j/2.x/release-notes.html#release-notes-2-25-4[Log4j `2.25.4`] + |N/A |link:log4j-config-2.xsd[log4j-config-2.xsd] |Points to the most recent XSD of major version `2`. diff --git a/src/site/static/xml/ns/log4j-config-2.25.4.xsd b/src/site/static/xml/ns/log4j-config-2.25.4.xsd new file mode 100644 index 00000000..73e6096d --- /dev/null +++ b/src/site/static/xml/ns/log4j-config-2.25.4.xsd @@ -0,0 +1,616 @@ +Builder for the native Log4j 2.x list appender to be used in the tests.Represents a logging level. +NOTE: The Log4j API supports custom levels, the following list contains only the standard ones.Special level that disables logging. +No events should be logged at this level.A fatal event that will prevent the application from continuingAn error in the application, possibly recoverableAn event that might possible lead to an errorAn event for informational purposesA general debugging eventA fine-grained debug message, typically capturing the flow through the applicationSpecial level indicating all events should be loggedAppender plugin that uses a Cassandra database.List of column mappings to convert a LogEvent into a database row.List of Cassandra node contact points. + +Addresses without a port (or port set to 0) will use the default Cassandra port (9042).If batch statements are enabled, use this type of batch statement.Whether or not to use batch statements when inserting records.Number of LogEvents to buffer before writing. + +Can be used with or without batch statements.Override the default TimestampGenerator with one based on the configured apiref:org.apache.logging.log4j.core.util.Clock[].A life cycle to be extended. + +Wraps a apiref:org.apache.logging.log4j.core.LifeCycle.State[].Appends apiref:org.apache.logging.log4j.core.LogEvent[]s. + +An Appender can contain a apiref:org.apache.logging.log4j.core.Layout[] if applicable as well as an apiref:org.apache.logging.log4j.core.ErrorHandler[]. Typical Appender implementations coordinate with an implementation of apiref:org.apache.logging.log4j.core.appender.AbstractManager[] to handle external resources such as streams, connections, and other shared state. +As Appenders are plugins, concrete implementations need to be annotated with apiref:org.apache.logging.log4j.core.config.plugins.Plugin[] and need to provide a static factory method annotated with apiref:org.apache.logging.log4j.core.config.plugins.PluginFactory[]. + +Most core plugins are written using a related Manager class that handle the actual task of serializing a apiref:org.apache.logging.log4j.core.LogEvent[] to some output location. +For instance, many Appenders can take advantage of the apiref:org.apache.logging.log4j.core.appender.OutputStreamManager[] class. + +It is recommended that Appenders don't do any heavy lifting since there can be many instances of the class being used at any given time. +When resources require locking (e.g., through apiref:org.apache.logging.log4j.core.java.nio.channels.FileLock[]), it is important to isolate synchronized code to prevent concurrency issues.Interface that must be implemented to allow custom event filtering. + +It is highly recommended that applications make use of the Filters provided with this implementation before creating their own. + +This interface supports "global" filters (i.e. - all events must pass through them first), attached to specific loggers and associated with Appenders. +It is recommended that, where possible, Filter implementations create a generic filtering method that can be called from any of the filter methods.The result that can returned from a filter method call.The event will be processed without further filtering based on the log Level.No decision could be made, further filtering should occur.The event should not be processed.Lays out a apiref:org.apache.logging.log4j.core.LogEvent[] in different formats. + +The formats are: + +* `byte[]` +* an implementer of apiref:java.io.Serializable[], like `byte[]` +* apiref:java.lang.String[] +* apiref:org.apache.logging.log4j.core.LogEvent[] + +Since 2.6, Layouts can apiref:org.apache.logging.log4j.core.layout.Encoder#encode(Object,ByteBufferDestination)[encode] a `LogEvent` directly to a apiref:org.apache.logging.log4j.core.layout.ByteBufferDestination[] without creating temporary intermediary objects.All proper Java frameworks implement some sort of object life cycle. + +In Log4j, the main interface for handling the life cycle context of an object is this one. +An object first starts in the apiref:org.apache.logging.log4j.core.State#INITIALIZED[] state by default to indicate the class has been loaded. +From here, calling the apiref:org.apache.logging.log4j.core.LifeCycle#start()[] method will change this state to apiref:org.apache.logging.log4j.core.State#STARTING[]. After successfully being started, this state is changed to apiref:org.apache.logging.log4j.core.State#STARTED[]. When the apiref:org.apache.logging.log4j.core.LifeCycle#stop()[] is called, this goes into the apiref:org.apache.logging.log4j.core.State#STOPPING[] state. +After successfully being stopped, this goes into the apiref:org.apache.logging.log4j.core.State#STOPPED[] state. +In most circumstances, implementation classes should store their apiref:org.apache.logging.log4j.core.State[] in a `volatile` field or inside an apiref:org.apache.logging.log4j.core.java.util.concurrent.atomic.AtomicReference[] dependent on synchronization and concurrency requirements.Extends the LifeCycle interface. + +This interface should be merged with the super-interface in 3.0.Instantiates the apiref:org.apache.logging.log4j.core.Layout[] type for String-based layouts.Abstract base class for Appenders. + +Although Appenders do not have to extend this class, doing so will simplify their implementation.Appends log events as bytes to a byte output stream. + +The stream encoding is defined in the layout.Appends log events as strings to a writer.A deferred plugin for appenders.Appends to one or more Appenders asynchronously. + +You can configure an AsyncAppender with one or more Appenders and an Appender to append to if the queue is full. +The AsyncAppender does not allow a filter to be specified on the Appender references.Appends log events to `System. out` or `System. err` using a layout specified by the user. + +The default target is `System. out`. + +TODO Accessing `System. out` or `System. err` as a byte stream instead of a writer bypasses the JVM's knowledge of the proper encoding. +(RG) Encoding is handled within the Layout. +Typically, a Layout will generate a String and then call getBytes which may use a configured encoding or the system default. +OTOH, a Writer cannot print byte streams.Enumeration of console destinations.Standard output.Standard error output.No-Operation Appender that counts events.The FailoverAppender will capture exceptions in an Appender and then route the event to a different appender. + +Hopefully it is obvious that the Appenders must be configured to not suppress exceptions for the FailoverAppender to work.A Filter (optional).If `"true"` (default) exceptions encountered when appending events are logged; otherwise they are propagated to the caller.The name of the Appender (required).The name of the primary Appender (required).The retry interval in seconds.The array of failover Appenders.The references to return.File Appender.Memory Mapped File Appender.An Appender that ignores log events. + +Use for compatibility with version 1.2 and handy for composing a apiref:org.apache.logging.log4j.core.appender.ScriptAppenderSelector[].Appends log events to a given output stream using a layout. + +Character encoding is handled within the Layout.File Appender.An appender that writes to files and can roll over at intervals.An appender that writes to random access files and can roll over at intervals.Send an e-mail when a specific logging event occurs, typically on errors or fatal errors. + +The number of logging events delivered in this e-mail depend on the value of *BufferSize* option. +The `SmtpAppender` keeps only the last `BufferSize` logging events in its cyclic buffer. +This keeps memory requirements at a reasonable level while still delivering useful application context. +By default, an email message will formatted as HTML. +This can be modified by setting a layout for the appender. +By default, an email message will be sent when an ERROR or higher severity message is appended. +This can be modified by setting a filter for the appender.Specifies the filter used for this appender. + +By default, uses a apiref:org.apache.logging.log4j.core.filter.ThresholdFilter[] with a level of ERROR.Specifies the layout used for the email message body. + +By default, this uses the apiref:org.apache.logging.log4j.core.layout.HtmlLayout#createDefaultLayout()[default HTML layout].Specifies an SSL configuration for smtps connections.Comma-separated list of BCC email addresses.Number of log events to buffer before sending an email. + +Defaults to .Comma-separated list of CC email addresses.Email address of the sender.Comma-separated list of Reply-To email addresses.Enables or disables mail session debugging on STDOUT. + +Disabled by default.Host name of SMTP server to send messages through.Password to authenticate with SMTP server.Port number of SMTP server to send messages through.Transport protocol to use for SMTP such as "smtp" or "smtps". + +Defaults to "smtp".Username to authenticate with SMTP server.Subject template for the email messages.Comma-separated list of recipient email addresses.An Appender that delivers events over socket connections. + +Supports both TCP and UDP.An Appender that delivers events over socket connections. + +Supports both TCP and UDP.The Syslog Appender.Appends log events to a apiref:java.io.Writer[].An abstract Appender for writing events to a database of some type, be it relational or NoSQL. + +All database appenders should inherit from this base appender.A configuration element for specifying a database column name mapping.Layout of value to write to database (before type conversion). + +Not applicable if apiref:org.apache.logging.log4j.core.appender.db.ColumnMapping#setType(Class)[] is a apiref:org.apache.logging.log4j.util.ReadOnlyStringMap[], apiref:org.apache.logging.log4j.spi.ThreadContextMap[], or apiref:org.apache.logging.log4j.spi.ThreadContextStack[].Literal value to use for populating a column. + +This is generally useful for functions, stored procedures, etc. +No escaping will be done on this value.Column name.Parameter value to use for populating a column, MUST contain a single parameter marker '?'. + +This is generally useful for functions, stored procedures, etc. +No escaping will be done on this value.Pattern to use as a apiref:org.apache.logging.log4j.core.layout.PatternLayout[]. + +Convenient shorthand for apiref:org.apache.logging.log4j.core.appender.db.ColumnMapping#setLayout(StringLayout)[] with a PatternLayout.Source name. + +Useful when combined with a apiref:org.apache.logging.log4j.core.appender.db.org.apache.logging.log4j.message.MapMessage[] depending on the appender.A apiref:org.apache.logging.log4j.core.appender.db.jdbc.ConnectionSource[] that uses a JDBC connection string, a user name, and a password to call apiref:java.sql.DriverManager#getConnection(String,String,String)[]. + +This plugin does not provide any connection pooling unless it is available through the connection string and driver itself. +This handy to get you off the ground without having to deal with JNDI.A configuration element used to configure which event properties are logged to which columns in the database table.The literal value to insert into the column as-is without any quoting or escaping. + +Mutually exclusive with `pattern! =null` and `eventTimestamp=true`.The name of the database column as it exists within the database table.The apiref:org.apache.logging.log4j.core.layout.PatternLayout[] pattern to insert in this column. + +Mutually exclusive with `literal! =null` and `eventTimestamp=true`Configuration element for apiref:org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender[]. + +If you want to use the apiref:org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender[] but none of the provided connection sources meet your needs, you can simply create your own connection source.A apiref:org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender[] connection source that uses a apiref:javax.sql.DataSource[] to connect to the database.The full JNDI path where the data source is bound. +Must start with java:/comp/env or environment-equivalent.A apiref:org.apache.logging.log4j.core.appender.db.jdbc.ConnectionSource[] that uses a JDBC connection string, a user name, and a password to call apiref:java.sql.DriverManager#getConnection(String,String,String)[]. + +This plugin does not provide any connection pooling unless it is available through the connection string and driver itself. +This handy to get you off the ground without having to deal with JNDI.A apiref:org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender[] connection source that uses a public static factory method to obtain a apiref:java.sql.Connection[] or apiref:javax.sql.DataSource[].The name of a public class that contains a static method capable of returning either a apiref:javax.sql.DataSource[] or a apiref:java.sql.Connection[].The name of the public static method on the aforementioned class that returns the data source or connection. +If this method returns a apiref:java.sql.Connection[], it should return a new connection every call.This Appender writes logging events to a relational database using standard JDBC mechanisms. + +It takes a list of apiref:org.apache.logging.log4j.core.appender.db.jdbc.ColumnConfig[]s and/or apiref:org.apache.logging.log4j.core.appender.db.ColumnMapping[]s with which it determines how to save the event data into the appropriate columns in the table. +ColumnMapping is new as of Log4j 2.8 and supports apiref:org.apache.logging.log4j.core.config.plugins.convert.TypeConverter[type conversion] and persistence using apiref:java.sql.PreparedStatement#setObject(int,Object)[]. A apiref:org.apache.logging.log4j.core.appender.db.jdbc.ConnectionSource[] plugin instance instructs the appender (and apiref:org.apache.logging.log4j.core.appender.db.jdbc.JdbcDatabaseManager[]) how to connect to the database. +This appender can be reconfigured at run time.Information about the columns that log event data should be inserted into and how to insert that data.The connections source from which database connections should be retrieved.If an integer greater than 0, this causes the appender to buffer log events and flush whenever the buffer reaches this size.The name of the database table to insert log events into.Configures an Apache Commons DBCP apiref:org.apache.commons.dbcp2.PoolableConnectionFactory[].A apiref:org.apache.logging.log4j.core.appender.db.jdbc.ConnectionSource[] that uses a JDBC connection string, a user name, and a password to call apiref:java.sql.DriverManager#getConnection(String,String,String)[]. + +The connections are served from an Apache Commons DBCP pooling driver.This Appender writes logging events to a relational database using the Java Persistence API. + +It requires a pre-configured JPA persistence unit and a concrete implementation of the abstract apiref:org.apache.logging.log4j.core.appender.db.jpa.AbstractLogEventWrapperEntity[] class decorated with JPA annotations.The filter, if any, to use.If an integer greater than 0, this causes the appender to buffer log events and flush whenever the buffer reaches this size.The fully qualified name of the concrete apiref:org.apache.logging.log4j.core.appender.db.jpa.AbstractLogEventWrapperEntity[] implementation that has JPA annotations mapping it to a database table.If `"true"` (default) exceptions encountered when appending events are logged; otherwise they are propagated to the caller.The name of the appender.The name of the JPA persistence unit that should be used for persisting log events.Javax JMS Appender plugin. + +This Appender replaces the previous split classes. +Configurations set up for the 2.0 version of the JMS appenders will still work.Jakarta JMS Appender plugin for both queues and topics.Sends log events to one or more ZeroMQ (JeroMQ) endpoints. + +Requires the JeroMQ jar (LGPL as of 0.3.5)Sends log events to an Apache Kafka topic.This Appender writes logging events to a NoSQL database using a configured NoSQL provider. + +It requires implementations of apiref:org.apache.logging.log4j.core.appender.nosql.NoSqlObject[], apiref:org.apache.logging.log4j.core.appender.nosql.NoSqlConnection[], and apiref:org.apache.logging.log4j.core.appender.nosql.NoSqlProvider[] to "know" how to write events to the chosen NoSQL database. + +For examples on how to write your own NoSQL provider, see the simple source code for the MongoDB and CouchDB providers.Sets the provider.Sets the buffer size.Rewrites log event levels for a given logger name.The levels to rewrite, the key is the source level, the value the target level.The logger name prefix for events to rewrite; all event logger names that start with this string will be rewritten.This policy modifies events by replacing or possibly adding keys and values to the MapMessage.key/value pairs for the new Map keys and values.The string representation of the Mode.This policy modifies events by replacing or possibly adding keys and values to the MapMessage.key/value pairs for the new keys and values.This Appender allows the logging event to be manipulated before it is processed by other Appenders.A Filter to filter events.The policy to use to modify the event.An array of Appender names to call.If `"true"` (default) exceptions encountered when appending events are logged; otherwise they are propagated to the caller.The name of the Appender.Interface to be implemented by components that support modifications to the LogEvent.Abstract convenience class for triggering policies that extend apiref:org.apache.logging.log4j.core.AbstractLifeCycle[] and implement apiref:org.apache.logging.log4j.core.appender.rolling.TriggeringPolicy[].Triggering policy that wraps other triggering policies.The triggering policies.Rolls a file over based on a cron schedule.check if the file should be rolled over immediately.the cron expression.When rolling over, `DefaultRolloverStrategy` renames files according to an algorithm as described below. + +The DefaultRolloverStrategy is a combination of a time-based policy and a fixed-window policy. +When the file name pattern contains a date format then the rollover time interval will be used to calculate the time to use in the file pattern. +When the file pattern contains an integer replacement token one of the counting techniques will be used. + +When the ascending attribute is set to true (the default) then the counter will be incremented and the current log file will be renamed to include the counter value. +If the counter hits the maximum value then the oldest file, which will have the smallest counter, will be deleted, all other files will be renamed to have their counter decremented and then the current file will be renamed to have the maximum counter value. +Note that with this counting strategy specifying a large maximum value may entirely avoid renaming files. + +When the ascending attribute is false, then the "normal" fixed-window strategy will be used. + +Let _max_ and _min_ represent the values of respectively the *MaxIndex* and *MinIndex* options. +Let "foo. +log" be the value of the *ActiveFile* option and "foo. +%i.log" the value of *FileNamePattern*. Then, when rolling over, the file `foo. _max_.log` will be deleted, the file `foo. _max-1_.log` will be renamed as `foo. _max_.log`, the file `foo. _max-2_.log` renamed as `foo. _max-1_.log`, and so on, the file `foo. _min+1_.log` renamed as `foo. _min+2_.log`. Lastly, the active file `foo. log` will be renamed as `foo. _min_.log` and a new active file name `foo. log` will be created. + +Given that this rollover algorithm requires as many file renaming operations as the window size, large window sizes are discouraged.Defines custom actions.Defines compression level.Defines the file index for rolling strategy.Defines the maximum number of files to keep.Defines the minimum number of files to keep.Defines whether to stop executing asynchronous actions if an error occurs.Defines temporary compression file pattern.Created by rgoers on 1/12/17.When rolling over, `DirectWriteRolloverStrategy` writes directly to the file as resolved by the file pattern. + +Files will be renamed files according to an algorithm as described below. + +The DirectWriteRolloverStrategy uses similar logic as DefaultRolloverStrategy to determine the file name based on the file pattern, however the DirectWriteRolloverStrategy writes directly to a file and does not rename it during rollover, except if it is compressed, in which case it will add the appropriate file extension.Defines custom actions.Defines compression level.Defines the maximum number of files to keep.Defines whether to stop executing asynchronous actions if an error occurs.Defines temporary compression file pattern.Triggers a rollover on every restart, but only if the file size is greater than zero.A `RollingPolicy` specifies the actions taken on a logging file rollover.The size of the file before rollover is required.Rolls a file over based on time.A `TriggeringPolicy` controls the conditions under which rollover occurs. + +Such conditions include time of day, file size, an external event, the log request or a combination thereof.Abstract base class for implementations of Action.Abstract action for processing files that are accepted by the specified PathFilters.The Action interface should be implemented by any class that performs file system actions for RollingFileAppenders after the close of the active log file.Rollover or scheduled action for deleting old log files that are accepted by the specified PathFilters.an array of path conditions (if more than one, they all need to accept a path before it is deleted).a plugin implementing the apiref:org.apache.logging.log4j.core.appender.rolling.action.PathSorter[] interfacebase path from where to start scanning for files to delete.whether to follow symbolic links. +Default is false.The maxDepth parameter is the maximum number of levels of directories to visit. +A value of 0 means that only the starting file is visited, unless denied by the security manager. +A value of MAX_VALUE may be used to indicate that all levels should be visited.if true, files are not deleted but instead a message is printed to the status logger at INFO level. +Users can use this to do a dry run to test if their configuration works as expected. +Default is false.Simplified implementation of the ISO-8601 Durations standard. + +The supported format is `PnDTnHnMnS`, with 'P' and 'T' optional. +Days are considered to be exactly 24 hours. + +Similarly to the `java. time. Duration` class, this class does not support year or month sections in the format. +This implementation does not support fractions or negative values.PathCondition that accepts paths after some count threshold is exceeded during the file tree walk.The threshold count from which files will be deleted.PathCondition that accepts paths after the accumulated file size threshold is exceeded during the file tree walk.The threshold accumulated file size from which files will be deleted.Composite `PathCondition` that only accepts objects that are accepted by _all_ component conditions. + +Corresponds to logical "AND".The component filters.Composite `PathCondition` that accepts objects that are accepted by _any_ component conditions. + +Corresponds to logical "OR".The component conditions.PathCondition that accepts files for deletion if their relative path matches either a glob pattern or a regular expression. + +If both a regular expression and a glob pattern are specified the glob pattern is used and the regular expression is ignored. + +The regular expression is a pattern as defined by the apiref:java.util.regex.Pattern[] class. +A glob is a simplified pattern expression described in apiref:java.nio.file.FileSystem#getPathMatcher(String)[].nested conditions to evaluate if this condition accepts a paththe baseDir-relative path pattern of the files to delete (may contain '*' and '?' wildcarts)the regular expression that matches the baseDir-relative path of the file(s) to deletePathCondition that accepts paths that are older than the specified duration.Wrapper `PathCondition` that accepts objects that are rejected by the wrapped component filter.The condition to negate.Filter that accepts or rejects a candidate `Path` for deletion.apiref:org.apache.logging.log4j.core.appender.rolling.action.PathSorter[] that sorts path by their LastModified attribute.if true, most recently modified paths should come first.Defines the interface of classes that can sort Paths.File POSIX attribute view action. + +Allow to define file permissions, user and group for log files on POSIX supported OS.Define path conditions to filter files in apiref:org.apache.logging.log4j.core.appender.rolling.action.PosixViewAttributeAction#getBasePath()[].Define base path to apply condition before execute POSIX file attribute action.Define file group to apply during action execution eligible files.Define file owner to apply during action execution eligible files.Define file permissions in POSIX format to apply during action execution eligible files. + +Example: + +rw-rw-rw + +r--r--r--True to allow synonyms links during search of eligible files.Define max folder depth to search for eligible files to apply POSIX attribute view.A condition of the apiref:org.apache.logging.log4j.core.appender.rolling.action.DeleteAction[] where a user-provided script selects the files to delete from a provided list. + +The specified script may be a apiref:org.apache.logging.log4j.core.appender.rolling.action.org.apache.logging.log4j.core.script.Script[], a apiref:org.apache.logging.log4j.core.script.ScriptFile[] or a apiref:org.apache.logging.log4j.core.script.ScriptRef[].The script to run. +This may be a apiref:org.apache.logging.log4j.core.appender.rolling.action.org.apache.logging.log4j.core.script.Script[], a apiref:org.apache.logging.log4j.core.script.ScriptFile[] or a apiref:org.apache.logging.log4j.core.script.ScriptRef[]. The script must return a `List<PathWithAttributes>`. When the script is executed, it is provided the following bindings: + +* basePath - the directory from where the apiref:org.apache.logging.log4j.core.appender.rolling.action.DeleteAction[Delete] action started scanning for files to delete. +Can be used to relativize the paths in the pathList. +* pathList - a `java. util. List` containing apiref:org.apache.logging.log4j.core.appender.rolling.action.PathWithAttributes[] objects. +(The script is free to modify and return this list. +) +* substitutor - a apiref:org.apache.logging.log4j.core.appender.rolling.action.org.apache.logging.log4j.core.lookup.StrSubstitutor[] that can be used to look up variables embedded in the base dir or other properties +* statusLogger - the apiref:org.apache.logging.log4j.status.StatusLogger[] that can be used to log events during script execution +* any properties declared in the configurationPolicy is purging appenders that were not in use specified time in minuteswhen all appenders purged, the number of increments of timeUnit to check if any appenders appearedthe number of increments of timeUnit before the Appender should be purged.the unit of time the timeToLive and the checkInterval is expressed in.Policy for purging routed appendersA Route to an appender.The key.The Appender reference.Contains the individual Route elements.This Appender "routes" between various Appenders, some of which can be references to Appenders defined earlier in the configuration while others can be dynamically created within this Appender as required. + +Routing is achieved by specifying a pattern on the Routing appender declaration. +The pattern should contain one or more substitution patterns of the form "$${[key:]token}". The pattern will be resolved each time the Appender is called using the built in StrSubstitutor and the StrLookup plugin that matches the specified key.Factory for creating instances of apiref:java.util.concurrent.ArrayBlockingQueue[].Asynchronous Logger object that is created via configuration and can be combined with synchronous loggers. + +AsyncLoggerConfig is a logger designed for high throughput and low latency logging. +It does not perform any I/O in the calling (application) thread, but instead hands off the work to another thread as soon as possible. +The actual logging is performed in the background thread. +It uses LMAX Disruptor for inter-thread communication. + +To use AsyncLoggerConfig, specify `<asyncLogger>` or `<asyncRoot>` in configuration. + +Note that for performance reasons, this logger does not include source location by default. +You need to specify `includeLocation="true"` in the configuration or any %class, %location or %line conversion patterns in your log4j. +xml configuration will produce either a "?" character or no output at all. + +For best performance, use AsyncLoggerConfig with the RandomAccessFileAppender or RollingRandomAccessFileAppender, with immediateFlush=false. +These appenders have built-in support for the batching mechanism used by the Disruptor library, and they will flush to disk at the end of each batch. +This means that even with immediateFlush=false, there will never be any items left in the buffer; all log events will all be written to disk in a very efficient manner.An asynchronous root Logger.This class allows users to configure the factory used to create an instance of the LMAX disruptor WaitStrategy used by Async Loggers in the log4j configuration.Factory for creating instances of apiref:java.util.concurrent.BlockingQueue[].Factory for creating instances of apiref:com.conversantmedia.util.concurrent.DisruptorBlockingQueue[].Factory for creating instances of BlockingQueues backed by JCTools apiref:org.jctools.queues.MpscArrayQueue[].Factory for creating instances of apiref:java.util.concurrent.LinkedTransferQueue[].An Appender reference.The filter(s) to use.The Level to filter against.The name of the Appender.An Appender container.An array of Appenders.A Log4j configuration contains many components of which two are required: `Appenders` and `Loggers`.Wrapper element for a list of propertiesWrapper element for a list of appendersWrapper element for a list of custom levelsWrapper element for a list of logger configurationsSpecifies the destination for status logger events. +The possible values are: + +* `out` for using standard out (default) +* `err` for using standard error +* a string that is interpreted in order as URI, URL or the path to a local file + +If the provided value is invalid, then the default destination of standard out will be used.Name of the configurationNumber of seconds between polls for configuration changesThe name of a classpath resource to use to validate the configurationIndicates if Log4j should automatically shut down when the JVM shuts down. +Possible values are `enable` and `disable`. +The shutdown hook is enabled by default, unless Log4j detects the presence of the Servlet API.Timeout in milliseconds of the logger context shut downSets the level of the status loggerIf set to `true` the configuration file will be validated using an XML schema.Indicates that a class requests the current Configuration to be injected.Factory class for parsed apiref:org.apache.logging.log4j.core.config.Configuration[] objects from a configuration file. + +ConfigurationFactory allows the configuration implementation to be dynamically chosen in 1 of 3 ways: + +. A system property named "log4j. +configurationFactory" can be set with the name of the ConfigurationFactory to be used. +. apiref:org.apache.logging.log4j.core.config.ConfigurationFactory#setConfigurationFactory(ConfigurationFactory)[] can be called with the instance of the ConfigurationFactory to be used. +This must be called before any other calls to Log4j. +. A ConfigurationFactory implementation can be added to the classpath and configured as a plugin in the apiref:org.apache.logging.log4j.core.config.ConfigurationFactory#CATEGORY[ConfigurationFactory] category. +The apiref:org.apache.logging.log4j.core.config.Order[] annotation should be used to configure the factory to be the first one inspected. +See apiref:org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory[] for an example. + +If the ConfigurationFactory that was added returns null on a call to getConfiguration then any other ConfigurationFactories found as plugins will be called in their respective order. +DefaultConfiguration is always called last if no configuration has been returned.Descriptor of a custom Level object that is created via configuration.the intLevel that determines where this level resides relative to the built-in levelsname of the custom level.Container for CustomLevelConfig objects.An array of CustomLevelConfigs.The default advertiser does not do anything.Logger object that is created via configuration.Logger object that is created via configuration.The root Logger.Container of Logger objects.An array of Loggers.Container for the `MonitorResource` element.Container for the `MonitorResources` element.Handles properties defined in the configuration.An array of Property elements.Represents a key/value pair in the configuration.The key.The value without any substitution applied.A container of Scripts.An array of Scripts.Interface used to check for portions of the configuration that may be optionally included.Conditional that determines if the specified class is present.Sets the Class name.Default Condition for a Select Condition.Condition that determines if the specified environment variable is set.Sets the Property Name.Sets the Property Value.Condition that evaluates a script.Class Description goes here.Condition that determines if the specified property is set.Sets the Property Name.Sets the Property Value.Provides methods to create ConfigurationBuilders.Interface for doing automatic String conversion to a specific type.Parses a apiref:java.lang.String[] into a apiref:java.math.BigDecimal[].Parses a apiref:java.lang.String[] into a apiref:java.math.BigInteger[].Converts a apiref:java.lang.String[] into a apiref:java.lang.Boolean[].Converts a apiref:java.lang.String[] into a `byte[]`. + +The supported formats are: + +* 0x0123456789ABCDEF +* Base64:ABase64String +* String using apiref:java.nio.charset.Charset#defaultCharset()[] [TODO Should this be UTF-8 instead? +]Converts a apiref:java.lang.String[] into a apiref:java.lang.Byte[].Converts a apiref:java.lang.String[] into a `char[]`.Converts a apiref:java.lang.String[] into a apiref:java.lang.Character[].Converts a apiref:java.lang.String[] into a apiref:java.nio.charset.Charset[].Converts a apiref:java.lang.String[] into a apiref:java.lang.Class[].Converts a apiref:java.lang.String[] into a apiref:java.lang.Double[].Converts a apiref:java.lang.String[] into a apiref:org.apache.logging.log4j.core.config.plugins.convert.TypeConverters.org.apache.logging.log4j.core.appender.rolling.action.Duration[].Converts a apiref:java.lang.String[] into a apiref:java.io.File[].Converts a apiref:java.lang.String[] into a apiref:java.lang.Float[].Converts a apiref:java.lang.String[] into an apiref:java.net.InetAddress[].Converts a apiref:java.lang.String[] into a apiref:java.lang.Integer[].Converts a apiref:java.lang.String[] into a Log4j apiref:org.apache.logging.log4j.Level[].Converts a apiref:java.lang.String[] into a apiref:java.lang.Long[].Converts a apiref:java.lang.String[] into a apiref:java.nio.file.Path[].Converts a apiref:java.lang.String[] into a apiref:java.util.regex.Pattern[].Converts a apiref:java.lang.String[] into a apiref:java.security.Provider[].Converts a apiref:java.lang.String[] into a apiref:java.lang.Short[].Returns the given apiref:java.lang.String[], no conversion takes place.Converts a apiref:java.lang.String[] into a apiref:java.net.URI[].Converts a apiref:java.lang.String[] into a apiref:java.net.URL[].Converts a apiref:java.lang.String[] into a apiref:java.util.UUID[].Creates a PropertiesConfiguration from a properties file.Factory to construct an XmlConfiguration.Users should extend this class to implement filters. + +Filters can be either context wide or attached to an appender. +A filter may choose to support being called only from the context or only from an appender in which case it will only implement the required method(s). The rest will default to return apiref:org.apache.logging.log4j.core.filter.org.apache.logging.log4j.core.Filter.Result#NEUTRAL[]. + +Garbage-free note: the methods with unrolled varargs by default delegate to the apiref:org.apache.logging.log4j.core.filter.AbstractFilter#filter(Logger, Level, Marker, String, Object...)[filter method with vararg parameters]. Subclasses that want to be garbage-free should override these methods to implement the appropriate filtering without creating a vararg array.Enhances a Class by allowing it to contain Filters.The `BurstFilter` is a logging filter that regulates logging traffic. + +Use this filter when you want to control the maximum burst of log statements that can be sent to an appender. +The filter is configured in the log4j configuration file. +For example, the following configuration limits the number of INFO level (as well as DEBUG and TRACE) log statements that can be sent to the console to a burst of 100 with an average rate of 16 per second. +WARN, ERROR and FATAL messages would continue to be delivered. +`<Console name="console"> <PatternLayout pattern="%-5p %d{dd-MMM-yyyy HH:mm:ss} %x %t %m%n"/> <Filters> <BurstFilter level="INFO" rate="16" maxBurst="100"/> </Filters> </Console>`Sets the logging level to use.Sets the maximum number of events that can occur before events are filtered for exceeding the average rate.Sets the Result to return when the filter matches. + +Defaults to Result. +NEUTRAL.Sets the Result to return when the filter does not match. + +The default is Result. +DENY.Sets the average number of events per second to allow.Composes and invokes one or more filters.An array of Filters to call.This filter causes all logging events to be dropped.Sets the Result to return when the filter matches. + +Defaults to Result. +NEUTRAL.Sets the Result to return when the filter does not match. + +The default is Result. +DENY.Compares against a log level that is associated with a context value. + +By default the context is the apiref:org.apache.logging.log4j.ThreadContext[], but users may apiref:org.apache.logging.log4j.core.impl.ContextDataInjectorFactory[configure] a custom apiref:org.apache.logging.log4j.core.ContextDataInjector[] which obtains context data from some other source.An array of value and Level pairs.The default Level.The name of the key to compare.The action to perform if a match occurs.The action to perform if no match occurs.Interface implemented by Classes that allow filtering to occur. + +Extends apiref:org.apache.logging.log4j.core.LifeCycle[] since filters have a life cycle.This filter returns the onMatch result if the logging level in the event matches the specified logging level exactly.Sets the logging level to use.Sets the Result to return when the filter matches. + +Defaults to Result. +NEUTRAL.Sets the Result to return when the filter does not match. + +The default is Result. +DENY.This filter returns the apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#onMatch[] result if the level of the apiref:org.apache.logging.log4j.core.LogEvent[] is in the range of the configured apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#minLevel[] and apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#maxLevel[] values, otherwise it returns the apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#onMismatch[] result. + +The default values for apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#minLevel[] and apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#maxLevel[] are set to apiref:org.apache.logging.log4j.Level#OFF[] and apiref:org.apache.logging.log4j.Level#ALL[], respectively. +The default values for apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#onMatch[] and apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#onMismatch[] are set to apiref:org.apache.logging.log4j.core.filter.Result#NEUTRAL[] and apiref:org.apache.logging.log4j.core.filter.Result#DENY[], respectively. + +The levels get compared by their associated integral values; apiref:org.apache.logging.log4j.Level#OFF[] has an integral value of 0, apiref:org.apache.logging.log4j.Level#FATAL[] 100, apiref:org.apache.logging.log4j.Level#ERROR[] 200, and so on. +For example, if the filter is configured with apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#maxLevel[] set to apiref:org.apache.logging.log4j.Level#INFO[], the filter will return apiref:org.apache.logging.log4j.core.filter.LevelRangeFilter#onMismatch[] result for apiref:org.apache.logging.log4j.core.LogEvent[]s of level with higher integral values; apiref:org.apache.logging.log4j.Level#DEBUG[], apiref:org.apache.logging.log4j.Level#TRACE[], etc.the maximum level thresholdthe minimum level thresholdthe result to return on a matchthe result to return on a mismatchA Filter that operates on a Map.A Filter that operates on a Map.This filter returns the onMatch result if the marker in the LogEvent is the same as or has the configured marker as a parent.The Marker name to match.The action to take if a match occurs.The action to take if no match occurs.Filter based on a value in the Thread Context Map (MDC).Sets the configuration to use.Sets the Result to return when the filter matches. + +Defaults to Result. +NEUTRAL.Sets the Result to return when the filter does not match. + +The default is Result. +DENY.Set the frequency in seconds that changes to the list a ThreadContext valudes should be checked.This filter returns the onMatch result if there is no marker in the LogEvent.Sets the Result to return when the filter matches. + +Defaults to Result. +NEUTRAL.Sets the Result to return when the filter does not match. + +The default is Result. +DENY.A filter that matches the given regular expression pattern against messages.The action to perform when a match occurs.The action to perform when a mismatch occurs.The regular expression to match.If `true`, for apiref:org.apache.logging.log4j.message.ParameterizedMessage[], apiref:org.apache.logging.log4j.message.StringFormattedMessage[], and apiref:org.apache.logging.log4j.message.MessageFormatMessage[], the message format pattern; for apiref:org.apache.logging.log4j.message.StructuredDataMessage[], the message field will be used as the match target.Returns the onMatch result if the script returns True and returns the onMismatch value otherwise.The script to run. +The script must return a boolean value. +Either script or scriptFile must be provided.The action to take if a match occurs.The action to take if no match occurs.This filter returns the onMatch result if the logging level in the event matches the specified logging level exactly.Sets the Result to return when the filter matches. + +Defaults to Result. +NEUTRAL.Sets the Result to return when the filter does not match. + +The default is Result. +DENY.Sets the text to search in event messages.Filter based on data in a StructuredDataMessage.Key and value pairs.The action to perform on a match.The action to perform on a mismatch.The operator to perform. +If not "or" the operation will be an "and".Filter based on a value in the Thread Context Map (MDC).This filter returns the onMatch result if the level in the apiref:org.apache.logging.log4j.core.LogEvent[] is the same or more specific than the configured level and the `onMismatch` value otherwise. + +For example, if the ThresholdFilter is configured with Level `ERROR` and the LogEvent contains Level `DEBUG` then the `onMismatch` value will be returned since `ERROR` events are more specific than `DEBUG`. + +The default Level is `ERROR`.The log Level.The action to take on a match.The action to take on a mismatch.Filters events that fall within a specified time period in each day.The end time.Action to perform if the time matches.Action to perform if the action does not match.The start time.timezone.Classes that use location information should implement this interface.A superclass for Comma-Separated Value (CSV) layouts. + +Depends on Apache Commons CSV 1.2.Abstract base class for Layouts.Abstract base class for Layouts that result in a String. + +Since 2.4.1, this class has custom logic to convert ISO-8859-1 or US-ASCII Strings to byte[] arrays to improve performance: all characters are simply cast to bytes.A Comma-Separated Value (CSV) layout to log events. + +Depends on Apache Commons CSV 1.2.A Comma-Separated Value (CSV) layout to log event parameters. + +The event message is currently ignored. + +Best used with: + +`logger. debug(new ObjectArrayMessage(1, 2, "Bob"));` Depends on Apache Commons CSV 1.4.Objects implementing the `Encoder` interface know how to convert an object to some binary representation and write the result to a `ByteBuffer`, ideally without creating temporary objects.Lays out events in the Graylog Extended Log Format (GELF) 1.1. + +This layout compresses JSON to GZIP or ZLIB (the `compressionType`) if log event data is larger than 1024 bytes (the `compressionThreshold`). This layout does not implement chunking.The PatternSelector to use to format the message.Additional fields to set on each log event.Compress if data is larger than this number of bytes (optional, defaults to 1024).Compression to use (optional, defaults to GZIP).The value of the `host` property (optional, defaults to local host name).Whether to include MapMessage fields as additional fields (optional, default to true).Whether to include newline (LF) as delimiter after each event (optional, default to false).Whether to include NULL byte as delimiter after each event (optional, default to false). + +Useful for Graylog GELF TCP input.Whether to include full stacktrace of logged Throwables (optional, default to true). + +If set to false, only the class name and message of the Throwable will be included.Whether to include thread context as additional fields (optional, default to true).A comma separated list of MapMessage keys to exclude;A comma separated list of thread context keys to include;The String to prefix the MapMessage attributes.The pattern to use to format the message.The String to prefix the ThreadContext attributes.Outputs events as rows in an HTML table on an HTML page. + +Appenders using this layout should have their encoding set to UTF-8 or UTF-16, otherwise events containing non ASCII characters could result in corrupted log files.Possible font sizesNote: The JsonLayout should be considered to be deprecated. + +Please use JsonTemplateLayout instead. +Appends a series of JSON events as strings serialized as bytes. + +== Additional Fields + +If you configure `complete="true"`, the appender outputs a well-formed JSON document. +By default, with `complete="false"`, you should include the output as an _external file_ in a separate file to form a well-formed JSON document. + +If `complete="false"`, the appender does not write the JSON open array character "[" at the start of the document, "]" and the end, nor comma "," between records. + +Appenders using this layout should have their `charset` set to `UTF-8` or `UTF-16`, otherwise events containing non ASCII characters could result in corrupted log files. + +By default, the JSON layout is not compact (a.k.a. "pretty") with `compact="false"`, which means the appender uses end-of-line characters and indents lines to format the text. +If `compact="true"`, then no end-of-line or indentation is used. +Message content may contain, of course, escaped end-of-lines. + +This property allows addition of custom fields into generated JSON. +`<JsonLayout><KeyValuePair key="foo" value="bar"/></JsonLayout>` inserts `"foo":"bar"` directly into JSON output. +Supports Lookup expressions.Additional fields to set on each log event.Whether to include NULL byte as delimiter after each event (optional, default to false).If "true", includes the stacktrace of any Throwable in the generated JSON, defaults to "true". + +If "true", includes the stacktrace of any Throwable in the generated data, defaults to "true".Whether to include the timestamp (in addition to the Instant) (optional, default to false).Whether to format the stacktrace as a string, and not a nested object (optional, defaults to false).Selects the pattern to use based on the Level in the LogEvent.A LoggerFields container.An array of KeyValuePairs.this SD-ELEMENT should be discarded if all fields are emptyThe IANA assigned enterprise numberThe SD-ID in an SD-ELEMENTSelects the pattern to use based on the Marker in the LogEvent.Formats a apiref:org.apache.logging.log4j.core.LogEvent[] in its apiref:org.apache.logging.log4j.message.Message[] form. + +Useful in combination with a JMS Appender to map a Log4j apiref:org.apache.logging.log4j.core.layout.org.apache.logging.log4j.message.MapMessage[] or apiref:org.apache.logging.log4j.core.layout.org.apache.logging.log4j.message.StringMapMessage[] to a JMS apiref:org.apache.logging.log4j.core.layout.javax.jms.MapMessage[].A flexible layout configurable with pattern string. + +The goal of this class is to apiref:org.apache.logging.log4j.core.layout.org.apache.logging.log4j.core.Layout#toByteArray[format] a apiref:org.apache.logging.log4j.core.LogEvent[] and return the results. +The format of the result depends on the _conversion pattern_. + +The conversion pattern is closely related to the conversion pattern of the printf function in C. A conversion pattern is composed of literal text and format control expressions called _conversion specifiers_. + +See the Log4j Manual for details on the supported pattern converters.PatternMatch configuration item.Allows different patterns to be used with the PatternLayout based on some selection criteria.Formats a log event in accordance with RFC 5424.Selects the pattern to use based on the result of executing a Script. + +The returned value will be used as the "key" to choose between one of the configured patterns. +If no key is returned or there is no match the default pattern will be used.Formats a apiref:org.apache.logging.log4j.core.LogEvent[] in its Java serialized form.Formats a log event as a BSD Log record.Appends a series of `event` elements as defined in the Log4j-events. +xsd. + +== Additional Fields + +If you configure `complete="true"`, the appender outputs a well-formed XML document where the default namespace is the log4j namespace . By default, with `complete="false"`, you should include the output as an _external entity_ in a separate file to form a well-formed XML document. + +If `complete="false"`, the appender does not write the XML processing instruction and the root element. + +Appenders using this layout should have their `charset` set to `UTF-8` or `UTF-16`, otherwise events containing non-ASCII characters could result in corrupted log files. + +By default, the XML layout is not compact (compact = not "pretty") with `compact="false"`, which means the appender uses end-of-line characters and indents lines to format the XML. +If `compact="true"`, then no end-of-line or indentation is used. +Message content may contain, of course, end-of-lines. + +This property allows addition of custom fields into generated JSON. +`<XmlLayout><KeyValuePair key="foo" value="bar"/></XmlLayout>` inserts `<foo>bar</foo>` directly into XML output. +Supports Lookup expressions.Additional fields to set on each log event.Whether to include NULL byte as delimiter after each event (optional, default to false).If "true", includes the stacktrace of any Throwable in the generated JSON, defaults to "true". + +If "true", includes the stacktrace of any Throwable in the generated data, defaults to "true".Whether to include the timestamp (in addition to the Instant) (optional, default to false).Whether to format the stacktrace as a string, and not a nested object (optional, defaults to false).Appends a series of YAML events as strings serialized as bytes. + +== Additional Fields + +Appenders using this layout should have their `charset` set to `UTF-8` or `UTF-16`, otherwise events containing non ASCII characters could result in corrupted log files. + +This property allows addition of custom fields into generated JSON. +`<YamlLayout><KeyValuePair key="foo" value="bar"/></YamlLayout>` inserts `foo: "bar"` directly into YAML output. +Supports Lookup expressions.Additional fields to set on each log event.Whether to include NULL byte as delimiter after each event (optional, default to false).If "true", includes the stacktrace of any Throwable in the generated JSON, defaults to "true". + +If "true", includes the stacktrace of any Throwable in the generated data, defaults to "true".Whether to include the timestamp (in addition to the Instant) (optional, default to false).Whether to format the stacktrace as a string, and not a nested object (optional, defaults to false).StrLookup that is ConfigurationAware. + +Handles saving the Configuration.A default lookup for others to extend.Looks up keys from the context. + +By default this is the apiref:org.apache.logging.log4j.ThreadContext[], but users may apiref:org.apache.logging.log4j.core.impl.ContextDataInjectorFactory[configure] a custom apiref:org.apache.logging.log4j.core.ContextDataInjector[] which obtains context data from some other source.Formats the current date or the date in the LogEvent. + +The "key" is used as the format String, following the java. +text. +SimpleDateFormat date and time pattern strings.Looks up keys from environment variables.Looks up values from the log event.Looks up keys related to Java: Java version, JRE version, VM version, and so on.Looks up keys from JNDI resources.Lookup properties of Log4jConverts values to lower case. + +The passed in "key" should be the value of another lookup.A map-based lookup for main arguments. + +See apiref:org.apache.logging.log4j.core.lookup.MainMapLookup#setMainArguments(String[])[].A map-based lookup.A map-based lookup.Looks-up markers.Looks up keys from resource bundles.Lookup a String key to a String value. + +This class represents the simplest form of a string to string map. +It has a benefit over a map in that it can create the result on demand based on the key. + +This class comes complete with various factory methods. +If these do not suffice, you can subclass and implement your own matcher. + +For example, it would be possible to implement a lookup that used the key as a primary key, and looked up the value on demand from the databaseLooks up keys from apiref:org.apache.logging.log4j.core.lookup.org.apache.logging.log4j.message.StructuredDataMessage[] log messages.Looks up keys from system properties.Converts values to upper case. + +The passed in "key" should be the value of another lookup.The facility codes used by the Syslog system. + +[cols="1,1"] +|=== + +h| Numerical Code +h| Facility + +h| Facility +| 0 +| kernel messages + +| 1 +| user-level messages + +| 2 +| mail system + +| 3 +| system daemons + +| 4 +| security/authorization messages + +| 5 +| messages generated internally by syslogd + +| 6 +| line printer subsystem + +| 7 +| network news subsystem + +| 8 +| UUCP subsystem + +| 9 +| clock daemon + +| 10 +| security/authorization messages + +| 11 +| FTP daemon + +| 12 +| NTP subsystem + +| 13 +| log audit + +| 14 +| log alert + +| 15 +| clock daemon (note 2) + +| 16 +| local use 0 (local0) + +| 17 +| local use 1 (local1) + +| 18 +| local use 2 (local2) + +| 19 +| local use 3 (local3) + +| 20 +| local use 4 (local4) + +| 21 +| local use 5 (local5) + +| 22 +| local use 6 (local6) + +| 23 +| local use 7 (local7) + +|===Kernel messages.User level messages.Mail system.System daemons.Security/Authorization messages.Messages generated by syslogd.Line printer subsystem.Network news subsystem.UUCP subsystem.Clock daemon.Security/Authorization messages.FTP daemon.NTP subsystem.Log audit.Log alert.Clock daemon.Local use 0.Local use 1.Local use 2.Local use 3.Local use 4.Local use 5.Local use 6.Local use 7.Advertise an entity via ZeroConf/MulticastDNS and the JmDNS library. + +The length of property names and values must be 255 bytes or less. +Entries with names or values larger than 255 bytes will be removed prior to advertisement.Enumerates the supported protocols.TCP Protocol.SSL Protocol.UDP Protocol.Enumerates the RFC 1349 TOS field. + +* `IPTOS_LOWCOST (0x02)` +* `IPTOS_RELIABILITY (0x04)` +* `IPTOS_THROUGHPUT (0x08)` +* `IPTOS_LOWDELAY (0x10)` +*IPTOS_NORMAL (0x00)IPTOS_LOWCOST (0x02)IPTOS_LOWDELAY (0x10)IPTOS_RELIABILITY (0x04)IPTOS_THROUGHPUT (0x08)Plugin to hold a hostname and port (socket address).Holds all socket options settable via apiref:java.net.Socket[] methods.See apiref:java.net.Socket#setPerformancePreferences(int,int,int)[]. + +See apiref:java.net.Socket#setPerformancePreferences(int,int,int)[].See apiref:java.net.Socket#setKeepAlive(boolean)[]. + +See apiref:java.net.Socket#setKeepAlive(boolean)[].See apiref:java.net.Socket#setOOBInline(boolean)[]. + +See apiref:java.net.Socket#setOOBInline(boolean)[].See apiref:java.net.Socket#setReceiveBufferSize(int)[]. + +See apiref:java.net.Socket#setReceiveBufferSize(int)[].See apiref:java.net.Socket#setReuseAddress(boolean)[]. + +See apiref:java.net.Socket#setReuseAddress(boolean)[].See apiref:java.net.Socket#setTrafficClass(int)[]. + +See apiref:java.net.Socket#setTrafficClass(int)[].See apiref:java.net.Socket#setSendBufferSize(int)[]. + +See apiref:java.net.Socket#setSendBufferSize(int)[].See apiref:java.net.Socket#setSoLinger(boolean,int)[]. + +See apiref:java.net.Socket#setSoLinger(boolean,int)[].See apiref:java.net.Socket#setSoTimeout(int)[]. + +See apiref:java.net.Socket#setSoTimeout(int)[].See apiref:java.net.Socket#setTcpNoDelay(boolean)[]. + +See apiref:java.net.Socket#setTcpNoDelay(boolean)[].See apiref:java.net.Socket#setTrafficClass(int)[]. + +See apiref:java.net.Socket#setTrafficClass(int)[].Holds all socket options settable via apiref:java.net.Socket#setPerformancePreferences(int,int,int)[]. + +The apiref:java.net.Socket#setPerformancePreferences(int,int,int)[] API may not be implemented by a JRE.Configuration of the KeyStoreConfiguration of the KeyStoreThe standard name of the requested algorithm. +See the Java Secure Socket Extension Reference Guide for information about these names.The location of the KeyStore, a file path, URL or resource.The password to access the KeyStore.The KeyStore type, null defaults to `"JKS"`.SSL ConfigurationThe KeyStoreConfiguration.The TrustStoreConfiguration.The protocol, see SSLContext AlgorithmsConfiguration of the TrustStoreThe location of the KeyStore, a file path, URL or resource.The password to access the KeyStore.The standard name of the requested trust management algorithm. +See the Java Secure Socket Extension Reference Guide for information these names.The KeyStore type, null defaults to `"JKS"`.AbstractPatternConverter is an abstract class that provides the formatting functionality that derived classes need. + +Conversion specifiers in a conversion patterns are parsed to individual PatternConverters. +Each of which is responsible for converting an object in a converter specific manner.Style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern.Black style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern.Blue style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern.Cyan style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern.Green style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern.Magenta style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern.Red style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern.White style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern.Yellow style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern.Marks classes that implement ANSI escape code conversions.apiref:org.apache.logging.log4j.core.pattern.PatternConverter[]s implement this interface to accept an array of objects when formatting.Formats the class name of the site of the logging request.Converts and formats the event's date in a StringBuilder.Converter that encodes the output from a pattern using a specified format. + +Supported formats include HTML (default) and JSON.Formats the EndOfBatch.Equals pattern converter.Equals ignore case pattern converter.Equals pattern converter.apiref:org.apache.logging.log4j.core.pattern.ThrowablePatternConverter[] variant where the rendered apiref:java.lang.StackTraceElement[]s are enriched with the enclosing JAR file and its version information, if available.Formats a date by delegating to apiref:org.apache.logging.log4j.core.pattern.DatePatternConverter[]. + +The default date pattern for a %d specifier in a file name is different than the %d pattern in pattern layout.Returns the event's line location information in a StringBuilder.Format the event's line location information.Highlight pattern converter. + +Formats the result of a pattern using a color appropriate for the Level in the LogEvent. + +For example: + +[source,java] +---- +%highlight{%d{ ISO8601 } [%t] %-5level: %msg%n%throwable} +---- + +You can define custom colors for each Level: + +[source,java] +---- +%highlight{%d{ ISO8601 } [%t] %-5level: %msg%n%throwable}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=cyan, +TRACE=black} +---- + +You can use a predefined style: + +[source,java] +---- +%highlight{%d{ ISO8601 } [%t] %-5level: %msg%n%throwable}{STYLE=DEFAULT} +---- + +The available predefined styles are: + +* `Default` +* `Log4j` - The same as `Default` +* `Logback` + +You can use whitespace around the comma and equal sign. +The names in values MUST come from the apiref:org.apache.logging.log4j.core.pattern.AnsiEscape[] enum, case is normalized to upper-case internally. + +To disable ANSI output unconditionally, specify an additional option `disableAnsi=true`, or to disable ANSI output if no console is detected, specify option `noConsoleNoAnsi=true` e.g.. + +[source,java] +---- +%highlight{%d{ ISO8601 } [%t] %-5level: %msg%n%throwable}{STYLE=DEFAULT, noConsoleNoAnsi=true} +----Formats an integer.Returns the event's level in a StringBuilder.Returns the event's line location information in a StringBuilder.Formats a line separator.LoggingEventPatternConverter is a base class for pattern converters that can format information from instances of LoggingEvent.Formats the Logger FQCN.Formats a logger name.Able to handle the contents of the LogEvent's MapMessage and either output the entire contents of the properties in a similar format to the java. +util. +Hashtable. +toString(), or to output the value of a specific key within the Map.Returns events' full marker string in a StringBuilder.Appends an event's maker name to a StringBuilder.Max length pattern converter. + +Limit contained text to a maximum length. +On invalid length the default value 100 is used (and an error message is logged). If max length is greater than 20, an abbreviated text will get ellipsis ("...") appended. +Example usage (for email subject): + +[source,java] +---- +`%maxLen{[AppName, ${hostName}, ${web:contextPath}] %p: %c{1} - %m%notEmpty{ =>%ex{short}}}{160}` +----Able to handle the contents of the LogEvent's MDC and either output the entire contents of the properties in a similar format to the java. +util. +Hashtable. +toString(), or to output the value of a specific key within the property bundle when this pattern converter has the option set.Returns the event's rendered message in a StringBuilder.Returns the event's line location information in a StringBuilder.Abstract base class for other pattern converters which can return only parts of their name.Converts and formats the event's nanoTime in a StringBuilder.Returns the event's NDC in a StringBuilder.Interface that all PatternConverters must implement.Replace tokens in the LogEvent message.The replacement value.Replacement pattern converter.Returns the relative time in milliseconds since JVM Startup.Equals pattern converter.apiref:org.apache.logging.log4j.core.pattern.ThrowablePatternConverter[] variant where the stack trace causal chain is rendered in reverse order.Formats the event sequence number.Style pattern converter. + +Adds ANSI color styling to the result of the enclosed pattern. + +To disable ANSI output unconditionally, specify an additional option `disableAnsi=true`, or to disable ANSI output if no console is detected, specify option `noConsoleNoAnsi=true`.Formats the event thread ID.Formats the event thread name.Formats the event thread priority.Outputs certain information extracted from the apiref:java.lang.Throwable[] associated with a apiref:org.apache.logging.log4j.core.LogEvent[].Outputs certain information extracted from the apiref:java.lang.Throwable[] associated with a apiref:org.apache.logging.log4j.core.LogEvent[].Formats a UUID.VariablesNotEmpty pattern converter.Container for the language and body of a script.Container for the language and body of a script.Container for the language and body of a script file along with the file location.Contains a reference to a script defined elsewhere in the configuration.Watcher for configuration files. + +Causes a reconfiguration when a file changes.A type of builder that can be used to configure and create a instances using a Java DSL instead of through a configuration file. + +These builders are primarily useful for internal code and unit tests, but they can technically be used as a verbose alternative to configuration files. + +When creating _plugin_ builders, it is customary to create the builder class as a public static inner class called `Builder`. For instance, the builder class for apiref:org.apache.logging.log4j.core.util.org.apache.logging.log4j.core.layout.PatternLayout[PatternLayout] would be `PatternLayout. Builder`.Key/Value pair configuration item.Watches for changes in a Source and performs an action when it is modified.The Apache CouchDB implementation of apiref:org.apache.logging.log4j.core.appender.nosql.NoSqlProvider[].The name of the database to which log event documents will be written.A fully qualified class name containing a static factory method capable of returning a apiref:org.lightcouch.CouchDbClient[] or apiref:org.lightcouch.CouchDbProperties[].The name of the public static factory method belonging to the aforementioned factory class.The password to authenticate against the MongoDB server with, mutually exclusive with `factoryClassName&factoryMethodName! =null`.The port that CouchDB is listening on, defaults to 80 if `protocol` is "http" and 443 if `protocol` is "https," and mutually exclusive with `factoryClassName&factoryMethodName! =null`.Either "http" or "https," defaults to "http" and mutually exclusive with `factoryClassName&factoryMethodName! =null`.The host name of the CouchDB server, defaults to localhost and mutually exclusive with `factoryClassName&factoryMethodName! =null`.The username to authenticate against the MongoDB server with, mutually exclusive with `factoryClassName&factoryMethodName! =null`.Lookups up keys for a Docker container.apiref:org.apache.logging.log4j.layout.template.json.resolver.CaseConverterResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.CounterResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.EndOfBatchResolver[] factory.Interceptor to add apiref:org.apache.logging.log4j.layout.template.json.JsonTemplateLayout.EventTemplateAdditionalField[additional fields] after event template read.apiref:org.apache.logging.log4j.layout.template.json.resolver.TemplateResolverFactory[] specialized for apiref:org.apache.logging.log4j.core.LogEvent[]s.apiref:org.apache.logging.log4j.layout.template.json.resolver.TemplateResolverInterceptor[] specialized for apiref:org.apache.logging.log4j.core.LogEvent[]s.Interceptor to add a root object key to the event template.apiref:org.apache.logging.log4j.layout.template.json.resolver.ExceptionResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.ExceptionRootCauseResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.LevelResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.LoggerResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.MainMapResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.MapResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.MarkerResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.MessageParameterResolver[] factory.A apiref:org.apache.logging.log4j.layout.template.json.resolver.MessageResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.PatternResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.SourceResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.TemplateResolver[] factory.Main apiref:org.apache.logging.log4j.layout.template.json.resolver.TemplateResolver[] compilation interception interface.apiref:org.apache.logging.log4j.layout.template.json.resolver.ThreadContextDataResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.ThreadContextStackResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.ThreadResolver[] factory.apiref:org.apache.logging.log4j.layout.template.json.resolver.TimestampResolver[] factory.The default string (i.e., recycler factory spec) to apiref:org.apache.logging.log4j.layout.template.json.util.RecyclerFactory[] type converter.Delegates to apiref:org.apache.logging.log4j.mongodb4.MongoDb4Provider[] under the name `MongoDb`.The MongoDB implementation of apiref:org.apache.logging.log4j.core.appender.nosql.NoSqlProvider[] using the MongoDB driver version 4 API.Sets whether the MongoDB collection is capped.Sets name of the collection for the appender to output toSets the maximum size in bytes of a capped collection. + +Sets the maximum size in bytes of a capped collection.Sets the MongoDB connection string.Sets the name of the logical database for the appender to output to.Lookup for Spring properties.An Aribter that uses the active Spring profile to determine if configuration should be included.Sets the Profile Name or Names.Logs using the ServletContext's log methodLogs with apiref:jakarta.servlet.ServletContext#log(String,Throwable)[] if true and with apiref:jakarta.servlet.ServletContext#log(String)[] if false. + +Logs with apiref:jakarta.servlet.ServletContext#log(String,Throwable)[] if true and with apiref:jakarta.servlet.ServletContext#log(String)[] if false. \ No newline at end of file diff --git a/src/site/static/xml/ns/log4j-config-2.xsd b/src/site/static/xml/ns/log4j-config-2.xsd index ebba48f3..14296838 120000 --- a/src/site/static/xml/ns/log4j-config-2.xsd +++ b/src/site/static/xml/ns/log4j-config-2.xsd @@ -1 +1 @@ -log4j-config-2.23.1.xsd \ No newline at end of file +log4j-config-2.25.4.xsd \ No newline at end of file