This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x-docgen-antora in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 44c99bba345b50b322d7caa3f893bde15d6935f2 Author: Volkan Yazıcı <[email protected]> AuthorDate: Fri Mar 22 17:38:12 2024 +0100 Antora fixes --- src/site/antora/antora.tmpl.yml | 3 +- src/site/antora/modules/ROOT/nav.adoc | 81 +++-- .../antora/modules/ROOT/pages/_log4j1-eol.adoc | 2 +- src/site/antora/modules/ROOT/pages/articles.adoc | 2 +- src/site/antora/modules/ROOT/pages/faq.adoc | 14 +- src/site/antora/modules/ROOT/pages/index.adoc | 31 +- .../modules/ROOT/pages/log4j-jakarta-web.adoc | 2 +- src/site/antora/modules/ROOT/pages/log4j-jul.adoc | 4 +- .../modules/ROOT/pages/log4j-spring-boot.adoc | 2 +- src/site/antora/modules/ROOT/pages/log4j-web.adoc | 2 +- .../modules/ROOT/pages/manual/appenders.adoc | 2 +- .../modules/ROOT/pages/manual/configuration.adoc | 36 +- .../modules/ROOT/pages/manual/eventlogging.adoc | 6 +- .../modules/ROOT/pages/manual/flowtracing.adoc | 6 +- .../antora/modules/ROOT/pages/manual/index.adoc | 372 ++++++++++----------- .../ROOT/pages/manual/json-template-layout.adoc | 24 +- .../modules/ROOT/pages/manual/logbuilder.adoc | 3 +- .../antora/modules/ROOT/pages/manual/markers.adoc | 6 +- .../antora/modules/ROOT/pages/manual/messages.adoc | 6 +- .../modules/ROOT/pages/manual/migration.adoc | 2 +- .../modules/ROOT/pages/manual/thread-context.adoc | 16 +- ...og4j-jakarta-web.adoc => plugin-reference.adoc} | 14 +- .../{log4j-jakarta-web.adoc => release-notes.adoc} | 14 +- 23 files changed, 321 insertions(+), 329 deletions(-) diff --git a/src/site/antora/antora.tmpl.yml b/src/site/antora/antora.tmpl.yml index 9812a2fdda..c9a141391c 100644 --- a/src/site/antora/antora.tmpl.yml +++ b/src/site/antora/antora.tmpl.yml @@ -32,7 +32,7 @@ # 2. Edit `antora.yml` to match the `antora.tmpl.yml` and fill Maven-injected attributes with dummy values # -name: home +name: ROOT title: Home version: ~ start_page: index.adoc @@ -46,3 +46,4 @@ asciidoc: java-compiler-version: "${minimalJavaBuildVersion}" nav: - modules/ROOT/nav.adoc + - modules/manual/nav.adoc diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index 5ed9788c2f..392a736f35 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -15,36 +15,63 @@ limitations under the License. //// -* Learn -** xref:manual/index.adoc[Manual] -** link:../../plugin-reference.html[Plugins reference] -** xref:javadoc.adoc[Java API reference] -** xref:articles.adoc[Articles] -** xref:faq.adoc[F.A.Q.] * Get ** xref:download.adoc[Download] ** xref:runtime-dependencies.adoc[] +** xref:release-notes.adoc[] * xref:support.adoc[] ** xref:security.adoc[] ** xref:thanks.adoc[Thanks] -* Components -** Internal components -*** xref:log4j-api.adoc[] -*** xref:log4j-1.2-api.adoc[] -*** xref:log4j-slf4j-impl.adoc[] -*** xref:log4j-jul.adoc[] -*** xref:log4j-jpl.adoc[] -*** xref:log4j-to-slf4j.adoc[] -*** xref:log4j-flume-ng.adoc[] -*** xref:log4j-mongodb4.adoc[] -*** xref:log4j-iostreams.adoc[] -*** xref:log4j-docker.adoc[] -*** xref:log4j-kubernetes.adoc[] -*** xref:log4j-spring-cloud-config-client.adoc[] -** External components -*** link:/log4j/jakarta[Log4j Jakarta EE] -*** link:/log4j/jmx-gui[Log4j JMX GUI] -*** link:/log4j/kotlin[Log4j Kotlin] -*** link:/log4j/scala[Log4j Scala] -*** link:/log4j/tools[Log4j Tools] -*** link:/log4j/transform[Log4j Transformation Tools] + +.Learn +* xref:plugin-reference.adoc[Plugin reference] +* xref:javadoc.adoc[Java API reference] +* xref:articles.adoc[Articles] +* xref:faq.adoc[F.A.Q.] +* Manual +** xref:manual/architecture.adoc[] +** xref:manual/migration.adoc[] +** xref:manual/api.adoc[] +** xref:manual/logbuilder.adoc[] +** xref:manual/flowtracing.adoc[] +** xref:manual/markers.adoc[] +** xref:manual/eventlogging.adoc[] +** xref:manual/messages.adoc[] +** xref:manual/thread-context.adoc[] +** xref:manual/configuration.adoc[] +** xref:manual/usage.adoc[] +** xref:manual/cloud.adoc[] +** xref:manual/lookups.adoc[] +** xref:manual/appenders.adoc[] +** xref:manual/layouts.adoc[] +** xref:manual/filters.adoc[] +** xref:manual/async.adoc[] +** xref:manual/garbagefree.adoc[] +** xref:manual/extending.adoc[] +** xref:manual/plugins.adoc[] +** xref:manual/customconfig.adoc[] +** xref:manual/customloglevels.adoc[] +** xref:manual/jmx.adoc[] +** xref:manual/logsep.adoc[] + +.Components +* Internal components +** xref:log4j-api.adoc[] +** xref:log4j-1.2-api.adoc[] +** xref:log4j-slf4j-impl.adoc[] +** xref:log4j-jul.adoc[] +** xref:log4j-jpl.adoc[] +** xref:log4j-to-slf4j.adoc[] +** xref:log4j-flume-ng.adoc[] +** xref:log4j-mongodb4.adoc[] +** xref:log4j-iostreams.adoc[] +** xref:log4j-docker.adoc[] +** xref:log4j-kubernetes.adoc[] +** xref:log4j-spring-cloud-config-client.adoc[] +* External components +** link:/log4j/jakarta[Log4j Jakarta EE] +** link:/log4j/jmx-gui[Log4j JMX GUI] +** link:/log4j/kotlin[Log4j Kotlin] +** link:/log4j/scala[Log4j Scala] +** link:/log4j/tools[Log4j Tools] +** link:/log4j/transform[Log4j Transformation Tools] diff --git a/src/site/antora/modules/ROOT/pages/_log4j1-eol.adoc b/src/site/antora/modules/ROOT/pages/_log4j1-eol.adoc index 7c72ed846d..b15526c6fe 100644 --- a/src/site/antora/modules/ROOT/pages/_log4j1-eol.adoc +++ b/src/site/antora/modules/ROOT/pages/_log4j1-eol.adoc @@ -19,5 +19,5 @@ ==== http://logging.apache.org/log4j/1.x[Log4j 1] has https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces[reached End of Life] in 2015, and is no longer supported. Vulnerabilities reported after August 2015 against Log4j 1 are not checked and will not be fixed. -Users should xref:manual/migration.html[upgrade to Log4j 2] to obtain security fixes. +Users should xref:manual/migration.adoc[upgrade to Log4j 2] to obtain security fixes. ==== diff --git a/src/site/antora/modules/ROOT/pages/articles.adoc b/src/site/antora/modules/ROOT/pages/articles.adoc index 8e7b465595..d9c13b7cb0 100644 --- a/src/site/antora/modules/ROOT/pages/articles.adoc +++ b/src/site/antora/modules/ROOT/pages/articles.adoc @@ -19,7 +19,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more = Articles and Tutorials A collection of external articles and tutorials about Log4j 2. -The link:manual/index.html[Log4j 2 manual] is the ultimate guide for up-to-date and detailed information on how to configure and use Log4j 2. +The xref:manual/index.adoc[Log4j 2 manual] is the ultimate guide for up-to-date and detailed information on how to configure and use Log4j 2. == Chinese diff --git a/src/site/antora/modules/ROOT/pages/faq.adoc b/src/site/antora/modules/ROOT/pages/faq.adoc index 30ae86fa11..d914491aee 100644 --- a/src/site/antora/modules/ROOT/pages/faq.adoc +++ b/src/site/antora/modules/ROOT/pages/faq.adoc @@ -186,7 +186,7 @@ See http://logging.apache.org/log4j/2.x/manual/webapp.html#ContextParams[this se $h4 How do I configure log4j2 in code without a configuration file? -Starting with version 2.4, Log4j 2 provides an link:manual/customconfig.html[API for programmatic configuration] The new link:log4j-core/apidocs/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.html[`ConfigurationBuilder` API] allows you to create Configurations in code by constructing component definitions without requiring you to know about the internals of actual configuration objects like Loggers and Appenders. +Starting with version 2.4, Log4j 2 provides an xref:manual/customconfig.adoc[API for programmatic configuration] The new link:log4j-core/apidocs/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.html[`ConfigurationBuilder` API] allows you to create Configurations in code by constructing component definitions without requiring you to know about the internals of actual configuration objects like Loggers and Appenders. +++<a name="reconfig_from_code">++++++</a>+++ @@ -262,7 +262,7 @@ You need at least log4j-api and log4j-core. Next, check the name of your configuration file. By default, log4j2 will look for a configuration file named `log4j2.xml` on the classpath. Note the "2" in the file name! -(See the link:manual/configuration.html#AutomaticConfiguration[configuration manual page] for more details.) +(See the xref:manual/configuration.html#AutomaticConfiguration[configuration manual page] for more details.) *From log4j-2.9 onward* @@ -360,10 +360,10 @@ Configurator.setRootLevel(Level.DEBUG); $h4 How do I set my log archive retention policy? How do I delete old log archives? -The `DefaultRolloverStrategy` of the Rolling File appender (and Rolling Random Access File appender) supports a link:manual/appenders.html#CustomDeleteOnRollover[Delete] element. +The `DefaultRolloverStrategy` of the Rolling File appender (and Rolling Random Access File appender) supports a xref:manual/appenders.adoc#CustomDeleteOnRollover[Delete] element. Starting at a specified base directory, you can delete all files for which some condition holds true, for example all files that match a given file name pattern and are older than some number of days. -More complex conditions are possible, and if the built-in conditions are not sufficient, users can provide custom conditions by creating link:manual/appenders.html#DeletePathCondition[plugin conditions] or by writing a link:manual/appenders.html#ScriptCondition[script condition]. +More complex conditions are possible, and if the built-in conditions are not sufficient, users can provide custom conditions by creating xref:manual/appenders.adoc#DeletePathCondition[plugin conditions] or by writing a xref:manual/appenders.adoc#ScriptCondition[script condition]. +++<a name="api-tradeoffs">++++++</a>+++ @@ -382,11 +382,11 @@ There are several advantages to using the Log4j 2 API: * SLF4J forces your application to log Strings. The Log4j 2 API supports logging any CharSequence if you want to log text, but also supports logging any Object as is. It is the responsibility of the logging _implementation_ to handle this object, and we consider it a design mistake to limit applications to logging Strings. -* The Log4j 2 API offers support for logging link:manual/messages.html[Message objects]. +* The Log4j 2 API offers support for logging xref:manual/messages.adoc[Message objects]. Messages allow support for interesting and complex constructs to be passed through the logging system and be efficiently manipulated. Users are free to create their own Message types and write custom Layouts, Filters and Lookups to manipulate them. -* The Log4j 2 API has support for Java 8 link:manual/api.html#LambdaSupport[lambda expressions]. -* The Log4j 2 API has better support for link:manual/garbagefree.html[garbage-free logging]: it avoids creating vararg arrays and avoids creating Strings when logging CharSequence objects. +* The Log4j 2 API has support for Java 8 xref:manual/api.adoc#LambdaSupport[lambda expressions]. +* The Log4j 2 API has better support for xref:manual/garbagefree.adoc[garbage-free logging]: it avoids creating vararg arrays and avoids creating Strings when logging CharSequence objects. +++<a name="gc-free-slf4j">++++++</a>+++ diff --git a/src/site/antora/modules/ROOT/pages/index.adoc b/src/site/antora/modules/ROOT/pages/index.adoc index 9d7b7cbc83..f3bc834798 100644 --- a/src/site/antora/modules/ROOT/pages/index.adoc +++ b/src/site/antora/modules/ROOT/pages/index.adoc @@ -19,15 +19,15 @@ Apache Log4j is a versatile, industrial-grade Java logging framework composed of an API, its implementation, and components to assist the deployment for various use cases. Log4j is https://security.googleblog.com/2021/12/apache-log4j-vulnerability.html[used by 8% of the Maven ecosystem] and listed as one of https://docs.google.com/spreadsheets/d/1ONZ4qeMq8xmeCHX03lIgIYE4MEXVfVL6oj05lbuXTDM/edit#gid=1024997528[the top 100 critical open source software projects]. -The project is actively maintained by a link:team.html[team] of several volunteers and xref:support.adoc[support]ed by a big community. +The project is actively maintained by a link:/team-list.html[team] of several volunteers and xref:support.adoc[support]ed by a big community. [#links] == Quick links - link:maven-artifacts.html[How can I add Log4j artifacts to my Maven/Ivy/Gradle project?] -- link:manual/usage.html?[How can I use the Log4j API?] -- link:manual/configuration.html[How can I configure my `log4j2.xml`?] -- link:release-notes.html[Where are the release notes?] -- link:support.html[**I need help!**] +- xref:manual/usage.adoc[How can I use the Log4j API?] +- xref:manual/configuration.adoc[How can I configure my `log4j2.xml`?] +- xref:release-notes.adoc[Where are the release notes?] +- xref:support.adoc[**I need help!**] [#features] == Features @@ -36,17 +36,16 @@ We share below some highlights from Log4j features. Batteries included:: Log4j bundles a rich set of components to assist various use cases. -* link:manual/appenders.html[Appenders] targeting files, network sockets, databases, SMTP servers, etc. -* link:manual/layouts.html[Layouts] that can render CSV, HTML, JSON, Syslog, etc. formatted outputs -* link:manual/filters.html[Filters] that can be configured using log event rates, regular expressions, scripts, time, etc. -* link:manual/lookups.html[Lookups] for accessing system properties, environment variables, log event fields, etc. - +* xref:manual/appenders.adoc[Appenders] targeting files, network sockets, databases, SMTP servers, etc. +* xref:manual/layouts.adoc[Layouts] that can render CSV, HTML, JSON, Syslog, etc. formatted outputs +* xref:manual/filters.adoc[Filters] that can be configured using log event rates, regular expressions, scripts, time, etc. +* xref:manual/lookups.adoc[Lookups] for accessing system properties, environment variables, log event fields, etc. API separation:: The API for Log4j (i.e., `log4j-api`) is separate from the implementation (i.e., `log4j-core`) making it clear for application developers which classes and methods they can use while ensuring forward compatibility. -(See link:manual/api-separation.html[API Separation] for details.) +(See xref:manual/api-separation.adoc[API Separation] for details.) The Log4j API also provides the most feature rich logging facade in the market; support for various `Message` types (`Object`, `Map`, etc.) besides plain `String`, lambda expressions, parametrized logging, markers, levels, diagnostic contexts (aka. MDC/NDC), etc. -Check out the link:manual/api.html[Java API], link:/log4j/kotlin[Kotlin API], and link:/log4j/scala[Scala API] pages for further information. +Check out the xref:manual/api.adoc[Java API], link:/log4j/kotlin[Kotlin API], and link:/log4j/scala[Scala API] pages for further information. No vendor lock-in:: Even though the Log4j API is implemented by the Log4j at its fullest, users can choose to use another logging backend. @@ -55,9 +54,9 @@ This can be achieved by either using another backend implementing the Log4j API, Performance:: When configured correctly, Log4j can deliver excelling performance without almost any burden on the Java garbage collector. This is made possible via an asynchronous logger founded on the https://lmax-exchange.github.io/disruptor/[LMAX Disruptor] technology (having its roots in the demanding industry of financial trading) and the garbage-free features baked at hot paths. -Check out the link:performance.html[Performance] page for details. +Check out the xref:manual/performance.adoc[Performance] page for details. Extensibility:: -Log4j contains a fully-fledged xref:manual/plugins.html[plugin support] that users can leverage to extend its functionality. -You can easily add your own components (layouts, appenders, filters, etc.) or customizing existing ones (e.g., adding new directives to the link:manual/layouts.html#PatternLayout[Pattern] or xref:manual/json-template-layout.adoc#extending[JSON Template Layout]). -Check out the link:manual/extending.html[Extending Log4j] page. +Log4j contains a fully-fledged xref:manual/plugins.adoc[plugin support] that users can leverage to extend its functionality. +You can easily add your own components (layouts, appenders, filters, etc.) or customizing existing ones (e.g., adding new directives to the xref:manual/layouts.adoc#PatternLayout[Pattern] or xref:manual/json-template-layout.adoc#extending[JSON Template Layout]). +Check out the xref:manual/extending.adoc[Extending Log4j] page. diff --git a/src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc b/src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc index 4d017bbca1..1cece57d2e 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc @@ -22,7 +22,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more The Web module provides support for automatically enabling Log4j in Servlet containers. -See the user manual page on link:manual/webapp.html[Web Applications and JSPs] for details on using Log4j 2 in Web Applications. +See the user manual page on xref:manual/webapp.adoc[Web Applications and JSPs] for details on using Log4j 2 in Web Applications. == Requirements diff --git a/src/site/antora/modules/ROOT/pages/log4j-jul.adoc b/src/site/antora/modules/ROOT/pages/log4j-jul.adoc index 551c4283aa..914195f710 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-jul.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-jul.adoc @@ -38,10 +38,10 @@ This must be done either through the command line (i.e., using the `-Djava.util. == Compatibility The use of a http://docs.oracle.com/javase/6/docs/api/java/util/logging/Filter.html[`java.util.logging.Filter`] is supported on a per-http://docs.oracle.com/javase/6/docs/api/java/util/logging/Logger.html[`Logger`] basis. -However, it is recommended to use the standard link:manual/filters.html[Filters] feature in Log4j instead. +However, it is recommended to use the standard xref:manual/filters.adoc[Filters] feature in Log4j instead. The use of http://docs.oracle.com/javase/6/docs/api/java/util/logging/Handler.html[`java.util.logging.Handler`] classes is _NOT_ supported. -Custom Handlers should instead use an appropriate link:manual/appenders.html[Appender] or code their own link:javadoc/log4j-core/org/apache/logging/log4j/core/Appender.html[`Appender`] plugin. +Custom Handlers should instead use an appropriate xref:manual/appenders.adoc[Appender] or code their own link:javadoc/log4j-core/org/apache/logging/log4j/core/Appender.adoc[`Appender`] plugin. Java logging levels are translated into Log4j logging levels dynamically. The following table lists the conversions between a Java logging level and its equivalent Log4j level. diff --git a/src/site/antora/modules/ROOT/pages/log4j-spring-boot.adoc b/src/site/antora/modules/ROOT/pages/log4j-spring-boot.adoc index 74b329aa94..d12694ab3f 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-spring-boot.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-spring-boot.adoc @@ -41,7 +41,7 @@ would set the Log4j applicationName property to the value of spring.application. === Spring Property Source Log4j uses property sources when resolving properties it uses internally. -This support allows most of Log4j's link:manual/configuration.html#SystemProperties[System Properties] to be specified in the Spring Configuration. +This support allows most of Log4j's xref:manual/configuration.adoc#SystemProperties[System Properties] to be specified in the Spring Configuration. However, some properties that are only referenced during the first Log4j initialization, such as the property Log4j uses to allow the default Log4j implementation to be chosen, would not be available. === Spring Profile Arbiter diff --git a/src/site/antora/modules/ROOT/pages/log4j-web.adoc b/src/site/antora/modules/ROOT/pages/log4j-web.adoc index 043cf03b9f..2ee37925eb 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-web.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-web.adoc @@ -22,7 +22,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more The Web module provides support for automatically enabling Log4j in Servlet containers. -See the user manual page on link:manual/webapp.html[Web Applications and JSPs] for details on using Log4j 2 in Web Applications. +See the user manual page on xref:manual/webapp.adoc[Web Applications and JSPs] for details on using Log4j 2 in Web Applications. == Requirements diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc index d668c2c692..f851bfd2de 100644 --- a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc @@ -858,7 +858,7 @@ As of Log4j 2.11.0, JDBC support has moved from the existing module The JDBC Appender configured with a `DataSource` requires JNDI support so as of release 2.17.1 this appender will not function unless `log4j2.enableJndiJdbc=true` is configured as a system property -or environment variable. See the xref:/configuration.html#enableJndiJdbc[enableJndiJdbc] system property. +or environment variable. See the xref:manual/manual/manual//configuration.html#enableJndiJdbc[enableJndiJdbc] system property. The JDBCAppender writes log events to a relational database table using standard JDBC. It can be configured to obtain JDBC connections using a diff --git a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc index a469e85620..a8bd2b1bf6 100644 --- a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc @@ -1307,7 +1307,7 @@ The bundle name follows package naming conventions, for example: |Inserts the current date and/or time using the specified format |docker -| Returns attributes from the Docker container the application is running in. The format is ${docker:some.attribute}. See xref:/log4j-docker.html[Docker documentation] for requirements and a list of available attributes. +| Returns attributes from the Docker container the application is running in. The format is ${docker:some.attribute}. See xref:manual/manual/manual//log4j-docker.html[Docker documentation] for requirements and a list of available attributes. |env |System environment variables. The formats are `${env:ENV_NAME}` and `${env:ENV_NAME:-default_value}`. @@ -1943,10 +1943,10 @@ The following is a list of available global configuration properties. Note that | Creates the `LoggerContext`s. An application can have one or more active LoggerContexts depending on the circumstances. - See xref:/logsep.html[Log Separation] for more details. + See xref:manual/manual/manual//logsep.html[Log Separation] for more details. Available context selector implementation classes:<br> - `org.apache.logging.log4j.core.async .AsyncLoggerContextSelector` - makes xref:/async.html[all loggers asynchronous].<br> - `org.apache.logging.log4j.core.async .BasicAsyncLoggerContextSelector` - makes xref:/async.html[all loggers asynchronous] using a single shared AsyncLoggerContext.<br> + `org.apache.logging.log4j.core.async .AsyncLoggerContextSelector` - makes xref:manual/manual/manual//async.html[all loggers asynchronous].<br> + `org.apache.logging.log4j.core.async .BasicAsyncLoggerContextSelector` - makes xref:manual/manual/manual//async.html[all loggers asynchronous] using a single shared AsyncLoggerContext.<br> `org.apache.logging.log4j.core.selector .BasicContextSelector` - creates a single shared LoggerContext.<br> `org.apache.logging.log4j.core.selector .ClassLoaderContextSelector` - separate LoggerContexts for each web application.<br> `org.apache.logging.log4j.core.selector .JndiContextSelector` - use JNDI to locate each web application's LoggerContext.<br> @@ -2030,7 +2030,7 @@ The following is a list of available global configuration properties. Note that | org.apache.logging.log4j.core.util .DefaultShutdownCallbackRegistry | Fully specified class name of a class implementing - xref:/../log4j-core/apidocs/org/apache/logging/log4j/core/util/ShutdownCallbackRegistry.html" class="javadoc[ShutdownCallbackRegistry]. + xref:manual/manual/manual//../log4j-core/apidocs/org/apache/logging/log4j/core/util/ShutdownCallbackRegistry.html" class="javadoc[ShutdownCallbackRegistry]. If specified, an instance of this class is used instead of `DefaultShutdownCallbackRegistry`. The specified class must have a default constructor. @@ -2264,71 +2264,71 @@ The following is a list of available global configuration properties. Note that ([[AsyncLogger.ExceptionHandler]]AsyncLogger.ExceptionHandler) | LOG4J_ASYNC_LOGGER_EXCEPTION_HANDLER | default handler -| See xref:/async.html#SysPropsAllAsync[Async Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsAllAsync[Async Logger System Properties] for details. | [[asyncLoggerRingBufferSize]]log4j2.asyncLoggerRingBufferSize ([[AsyncLogger.RingBufferSize]]AsyncLogger.RingBufferSize) | LOG4J_ASYNC_LOGGER_RING_BUFFER_SIZE | 256*1024 or 4*1024 in garbage-free mode -| See xref:/async.html#SysPropsAllAsync[Async Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsAllAsync[Async Logger System Properties] for details. | [[asyncLoggerWaitStrategy]]log4j2.asyncLoggerWaitStrategy ([[AsyncLogger.WaitStrategy]]AsyncLogger.WaitStrategy) | LOG4J_ASYNC_LOGGER_WAIT_STRATEGY | Timeout -| See xref:/async.html#SysPropsAllAsync[Async Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsAllAsync[Async Logger System Properties] for details. | [[asyncLoggerTimeout]]log4j2.asyncLoggerTimeout ([[AsyncLogger.Timeout]]AsyncLogger.Timeout) | LOG4J_ASYNC_LOGGER_TIMEOUT | 10 -| See xref:/async.html#SysPropsAllAsync[Async Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsAllAsync[Async Logger System Properties] for details. | [[asyncLoggerSleepTimeNs]]log4j2.asyncLoggerSleepTimeNs ([[AsyncLogger.SleepTimeNs]]AsyncLogger.SleepTimeNs) | LOG4J_ASYNC_LOGGER_SLEEP_TIME_NS | 100 -| See xref:/async.html#SysPropsAllAsync[Async Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsAllAsync[Async Logger System Properties] for details. | [[asyncLoggerRetries]]log4j2.asyncLoggerRetries ([[AsyncLogger.Retries]]AsyncLogger.Retries) | LOG4J_ASYNC_LOGGER_SLEEP_TIME_NS | 200 -| See xref:/async.html#SysPropsAllAsync[Async Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsAllAsync[Async Logger System Properties] for details. | [[AsyncLogger.SynchronizeEnqueueWhenQueueFull]]AsyncLogger.SynchronizeEnqueueWhenQueueFull | ASYNC_LOGGER_SYNCHRONIZE_ENQUEUE_WHEN_QUEUE_FULL | true -| See xref:/async.html#SysPropsAllAsync[Async Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsAllAsync[Async Logger System Properties] for details. | [[asyncLoggerThreadNameStrategy]]log4j2.asyncLoggerThreadNameStrategy ([[AsyncLogger.ThreadNameStrategy]]AsyncLogger.ThreadNameStrategy) | LOG4J_ASYNC_LOGGER_THREAD_NAME_STRATEGY | CACHED -| See xref:/async.html#SysPropsAllAsync[Async Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsAllAsync[Async Logger System Properties] for details. | [[asyncLoggerConfigExceptionHandler]]log4j2.asyncLoggerConfigExceptionHandler ([[AsyncLoggerConfig.ExceptionHandler]]AsyncLoggerConfig.ExceptionHandler) | LOG4J_ASYNC_LOGGER_CONFIG_EXCEPTION_HANDLER | default handler -| See xref:/async.html#SysPropsMixedSync-Async[Mixed Async/Synchronous Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsMixedSync-Async[Mixed Async/Synchronous Logger System Properties] for details. | [[asyncLoggerConfigRingBufferSize]]log4j2.asyncLoggerConfigRingBufferSize ([[AsyncLoggerConfig.RingBufferSize]]AsyncLoggerConfig.RingBufferSize) | LOG4J_ASYNC_LOGGER_CONFIG_RING_BUFFER_SIZE | 256*1024 or 4*1024 in garbage-free mode -| See xref:/async.html#SysPropsMixedSync-Async[Mixed Async/Synchronous Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsMixedSync-Async[Mixed Async/Synchronous Logger System Properties] for details. | [[asyncLoggerConfigWaitStrategy]]log4j2.asyncLoggerConfigWaitStrategy ([[AsyncLoggerConfig.WaitStrategy]]AsyncLoggerConfig.WaitStrategy) | LOG4J_ASYNC_LOGGER_CONFIG_WAIT_STRATEGY | Timeout -| See xref:/async.html#SysPropsMixedSync-Async[Mixed Async/Synchronous Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsMixedSync-Async[Mixed Async/Synchronous Logger System Properties] for details. | [[AsyncLoggerConfig.SynchronizeEnqueueWhenQueueFull]]AsyncLoggerConfig.SynchronizeEnqueueWhenQueueFull | ASYNC_LOGGER_CONFIG_SYNCHRONIZE_ENQUEUE_WHEN_QUEUE_FULL | true -| See xref:/async.html#SysPropsMixedSync-Async[Mixed Async/Synchronous Logger System Properties] for details. +| See xref:manual/manual/manual//async.html#SysPropsMixedSync-Async[Mixed Async/Synchronous Logger System Properties] for details. | [[julLoggerAdapter]]log4j2.julLoggerAdapter ([[log4j.jul.LoggerAdapter]]log4j.jul.LoggerAdapter) @@ -2446,7 +2446,7 @@ or as if it is not part of a web application (when false). ([[log4j.LoggerContext.stacktrace.on.start]]log4j.LoggerContext.stacktrace.on.start) | LOG4J_LOGGER_CONTEXT_STACKTRACE_ON_START | false -| Prints a stacktrace to the xref:/#StatusMessages[status logger] at DEBUG level when the LoggerContext is started. For debug purposes. +| Prints a stacktrace to the xref:manual/manual/manual//#StatusMessages[status logger] at DEBUG level when the LoggerContext is started. For debug purposes. | [[log4j2.trustStoreLocation]]log4j2.trustStoreLocation | LOG4J_TRUST_STORE_LOCATION diff --git a/src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc b/src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc index d45fe7158b..a5ee57a588 100644 --- a/src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc @@ -14,11 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. //// -= Log4j 2 API -Ralph Goers <[email protected]> - -[#EventLogging] -== Event Logging += Event Logging The `EventLogger` class provides a simple mechanism for logging events that occur in an application. While the `EventLogger` is useful as a way diff --git a/src/site/antora/modules/ROOT/pages/manual/flowtracing.adoc b/src/site/antora/modules/ROOT/pages/manual/flowtracing.adoc index c4026612c0..1ba1875feb 100644 --- a/src/site/antora/modules/ROOT/pages/manual/flowtracing.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/flowtracing.adoc @@ -14,11 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. //// -= Log4j 2 API -Ralph Goers <[email protected]> - -[#FlowTracing] -== Flow Tracing += Flow Tracing The `Logger` class provides logging methods that are quite useful for following the execution path of applications. These methods generate diff --git a/src/site/antora/modules/ROOT/pages/manual/index.adoc b/src/site/antora/modules/ROOT/pages/manual/index.adoc index 46ee1dfb4d..51a36048f0 100644 --- a/src/site/antora/modules/ROOT/pages/manual/index.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/index.adoc @@ -14,196 +14,196 @@ See the License for the specific language governing permissions and limitations under the License. //// -= Documentation += Manual -* xref:manual/architecture.adoc[Architecture] -* xref:manual/migration.adoc[Log4j 1.x Migration] +* xref:manual/manual/manual/architecture.adoc[Architecture] +* xref:manual/manual/manual/migration.adoc[Log4j 1.x Migration] == Java API -* xref:manual/api.adoc[Java API] -* xref:manual/logbuilder.adoc[Log Builder] -* xref:manual/flowtracing.adoc[Flow Tracing] -* xref:manual/markers.adoc[Markers] -* xref:manual/eventlogging.adoc[Event Logging] -* xref:manual/messages.adoc[Messages] -* xref:manual/thread-context.adoc[ThreadContext] - -== xref:manual/configuration.adoc[Configuration] - -* xref:manual/configuration.adoc#Architecture[Configuration Architecture] -* xref:manual/configuration.adoc#Arbiters[Arbiters] -* xref:manual/configuration.adoc#AutomaticConfiguration[Automatic Configuration] -* xref:manual/configuration.adoc#Additivity[Additivity] -* xref:manual/configuration.adoc#AutomaticReconfiguration[Automatic Reconfiguration] -* xref:manual/configuration.adoc#ChainsawSupport[Chainsaw Support] -* xref:manual/configuration.adoc#ConfigurationSyntax[Configuration Syntax] -* xref:manual/configuration.adoc#XML[XML Syntax] -* xref:manual/configuration.adoc#JSON[JSON Syntax] -* xref:manual/configuration.adoc#YAML[YAML Syntax] -* xref:manual/configuration.adoc#Properties[Properties Syntax] -* xref:manual/configuration.adoc#Loggers[Configuring Loggers] -* xref:manual/configuration.adoc#Appenders[Configuring Appenders] -* xref:manual/configuration.adoc#Filters[Configuring Filters] -* xref:manual/configuration.adoc#PropertySubstitution[Property Substitution] -* xref:manual/configuration.adoc#RuntimeLookup[Lookup Variables] -* xref:manual/configuration.adoc#Scripts[Scripts] -* xref:manual/configuration.adoc#XInclude[XInclude] -* xref:manual/configuration.adoc#CompositeConfiguration[Composite Configurations] -* xref:manual/configuration.adoc#StatusMessages[Status Messages] -* xref:manual/configuration.adoc#UnitTestingInMaven[Unit Testing] - -== xref:manual/usage.adoc[Usage] - -* xref:manual/usage.adoc#static-vs-non-static[Static vs non-Static Loggers] -* xref:manual/usage.adoc#logger-name-vs-class-name[Logger Name vs Class Name] -* xref:manual/cloud.adoc[Logging in the Cloud] - -== xref:manual/performance.adoc[Performance] - -* xref:manual/performance.adoc#benchmarks[Benchmarks] -* xref:manual/performance.adoc#loglibComparison[Logging Library Comparison] -* xref:manual/performance.adoc#asyncLogging[Async Logging Comparison] -* xref:manual/performance.adoc#asyncLoggingResponseTime[Async Logging Latency] -* xref:manual/performance.adoc#asyncLoggingWithParams[Parameters] -* xref:manual/performance.adoc#asyncLoggingWithLocation[Location] -* xref:manual/performance.adoc#fileLoggingComparison[File Logging Comparison] -* xref:manual/performance.adoc#filtering[Filtering Comparison] -* xref:manual/performance.adoc#tradeoffs[Trade-offs] - -== xref:manual/lookups.adoc[Lookups] - -* xref:manual/lookups.adoc#ContextMapLookup[Context Map] -* xref:manual/lookups.adoc#DateLookup[Date] -* xref:manual/lookups.adoc#DockerLookup[Docker] -* xref:manual/lookups.adoc#EnvironmentLookup[Environment] -* xref:manual/lookups.adoc#EventLookup[Event] -* xref:manual/lookups.adoc#JavaLookup[Java] -* xref:manual/lookups.adoc#JndiLookup[JNDI] -* xref:manual/lookups.adoc#JmxRuntimeInputArgumentsLookup[JVM Arguments] -* xref:manual/lookups.adoc#KubernetesLookup[Kubernetes] -* xref:manual/lookups.adoc#Log4jConfigLookup[Log4j Config] -* xref:manual/lookups.adoc#LowerLookup[Lower] -* xref:manual/lookups.adoc#AppMainArgsLookup[Main Arguments] -* xref:manual/lookups.adoc#MapLookup[Map] -* xref:manual/lookups.adoc#StructuredDataLookup[Structured Data] -* xref:manual/lookups.adoc#SystemPropertiesLookup[System Properties] -* xref:manual/lookups.adoc#UpperLookup[Upper] - -== xref:manual/appenders.adoc[Appenders] - -* xref:manual/appenders.adoc#AsyncAppender[Async] -* xref:manual/appenders.adoc#ConsoleAppender[Console] -* xref:manual/appenders.adoc#FailoverAppender[Failover] -* xref:manual/appenders.adoc#FileAppender[File] -* xref:manual/appenders.adoc#FlumeAppender[Flume] -* xref:manual/appenders.adoc#JDBCAppender[JDBC] -* xref:manual/appenders.adoc#HttpAppender[HTTP] -* xref:manual/appenders.adoc#MemoryMappedFileAppender[Memory Mapped File] -* xref:manual/appenders.adoc#NoSQLAppender[NoSQL] -* xref:manual/appenders.adoc#NoSQLAppenderMongoDB[NoSQL for MongoDB] -* xref:manual/appenders.adoc#OutputStreamAppender[Output Stream] -* xref:manual/appenders.adoc#RandomAccessFileAppender[Random Access File] -* xref:manual/appenders.adoc#RewriteAppender[Rewrite] -* xref:manual/appenders.adoc#RollingFileAppender[Rolling File] -* xref:manual/appenders.adoc#RollingRandomAccessFileAppender[Rolling Random Access File] -* xref:manual/appenders.adoc#RoutingAppender[Routing] -* xref:manual/appenders.adoc#ScriptAppenderSelector[ScriptAppenderSelector] -* xref:manual/appenders.adoc#SocketAppender[Socket] -* xref:manual/appenders.adoc#SSL[SSL] -* xref:manual/appenders.adoc#SyslogAppender[Syslog] - -== xref:manual/layouts.adoc[Layouts] - -* xref:manual/layouts.adoc#CSVLayouts[CSV] -* xref:manual/layouts.adoc#HTMLLayout[HTML] -* xref:manual/json-template-layout.adoc[JSON Template] -* xref:manual/layouts.adoc#PatternLayout[Pattern] -* xref:manual/layouts.adoc#RFC5424Layout[RFC-5424] -* xref:manual/layouts.adoc#SerializedLayout[Serialized] -* xref:manual/layouts.adoc#SyslogLayout[Syslog] -* xref:manual/layouts.adoc#LocationInformation[Location Information] - -== xref:manual/filters.adoc[Filters] - -* xref:manual/filters.adoc#BurstFilter[Burst] -* xref:manual/filters.adoc#CompositeFilter[Composite Filter] -* xref:manual/filters.adoc#DynamicThresholdFilter[Dynamic Threshold] -* xref:manual/filters.adoc#MapFilter[Map] -* xref:manual/filters.adoc#MarkerFilter[Marker] -* xref:manual/filters.adoc#MutableThreadContextMapFilter[Mutable Thread Context Map] -* xref:manual/filters.adoc#RegexFilter[Regex] -* xref:manual/filters.adoc#Script[Script] -* xref:manual/filters.adoc#StructuredDataFilter[Structured Data] -* xref:manual/filters.adoc#ThreadContextMapFilter[Thread Context Map] -* xref:manual/filters.adoc#ThresholdFilter[Threshold] -* xref:manual/filters.adoc#TimeFilter[Time] - -== xref:manual/async.adoc[Async Loggers] - -* xref:manual/async.adoc#Trade-offs[Trade-offs] -* xref:manual/async.adoc#AllAsync[All Loggers Async] -* xref:manual/async.adoc#MixedSync-Async[Mixed Sync & Async] -* xref:manual/async.adoc#WaitStrategy[WaitStrategy] -* xref:manual/async.adoc#Location[Location] -* xref:manual/async.adoc#Performance[Performance] -* xref:manual/async.adoc#UnderTheHood[Under The Hood] - -== xref:manual/garbagefree.adoc[Garbage-free Logging] - -* xref:manual/garbagefree.adoc#Config[Configuration] -* xref:manual/garbagefree.adoc#Appenders[Supported Appenders] -* xref:manual/garbagefree.adoc#Layouts[Supported Layouts] -* xref:manual/garbagefree.adoc#Filters[Supported Filters] -* xref:manual/garbagefree.adoc#api[API Changes] -* xref:manual/garbagefree.adoc#codeImpact[Impact on Application Code] -* xref:manual/garbagefree.adoc#UnderTheHood[Under the Hood] - -== xref:manual/extending.adoc[Extending Log4j] - -* xref:manual/extending.adoc#LoggerContextFactory[`LoggerContextFactory`] -* xref:manual/extending.adoc#ContextSelector[`ContextSelector`] -* xref:manual/extending.adoc#ConfigurationFactory[`ConfigurationFactory`] -* xref:manual/extending.adoc#LoggerConfig[`LoggerConfig`] -* xref:manual/extending.adoc#LogEventFactory[`LogEventFactory`] -* xref:manual/extending.adoc#MessageFactory[`MessageFactory`] -* xref:manual/extending.adoc#Lookups[Lookups] -* xref:manual/extending.adoc#Filters[Filters] -* xref:manual/extending.adoc#Appenders[Appenders] -* xref:manual/extending.adoc#Layouts[Layouts] -* xref:manual/extending.adoc#PatternConverters[Pattern converters] -* xref:manual/extending.adoc#Plugin_Builders[Plugin builders] -* xref:manual/extending.adoc#Custom_ContextDataProvider[Custom `ContextDataProvider`] -* xref:manual/extending.adoc#Custom_Plugins[Custom plugins] - -== xref:manual/plugins.adoc[Plugins] - -* xref:manual/plugins.adoc#core[Core] -* xref:manual/plugins.adoc#converters[Converters] -* xref:manual/plugins.adoc#key-providers[Key Providers] -* xref:manual/plugins.adoc#lookups[Lookups] -* xref:manual/plugins.adoc#type-converters[Type Converters] -* xref:manual/plugins.adoc#developer-notes[Developer Notes] - -== xref:manual/customconfig.adoc[Programmatic Log4j Configuration] - -* xref:manual/customconfig.adoc#ConfigurationBuilder[ConfigurationBuilder API] -* xref:manual/customconfig.adoc#ConfigurationFactory[Understanding ConfigurationFactory] -* xref:manual/customconfig.adoc#Example[Example] -* xref:manual/customconfig.adoc#Configurator[Using Configurator] -* xref:manual/customconfig.adoc#Hybrid[Config File and Code] -* xref:manual/customconfig.adoc#AddingToCurrent[After Initialization] -* xref:manual/customconfig.adoc#AppendingToWritersAndOutputStreams[Appending to Writers & OutputStreams] - -== xref:manual/customloglevels.adoc#DefiningLevelsInCode[In Code] - -* xref:manual/customloglevels.adoc#DefiningLevelsInConfiguration[In Configuration] -* xref:manual/customloglevels.adoc#AddingOrReplacingLevels[Adding or Replacing Levels] -* xref:manual/customloglevels.adoc#CustomLoggers[Custom Loggers] -* xref:manual/customloglevels.adoc#ExampleUsage[Custom Logger Example] -* xref:manual/customloglevels.adoc#CodeGen[Code Generation Tool] +* xref:manual/manual/manual/api.adoc[Java API] +* xref:manual/manual/manual/logbuilder.adoc[Log Builder] +* xref:manual/manual/manual/flowtracing.adoc[Flow Tracing] +* xref:manual/manual/manual/markers.adoc[Markers] +* xref:manual/manual/manual/eventlogging.adoc[Event Logging] +* xref:manual/manual/manual/messages.adoc[Messages] +* xref:manual/manual/manual/thread-context.adoc[ThreadContext] + +== xref:manual/manual/manual/configuration.adoc[Configuration] + +* xref:manual/manual/manual/configuration.adoc#Architecture[Configuration Architecture] +* xref:manual/manual/manual/configuration.adoc#Arbiters[Arbiters] +* xref:manual/manual/manual/configuration.adoc#AutomaticConfiguration[Automatic Configuration] +* xref:manual/manual/manual/configuration.adoc#Additivity[Additivity] +* xref:manual/manual/manual/configuration.adoc#AutomaticReconfiguration[Automatic Reconfiguration] +* xref:manual/manual/manual/configuration.adoc#ChainsawSupport[Chainsaw Support] +* xref:manual/manual/manual/configuration.adoc#ConfigurationSyntax[Configuration Syntax] +* xref:manual/manual/manual/configuration.adoc#XML[XML Syntax] +* xref:manual/manual/manual/configuration.adoc#JSON[JSON Syntax] +* xref:manual/manual/manual/configuration.adoc#YAML[YAML Syntax] +* xref:manual/manual/manual/configuration.adoc#Properties[Properties Syntax] +* xref:manual/manual/manual/configuration.adoc#Loggers[Configuring Loggers] +* xref:manual/manual/manual/configuration.adoc#Appenders[Configuring Appenders] +* xref:manual/manual/manual/configuration.adoc#Filters[Configuring Filters] +* xref:manual/manual/manual/configuration.adoc#PropertySubstitution[Property Substitution] +* xref:manual/manual/manual/configuration.adoc#RuntimeLookup[Lookup Variables] +* xref:manual/manual/manual/configuration.adoc#Scripts[Scripts] +* xref:manual/manual/manual/configuration.adoc#XInclude[XInclude] +* xref:manual/manual/manual/configuration.adoc#CompositeConfiguration[Composite Configurations] +* xref:manual/manual/manual/configuration.adoc#StatusMessages[Status Messages] +* xref:manual/manual/manual/configuration.adoc#UnitTestingInMaven[Unit Testing] + +== xref:manual/manual/manual/usage.adoc[Usage] + +* xref:manual/manual/manual/usage.adoc#static-vs-non-static[Static vs non-Static Loggers] +* xref:manual/manual/manual/usage.adoc#logger-name-vs-class-name[Logger Name vs Class Name] +* xref:manual/manual/manual/cloud.adoc[Logging in the Cloud] + +== xref:manual/manual/manual/performance.adoc[Performance] + +* xref:manual/manual/manual/performance.adoc#benchmarks[Benchmarks] +* xref:manual/manual/manual/performance.adoc#loglibComparison[Logging Library Comparison] +* xref:manual/manual/manual/performance.adoc#asyncLogging[Async Logging Comparison] +* xref:manual/manual/manual/performance.adoc#asyncLoggingResponseTime[Async Logging Latency] +* xref:manual/manual/manual/performance.adoc#asyncLoggingWithParams[Parameters] +* xref:manual/manual/manual/performance.adoc#asyncLoggingWithLocation[Location] +* xref:manual/manual/manual/performance.adoc#fileLoggingComparison[File Logging Comparison] +* xref:manual/manual/manual/performance.adoc#filtering[Filtering Comparison] +* xref:manual/manual/manual/performance.adoc#tradeoffs[Trade-offs] + +== xref:manual/manual/manual/lookups.adoc[Lookups] + +* xref:manual/manual/manual/lookups.adoc#ContextMapLookup[Context Map] +* xref:manual/manual/manual/lookups.adoc#DateLookup[Date] +* xref:manual/manual/manual/lookups.adoc#DockerLookup[Docker] +* xref:manual/manual/manual/lookups.adoc#EnvironmentLookup[Environment] +* xref:manual/manual/manual/lookups.adoc#EventLookup[Event] +* xref:manual/manual/manual/lookups.adoc#JavaLookup[Java] +* xref:manual/manual/manual/lookups.adoc#JndiLookup[JNDI] +* xref:manual/manual/manual/lookups.adoc#JmxRuntimeInputArgumentsLookup[JVM Arguments] +* xref:manual/manual/manual/lookups.adoc#KubernetesLookup[Kubernetes] +* xref:manual/manual/manual/lookups.adoc#Log4jConfigLookup[Log4j Config] +* xref:manual/manual/manual/lookups.adoc#LowerLookup[Lower] +* xref:manual/manual/manual/lookups.adoc#AppMainArgsLookup[Main Arguments] +* xref:manual/manual/manual/lookups.adoc#MapLookup[Map] +* xref:manual/manual/manual/lookups.adoc#StructuredDataLookup[Structured Data] +* xref:manual/manual/manual/lookups.adoc#SystemPropertiesLookup[System Properties] +* xref:manual/manual/manual/lookups.adoc#UpperLookup[Upper] + +== xref:manual/manual/manual/appenders.adoc[Appenders] + +* xref:manual/manual/manual/appenders.adoc#AsyncAppender[Async] +* xref:manual/manual/manual/appenders.adoc#ConsoleAppender[Console] +* xref:manual/manual/manual/appenders.adoc#FailoverAppender[Failover] +* xref:manual/manual/manual/appenders.adoc#FileAppender[File] +* xref:manual/manual/manual/appenders.adoc#FlumeAppender[Flume] +* xref:manual/manual/manual/appenders.adoc#JDBCAppender[JDBC] +* xref:manual/manual/manual/appenders.adoc#HttpAppender[HTTP] +* xref:manual/manual/manual/appenders.adoc#MemoryMappedFileAppender[Memory Mapped File] +* xref:manual/manual/manual/appenders.adoc#NoSQLAppender[NoSQL] +* xref:manual/manual/manual/appenders.adoc#NoSQLAppenderMongoDB[NoSQL for MongoDB] +* xref:manual/manual/manual/appenders.adoc#OutputStreamAppender[Output Stream] +* xref:manual/manual/manual/appenders.adoc#RandomAccessFileAppender[Random Access File] +* xref:manual/manual/manual/appenders.adoc#RewriteAppender[Rewrite] +* xref:manual/manual/manual/appenders.adoc#RollingFileAppender[Rolling File] +* xref:manual/manual/manual/appenders.adoc#RollingRandomAccessFileAppender[Rolling Random Access File] +* xref:manual/manual/manual/appenders.adoc#RoutingAppender[Routing] +* xref:manual/manual/manual/appenders.adoc#ScriptAppenderSelector[ScriptAppenderSelector] +* xref:manual/manual/manual/appenders.adoc#SocketAppender[Socket] +* xref:manual/manual/manual/appenders.adoc#SSL[SSL] +* xref:manual/manual/manual/appenders.adoc#SyslogAppender[Syslog] + +== xref:manual/manual/manual/layouts.adoc[Layouts] + +* xref:manual/manual/manual/layouts.adoc#CSVLayouts[CSV] +* xref:manual/manual/manual/layouts.adoc#HTMLLayout[HTML] +* xref:manual/manual/manual/json-template-layout.adoc[JSON Template] +* xref:manual/manual/manual/layouts.adoc#PatternLayout[Pattern] +* xref:manual/manual/manual/layouts.adoc#RFC5424Layout[RFC-5424] +* xref:manual/manual/manual/layouts.adoc#SerializedLayout[Serialized] +* xref:manual/manual/manual/layouts.adoc#SyslogLayout[Syslog] +* xref:manual/manual/manual/layouts.adoc#LocationInformation[Location Information] + +== xref:manual/manual/manual/filters.adoc[Filters] + +* xref:manual/manual/manual/filters.adoc#BurstFilter[Burst] +* xref:manual/manual/manual/filters.adoc#CompositeFilter[Composite Filter] +* xref:manual/manual/manual/filters.adoc#DynamicThresholdFilter[Dynamic Threshold] +* xref:manual/manual/manual/filters.adoc#MapFilter[Map] +* xref:manual/manual/manual/filters.adoc#MarkerFilter[Marker] +* xref:manual/manual/manual/filters.adoc#MutableThreadContextMapFilter[Mutable Thread Context Map] +* xref:manual/manual/manual/filters.adoc#RegexFilter[Regex] +* xref:manual/manual/manual/filters.adoc#Script[Script] +* xref:manual/manual/manual/filters.adoc#StructuredDataFilter[Structured Data] +* xref:manual/manual/manual/filters.adoc#ThreadContextMapFilter[Thread Context Map] +* xref:manual/manual/manual/filters.adoc#ThresholdFilter[Threshold] +* xref:manual/manual/manual/filters.adoc#TimeFilter[Time] + +== xref:manual/manual/manual/async.adoc[Async Loggers] + +* xref:manual/manual/manual/async.adoc#Trade-offs[Trade-offs] +* xref:manual/manual/manual/async.adoc#AllAsync[All Loggers Async] +* xref:manual/manual/manual/async.adoc#MixedSync-Async[Mixed Sync & Async] +* xref:manual/manual/manual/async.adoc#WaitStrategy[WaitStrategy] +* xref:manual/manual/manual/async.adoc#Location[Location] +* xref:manual/manual/manual/async.adoc#Performance[Performance] +* xref:manual/manual/manual/async.adoc#UnderTheHood[Under The Hood] + +== xref:manual/manual/manual/garbagefree.adoc[Garbage-free Logging] + +* xref:manual/manual/manual/garbagefree.adoc#Config[Configuration] +* xref:manual/manual/manual/garbagefree.adoc#Appenders[Supported Appenders] +* xref:manual/manual/manual/garbagefree.adoc#Layouts[Supported Layouts] +* xref:manual/manual/manual/garbagefree.adoc#Filters[Supported Filters] +* xref:manual/manual/manual/garbagefree.adoc#api[API Changes] +* xref:manual/manual/manual/garbagefree.adoc#codeImpact[Impact on Application Code] +* xref:manual/manual/manual/garbagefree.adoc#UnderTheHood[Under the Hood] + +== xref:manual/manual/manual/extending.adoc[Extending Log4j] + +* xref:manual/manual/manual/extending.adoc#LoggerContextFactory[`LoggerContextFactory`] +* xref:manual/manual/manual/extending.adoc#ContextSelector[`ContextSelector`] +* xref:manual/manual/manual/extending.adoc#ConfigurationFactory[`ConfigurationFactory`] +* xref:manual/manual/manual/extending.adoc#LoggerConfig[`LoggerConfig`] +* xref:manual/manual/manual/extending.adoc#LogEventFactory[`LogEventFactory`] +* xref:manual/manual/manual/extending.adoc#MessageFactory[`MessageFactory`] +* xref:manual/manual/manual/extending.adoc#Lookups[Lookups] +* xref:manual/manual/manual/extending.adoc#Filters[Filters] +* xref:manual/manual/manual/extending.adoc#Appenders[Appenders] +* xref:manual/manual/manual/extending.adoc#Layouts[Layouts] +* xref:manual/manual/manual/extending.adoc#PatternConverters[Pattern converters] +* xref:manual/manual/manual/extending.adoc#Plugin_Builders[Plugin builders] +* xref:manual/manual/manual/extending.adoc#Custom_ContextDataProvider[Custom `ContextDataProvider`] +* xref:manual/manual/manual/extending.adoc#Custom_Plugins[Custom plugins] + +== xref:manual/manual/manual/plugins.adoc[Plugins] + +* xref:manual/manual/manual/plugins.adoc#core[Core] +* xref:manual/manual/manual/plugins.adoc#converters[Converters] +* xref:manual/manual/manual/plugins.adoc#key-providers[Key Providers] +* xref:manual/manual/manual/plugins.adoc#lookups[Lookups] +* xref:manual/manual/manual/plugins.adoc#type-converters[Type Converters] +* xref:manual/manual/manual/plugins.adoc#developer-notes[Developer Notes] + +== xref:manual/manual/manual/customconfig.adoc[Programmatic Log4j Configuration] + +* xref:manual/manual/manual/customconfig.adoc#ConfigurationBuilder[ConfigurationBuilder API] +* xref:manual/manual/manual/customconfig.adoc#ConfigurationFactory[Understanding ConfigurationFactory] +* xref:manual/manual/manual/customconfig.adoc#Example[Example] +* xref:manual/manual/manual/customconfig.adoc#Configurator[Using Configurator] +* xref:manual/manual/manual/customconfig.adoc#Hybrid[Config File and Code] +* xref:manual/manual/manual/customconfig.adoc#AddingToCurrent[After Initialization] +* xref:manual/manual/manual/customconfig.adoc#AppendingToWritersAndOutputStreams[Appending to Writers & OutputStreams] + +== xref:manual/manual/manual/customloglevels.adoc#DefiningLevelsInCode[In Code] + +* xref:manual/manual/manual/customloglevels.adoc#DefiningLevelsInConfiguration[In Configuration] +* xref:manual/manual/manual/customloglevels.adoc#AddingOrReplacingLevels[Adding or Replacing Levels] +* xref:manual/manual/manual/customloglevels.adoc#CustomLoggers[Custom Loggers] +* xref:manual/manual/manual/customloglevels.adoc#ExampleUsage[Custom Logger Example] +* xref:manual/manual/manual/customloglevels.adoc#CodeGen[Code Generation Tool] == Others -* xref:manual/jmx.adoc[JMX] -* xref:manual/logsep.adoc[Logging Separation] +* xref:manual/manual/manual/jmx.adoc[JMX] +* xref:manual/manual/manual/logsep.adoc[Logging Separation] diff --git a/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc b/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc index eb25d3aea1..2a14d9f450 100644 --- a/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc @@ -22,17 +22,17 @@ generating layout. It encodes ``LogEvent``s according to the structure described by the JSON template provided. In a nutshell, it shines with its * Customizable JSON structure (see `eventTemplate[Uri]` and - `stackTraceElementTemplate[Uri]` xref:layout-config[layout configuration] parameters) + `stackTraceElementTemplate[Uri]` xref:manual/manual/manual/layout-config[layout configuration] parameters) -* Customizable timestamp formatting (see xref:event-template-resolver-timestamp[] +* Customizable timestamp formatting (see xref:manual/manual/manual/event-template-resolver-timestamp[] event template resolver) -* Feature rich exception formatting (see xref:event-template-resolver-exception[] - and xref:event-template-resolver-exceptionRootCause[] event template resolvers) +* Feature rich exception formatting (see xref:manual/manual/manual/event-template-resolver-exception[] + and xref:manual/manual/manual/event-template-resolver-exceptionRootCause[] event template resolvers) -* xref:extending[Extensible plugin support] +* xref:manual/manual/manual/extending[Extensible plugin support] -* Customizable object xref:recycling-strategy[recycling strategy] +* Customizable object xref:manual/manual/manual/recycling-strategy[recycling strategy] [#usage] == Usage @@ -406,7 +406,7 @@ artifact, which contains the following predefined event templates: Graylog Extended Log Format (GELF) payload specification] with additional `_thread` and `_logger` fields. (Here it is advised to override the obligatory `host` field with a user provided constant via - xref:additional-event-template-fields[additional event template fields] + xref:manual/manual/manual/additional-event-template-fields[additional event template fields] to avoid `hostName` property lookup at runtime, which incurs an extra cost.) - https://github.com/apache/logging-log4j2/tree/main/log4j-layout-template-json/src/main/resources/GcpLayout.json[`GcpLayout.json`] @@ -835,7 +835,7 @@ for ``StackTraceElement`` templates. Resolves the fields of the innermost `Throwable` returned by `logEvent.getThrown()`. Its syntax and garbage-footprint are identical to the -xref:event-template-resolver-exception[] resolver. +xref:manual/manual/manual/event-template-resolver-exception[] resolver. [#event-template-resolver-level] ===== `level` @@ -1535,8 +1535,8 @@ parent such that keys are prefixed with `_`: [#stack-trace-element-templates] === Stack Trace Element Templates -xref:event-template-resolver-exception[] and -xref:event-template-resolver-exceptionRootCause[] event template resolvers can +xref:manual/manual/manual/event-template-resolver-exception[] and +xref:manual/manual/manual/event-template-resolver-exceptionRootCause[] event template resolvers can serialize an exception stack trace (i.e., `StackTraceElement[]` returned by `Throwable#getStackTrace()`) into a JSON array. While doing so, JSON templating infrastructure is used again. @@ -1615,7 +1615,7 @@ link:plugins.html[plugin system documentation]. [#extending-event-resolvers] === Extending Event Resolvers -All available xref:event-template-resolvers[event template resolvers] are simple +All available xref:manual/manual/manual/event-template-resolvers[event template resolvers] are simple plugins employed by `JsonTemplateLayout`. To add new ones, one just needs to create their own `EventResolver` and instruct its injection via a `@Plugin`-annotated `EventResolverFactory` class. @@ -2006,5 +2006,5 @@ enabled. Take into account the following caveats: * link:lookups.html[Lookups] (that is, `${...}` variables) are not garbage-free. -Don't forget to check out xref:event-template-resolvers[the notes on garbage footprint of resolvers] +Don't forget to check out xref:manual/manual/manual/event-template-resolvers[the notes on garbage footprint of resolvers] you employ in templates. diff --git a/src/site/antora/modules/ROOT/pages/manual/logbuilder.adoc b/src/site/antora/modules/ROOT/pages/manual/logbuilder.adoc index 6f428f000a..d7051a0b8f 100644 --- a/src/site/antora/modules/ROOT/pages/manual/logbuilder.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/logbuilder.adoc @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. //// -= Log4j 2 API -== Log Builder += Log Builder Log4j has traditionally been used with logging statements like [source,java] diff --git a/src/site/antora/modules/ROOT/pages/manual/markers.adoc b/src/site/antora/modules/ROOT/pages/manual/markers.adoc index c705f7163a..41dc4245bd 100644 --- a/src/site/antora/modules/ROOT/pages/manual/markers.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/markers.adoc @@ -14,11 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. //// -= Log4j 2 API -Ralph Goers <[email protected]> - -[#Markers] -== Markers += Markers One of the primary purpose of a logging framework is to provide the means to generate debugging and diagnostic information only when it is diff --git a/src/site/antora/modules/ROOT/pages/manual/messages.adoc b/src/site/antora/modules/ROOT/pages/manual/messages.adoc index e80a012d5e..47b6d45ebd 100644 --- a/src/site/antora/modules/ROOT/pages/manual/messages.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/messages.adoc @@ -14,11 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. //// -= Log4j 2 API -Ralph Goers <[email protected]> - -[#Messages] -== Messages += Messages Although Log4j 2 provides Logger methods that accept Strings and Objects, all of these are ultimately captured in Message objects that diff --git a/src/site/antora/modules/ROOT/pages/manual/migration.adoc b/src/site/antora/modules/ROOT/pages/manual/migration.adoc index f26d283006..b2f5724108 100644 --- a/src/site/antora/modules/ROOT/pages/manual/migration.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/migration.adoc @@ -17,7 +17,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more limitations under the License. //// -== Migrating from Log4j 1.x to 2.x += Migrating from Log4j 1.x to 2.x http://logging.apache.org/log4j/1.2/[Log4j 1.x] has https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces[reached End of Life] in 2015 and is no longer supported. diff --git a/src/site/antora/modules/ROOT/pages/manual/thread-context.adoc b/src/site/antora/modules/ROOT/pages/manual/thread-context.adoc index 5c3ed365f2..35ec1df9ac 100644 --- a/src/site/antora/modules/ROOT/pages/manual/thread-context.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/thread-context.adoc @@ -14,10 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. //// -= Log4j 2 API -Ralph Goers <[email protected]>; Gary Gregory <[email protected]> -== Thread Context += Thread Context Log4j introduced the concept of the Mapped Diagnostic Context or MDC. It has been documented and discussed in numerous places including @@ -39,7 +37,7 @@ Although these are frequently used for purposes other than diagnosing problems, they are still frequently referred to as the MDC and NDC in Log4j 2 since they are already well known by those acronyms. -=== Fish Tagging +== Fish Tagging Most real-world systems have to deal with multiple clients simultaneously. In a typical multithreaded implementation of such a @@ -110,7 +108,7 @@ logger.debug("Message 2"); ThreadContext.clear(); ---- -=== CloseableThreadContext +== CloseableThreadContext When placing items on the stack or map, it's necessary to remove then again when appropriate. To assist with this, the @@ -182,7 +180,7 @@ for( final Session session : sessions ) { } ---- -=== Implementation details +== Implementation details The Stack and the Map are managed per thread and are based on http://docs.oracle.com/javase/6/docs/api/java/lang/ThreadLocal.html[`ThreadLocal`] @@ -201,7 +199,7 @@ Note that all methods of the link:../log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html[`ThreadContext`] class are static. -==== Configuration +=== Configuration * Set the system property `log4j2.disableThreadContextMap` to `true` to disable the Thread Context Map. * Set the system property `log4j2.disableThreadContextStack` to `true` to disable the Thread Context Stack. @@ -209,7 +207,7 @@ class are static. * Set the system property `log4j2.isThreadContextMapInheritable` to `true` to enable child threads to inherit the Thread Context Map. -=== Including the ThreadContext when writing logs +== Including the ThreadContext when writing logs The link:../log4j-core/apidocs/org/apache/logging/log4j/core/layout/PatternLayout.html[`PatternLayout`] @@ -222,7 +220,7 @@ Map and Stack. * Use `%x` to include the full contents of the http://docs.oracle.com/javase/6/docs/api/java/util/Stack.html[Stack]. -=== Custom context data injectors for non thread-local context data +== Custom context data injectors for non thread-local context data With the ThreadContext logging statements can be tagged so log entries that were related in some way can be linked via these tags. The diff --git a/src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc b/src/site/antora/modules/ROOT/pages/plugin-reference.adoc similarity index 61% copy from src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc copy to src/site/antora/modules/ROOT/pages/plugin-reference.adoc index 4d017bbca1..f41b0bbfba 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc +++ b/src/site/antora/modules/ROOT/pages/plugin-reference.adoc @@ -16,15 +16,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more See the License for the specific language governing permissions and limitations under the License. //// += Plugin reference -// TODO: turn this into a velocity template for all the version numbers -= Web Servlet Containers - -The Web module provides support for automatically enabling Log4j in Servlet containers. - -See the user manual page on link:manual/webapp.html[Web Applications and JSPs] for details on using Log4j 2 in Web Applications. - -== Requirements - -The Web module requires Servlet 5.0 at minimum and is dependent on the Log4j 2 API and implementation. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +This file is a stub. +Its content will be auto-generated during build. diff --git a/src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc b/src/site/antora/modules/ROOT/pages/release-notes.adoc similarity index 61% copy from src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc copy to src/site/antora/modules/ROOT/pages/release-notes.adoc index 4d017bbca1..d3416e4984 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-jakarta-web.adoc +++ b/src/site/antora/modules/ROOT/pages/release-notes.adoc @@ -16,15 +16,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more See the License for the specific language governing permissions and limitations under the License. //// += Release notes -// TODO: turn this into a velocity template for all the version numbers -= Web Servlet Containers - -The Web module provides support for automatically enabling Log4j in Servlet containers. - -See the user manual page on link:manual/webapp.html[Web Applications and JSPs] for details on using Log4j 2 in Web Applications. - -== Requirements - -The Web module requires Servlet 5.0 at minimum and is dependent on the Log4j 2 API and implementation. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +This file is a stub. +Its content will be auto-generated during build.
