diff --git a/.gitignore b/.gitignore index 621511406a6..53312c4bc19 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,6 @@ velocity.log felix-cache/ /.metadata/ .DS_Store +node +node_modules +package-lock.json diff --git a/BUILDING.adoc b/BUILDING.adoc index dd83c8c21de..1eafd7fc478 100644 --- a/BUILDING.adoc +++ b/BUILDING.adoc @@ -62,12 +62,7 @@ You can build the website and manual as follows: ./mvnw site ---- -And view it using a simple HTTP server, e.g., the one comes with the Python: - -[source,bash] ----- -python3 -m http.server -d target/site ----- +You can view the generated website with a browser by pointing it to `target/site` directory. [#development] == Development diff --git a/antora-playbook.yaml b/antora-playbook.yaml new file mode 100644 index 00000000000..4fc6b046ddf --- /dev/null +++ b/antora-playbook.yaml @@ -0,0 +1,124 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +site: + title: Apache Log4j + url: "https://logging.apache.org/log4j/3.x" + start_page: "ROOT::index.adoc" + +content: + sources: + - url: . + branches: HEAD + start_paths: + - target/generated-site/antora + edit_url: + +asciidoc: + attributes: + # JSON Template Layout manual page has a deep sectioning, support it. + # The trailing `@` is added so the attribute can still can be overridden in the header of a page. + # For instance, we override this value in release notes page. + page-toclevels: "4@" + log4j-docgen-descriptor-directory: target/plugin-descriptors + log4j-docgen-type-filter-exclude-pattern: ^java\..+ + log4j-docgen-type-target-template: | + #{{{replaceAll sourcedType.groupId "." "-"}}}_{{{replaceAll sourcedType.artifactId "." "-"}}}_{{{replaceAll sourcedType.type.className "." "-"}}} + extensions: + - "@asciidoctor/tabs" + - src/docgen/apiref-macro.js + +ui: + + bundle: + url: "https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable" + snapshot: true + + # Template files: https://github.com/asciidoctor/asciidoctor-docs-ui/blob/main/src + # Template variables: https://docs.antora.org/antora-ui-default/templates + supplemental_files: + + # Add `@asciidoctor/tabs` extension styles + - path: css/vendor/tabs.css + contents: ./node_modules/@asciidoctor/tabs/dist/css/tabs.css + + # Add `@asciidoctor/tabs` extension scripts + - path: js/vendor/tabs.js + contents: ./node_modules/@asciidoctor/tabs/dist/js/tabs.js + + - path: partials/footer-scripts.hbs + contents: | + + + + + {{#if env.SITE_SEARCH_PROVIDER}} + {{> search-scripts}} + {{/if}} + + - path: partials/head-styles.hbs + contents: | + + + + + + + - path: partials/header-content.hbs + contents: | +
+ +
+ + - path: partials/footer-content.hbs + contents: | + + + # Disable component version selector + - path: partials/nav-explore.hbs + contents: "" + + # Fix the `Edit this page` link + - path: partials/edit-this-page.hbs + contents: | +
Edit this Page
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MaxLengthConverter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MaxLengthConverter.java index e36c9d3a140..85483f517c1 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MaxLengthConverter.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MaxLengthConverter.java @@ -30,7 +30,9 @@ * 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): - * {@code "%maxLen{[AppName, ${hostName}, ${web:contextPath}] %p: %c{1} - %m%notEmpty{ =>%ex{short}}}{160}"} + *
{@code
+ * %maxLen{[AppName, ${hostName}, ${web:contextPath}] %p: %c{1} - %m%notEmpty{ =>%ex{short}}}{160}
+ * }
* * @author Thies Wellpott */ diff --git a/package.json b/package.json new file mode 100644 index 00000000000..8de82aed5be --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@antora/cli": "^3.2.0-alpha.4", + "@antora/site-generator-default": "^3.2.0-alpha.4", + "@asciidoctor/tabs": "^1.0.0-beta.6", + "fast-xml-parser": "^4.3.6", + "handlebars": "^4.7.8" + } +} diff --git a/pom.xml b/pom.xml index 7100d436d2a..115f2f88bf3 100644 --- a/pom.xml +++ b/pom.xml @@ -339,11 +339,21 @@ true true + 3.0.0-beta2 + 3.0.0-beta2 0.8.0 + 21.7.1 + 10.5.0 + + + 3.2.0 + 1.15.0 + Note that only this (i.e., the root) module is supposed to have a `site` goal, it is skipped for all other modules! --> @@ -689,34 +699,107 @@ + + + org.apache.logging.log4j + log4j-changelog-maven-plugin + + + + export-changelog + + export + + pre-site + false + + ${project.build.directory}/generated-site/antora/modules/ROOT/pages + + + + + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + false + + + + + copy-antora-yml + + run + + pre-site + + + + + + + + + + + org.apache.maven.plugins maven-resources-plugin + + + + + org.apache.logging.log4j + log4j-core + ${site-log4j-core.version} + + + org.apache.logging.log4j + log4j-layout-template-json + ${site-log4j-layout-template-json.version} + + + - + - copy-exported-release-notes + filter-antora-yml copy-resources pre-site false - ${project.build.directory}/generated-sources/site/asciidoc/_release-notes + ${project.build.directory}/generated-site/antora - ${project.basedir}/src/site/_release-notes + ${project.build.directory}/antora-yml + true - + copy-site @@ -725,21 +808,16 @@ pre-site false - ${project.build.directory}/generated-sources/site + ${project.build.directory}/generated-site ${project.basedir}/src/site - - /_release-notes/* - /_release-notes.adoc - /resources/logo/**/* - - + copy-javadoc @@ -758,30 +836,10 @@ - - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - copy-release-notes-adoc - - run - - generate-sources - false - - - - - - + @@ -837,14 +895,14 @@ pre-site - ${project.basedir}/src/template/docgen + ${project.basedir}/src/docgen index.adoc.ftl - ${project.build.directory}/generated-sources/site/asciidoc/plugin-reference.adoc + ${project.build.directory}/generated-site/antora/modules/ROOT/pages/plugin-reference.adoc type.adoc.ftl - ${project.build.directory}/generated-sources/site/asciidoc/_plugin-reference/%g-%a-%c.adoc + ${project.build.directory}/generated-site/antora/modules/ROOT/pages/_plugin-reference/%g-%a-%c.adoc @@ -855,7 +913,7 @@ generate-schema - pre-site + site ${project.version} ${project.build.directory}/log4j-config.xsd @@ -867,60 +925,84 @@ - org.asciidoctor - asciidoctor-maven-plugin - - 3.0.0 + com.github.eirslett + frontend-maven-plugin + ${frontend-maven-plugin.version} false - - - io.spring.asciidoctor - spring-asciidoctor-extensions-block-switch - 0.6.3 - - - - org.asciidoctor - asciidoctorj - 3.0.0-alpha.2 - - - org.apache.logging.log4j - log4j-docgen-asciidoctor-extension - ${log4j-docgen.version} - - + + - export-asciidoc-to-html - - - - ${project.build.directory}/generated-sources/site/resources - - - ${project.build.directory}/generated-sources/site/asciidoc - target/site - true - - src/template/asciidoctor - - - rouge - left - ${project.build.directory}/plugin-descriptors - ${log4j.docgen.typeFilter.excludePattern} - - + install-node-and-npm + + install-node-and-npm + + pre-site + + v${node.version} + ${npm.version} + + + + install-antora + + npm + + pre-site + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + + run-antora + + exec + + site + false + + ${project.basedir}/node/node + + + --eval + require('@antora/cli')(['generate', '--playbook', 'antora-playbook.yaml', '--to-dir', 'target/site']) + + + + + + + + + org.asciidoctor + asciidoctor-maven-plugin + false + + true + + + + + + + %d{ISO8601} [%t] %p %c{3} - %m%n + + + + + + + + + + + + + %d{ISO8601} [%t] %p %c{3} - %m%n + + + + + + + + + + + + + %d{ISO8601} [%t] %p %c{3} - %m%n + + + + + + + + + +---- + +[#reconfig_level_from_code] +== How do I set a logger's level programmatically? + +You can set a logger's level with the class link:javadoc/log4j-core/org/apache/logging/log4j/core/config/Configurator.html[`Configurator`] from Log4j Core. +Be aware that the `Configurator` class is not part of the public API. + +[source,java] +---- +// org.apache.logging.log4j.core.config.Configurator; + +Configurator.setLevel("com.example.Foo", Level.DEBUG); + +// You can also set the root logger: +Configurator.setRootLevel(Level.DEBUG); +---- + +[#retention] +== 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 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 xref:manual/appenders.adoc#DeletePathCondition[plugin conditions] or by writing a xref:manual/appenders.adoc#ScriptCondition[script condition]. + +[#api-tradeoffs] +== What are the trade-offs of using the Log4j 2 API versus the SLF4J API? + +The Log4j 2 API and SLF4J have a lot in common. +They both share the objective of cleanly separating the logging API from the implementation. +We believe that the Log4j 2 API can help make your application more performant while offering more functionality and more flexibility. + +There may be a concern that using the Log4j 2 API will tightly couple your application to Log4j 2. +This is not the case: applications coded to the Log4j 2 API always have the option to use any SLF4J-compliant library as their logging implementation with the log4j-to-slf4j adapter. +See the <> FAQ entry for details. + +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 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 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. + +[#gc-free-slf4j] +== Is Log4j 2 still garbage-free when I use the SLF4J API? + +Yes, the log4j-slf4j-impl binding (together with log4j-core) implements the `org.slf4j.Logger` methods to be GC-free. +However, bear in mind that there are some limitations: + +The SLF4J API only offers up to two parameters for a parameterized message. +More than that uses varargs which creates a temporary object for the parameter array. +The Log4j 2.6 API has methods for up to ten unrolled parameters. + +Another consideration is that the SLF4J API forces your application to log Strings. +Log4j 2 API lets you log any java.lang.CharSequence, and even any Objects. +Log4j can log any Object that implements `java.lang.CharSequence` or `org.apache.logging.log4j.util.StringBuilderFormattable` without creating garbage. + +The https://www.slf4j.org/api/org/slf4j/spi/LocationAwareLogger.html#log-org.slf4j.Marker-java.lang.String-int-java.lang.String-java.lang.Object:A-java.lang.Throwable-[`org.slf4j.spi.LocationAwareLogger::log`] method is not yet implemented in a garbage-free manner in the log4j-slf4j-impl binding. +It creates a new message object for each call. + +[#gc-free-domain-object] +== How do I log my domain object without creating garbage? + +One option is to let the domain object implement java.lang.CharSequence. +However, for many domain objects it may not be trivial to implement this without allocating temporary objects. + +An alternative is to implement the `org.apache.logging.log4j.util.StringBuilderFormattable` interface. +If an object is logged that implements this interface, its `formatTo` method is called instead of `toString()`. + +[source,java] +---- +package org.apache.logging.log4j.util; +public interface StringBuilderFormattable { + /** + * Writes a text representation of this object into the specified {@code StringBuilder}, + * ideally without allocating temporary objects. + * + * @param buffer the StringBuilder to write into + */ + void formatTo(StringBuilder buffer); +} +---- + +[#logger-wrapper] +== How do I create a custom logger wrapper that shows the correct class, method and line number? + +Log4j remembers the fully qualified class name (FQCN) of the logger and uses this to walk the stack trace for every log event when configured to print location. +(Be aware that logging with location is slow and may impact the performance of your application.) + +The problem with custom logger wrappers is that they have a different FQCN than the actual logger, so Log4j can't find the place where your custom logger was called. + +The solution is to provide the correct FQCN. +The easiest way to do this is to let Log4j generate the logger wrapper for you. +Log4j comes with a Logger wrapper generator tool. +This tool was originally meant to support custom log levels and is documented https://logging.apache.org/log4j/2.x/manual/customloglevels.html#CustomLoggers[here]. + +The generated logger code will take care of the FQCN. + +[#proguard-rules] +== Which rules do I need to add when ProGuard minification is enabled? + +When you are using Log4j with ProGuard/R8 enabled, you need to add the following rules to your configuration file: + +[source] +---- +-keep,allowoptimization class org.apache.logging.log4j.** { *; } +---- diff --git a/src/site/asciidoc/getting-started/index.adoc b/src/site/antora/modules/ROOT/pages/getting-started/index.adoc similarity index 100% rename from src/site/asciidoc/getting-started/index.adoc rename to src/site/antora/modules/ROOT/pages/getting-started/index.adoc diff --git a/src/site/asciidoc/guidelines.adoc b/src/site/antora/modules/ROOT/pages/guidelines.adoc similarity index 98% rename from src/site/asciidoc/guidelines.adoc rename to src/site/antora/modules/ROOT/pages/guidelines.adoc index 22a4c581c7a..95f2242cdfe 100644 --- a/src/site/asciidoc/guidelines.adoc +++ b/src/site/antora/modules/ROOT/pages/guidelines.adoc @@ -88,11 +88,8 @@ Committee. Git:: All of the Apache products are maintained in information repositories -using either Subversion or Git; Log4j uses -link:source-repository.html[Git]. Only some of the Apache developers -have write access to the Apache Logging repositories; everyone has -https://gitbox.apache.org/repos/asf?p=logging-log4j2.git[read -access]. +using either Subversion or Git; Log4j uses Git. +Only some of the Apache developers have write access to the Apache Logging repositories; everyone has read access. [#issues] == Issue Management diff --git a/src/site/asciidoc/index.adoc b/src/site/antora/modules/ROOT/pages/index.adoc similarity index 72% rename from src/site/asciidoc/index.adoc rename to src/site/antora/modules/ROOT/pages/index.adoc index e71bfca289f..e9c15b880e4 100644 --- a/src/site/asciidoc/index.adoc +++ b/src/site/antora/modules/ROOT/pages/index.adoc @@ -16,21 +16,18 @@ //// = Apache Log4j -:icons: font 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. -As all software maintained at the Apache Software Foundation, Apache Log4j is released under the link:https://www.apache.org/licenses/LICENSE-2.0[Apache License, Version 2.0]. - -[#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!**] +[#shortcuts] +== Shortcuts +- xref:download.adoc#using-a-build-system[How can I add Log4j artifacts to my Maven/Ivy/Gradle project?] +- 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!**] [#simple-to-use] == Simple to use @@ -62,16 +59,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. @@ -80,29 +77,28 @@ 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. [#requirements] == Requirements Log4j 3 runtime requires a minimum of Java 17. -For support for older versions of Java see the link:http://logging.apache.org/2.x[Log4j 2 site]. +For support for older versions of Java see the link:/log4j/2.x[Log4j 2 site]. [#older-releases] == Older releases Are looking for old versions of Log4j? While we recommend ot always use the latest versions, you can find the older versions here: -* link:https://logging.apache.org/log4j/1.2/[Log4j 1.2 - End of Life] -* link:https://logging.apache.org/log4j/log4j-2.3/[Log4j 2.3 - Java 6] -* link:https://logging.apache.org/log4j/log4j-2.12.1/[Log4j 2.12.1 - Java 7] -* link:https://logging.apache.org/log4j/2.x/[Log4j 2.x - Latest release for Java 8] - +* link:/1.2/[Log4j 1.2 (End of Life)] +* link:/log4j-2.3/[Log4j 2.3 (Java 6)] +* link:/log4j-2.12.1/[Log4j 2.12.1 (Java 7)] +* link:/2.x/[Log4j 2 (Java 8)] [#compat] == Compatibility @@ -112,4 +108,4 @@ Custom plugins written for Log4j 2 may need minor changes when compiling with Lo The `log4j-1.2-api` module provides compatibility for applications using the Log4j 1 logging methods. Log4j 3, just like Log4j 2, also provides experimental support for Log4j 1 configuration files. -See link:manual/log4j1-compat.html[Log4j 3 compatibility with Log4j 1] for more information. +See xref:manual/log4j1-compat.adoc[Log4j 3 compatibility with Log4j 1] for more information. diff --git a/src/site/asciidoc/javadoc.adoc b/src/site/antora/modules/ROOT/pages/javadoc.adoc similarity index 100% rename from src/site/asciidoc/javadoc.adoc rename to src/site/antora/modules/ROOT/pages/javadoc.adoc diff --git a/src/site/asciidoc/log4j-1.2-api.adoc b/src/site/antora/modules/ROOT/pages/log4j-1.2-api.adoc similarity index 96% rename from src/site/asciidoc/log4j-1.2-api.adoc rename to src/site/antora/modules/ROOT/pages/log4j-1.2-api.adoc index b831c39bf41..9aea2a1bf95 100644 --- a/src/site/asciidoc/log4j-1.2-api.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-1.2-api.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -60,7 +58,7 @@ The following Log4j 1.x methods will behave differently when the Log4j 2 Core mo If log4j-core is not present location information will not be accurate in calls using the Log4j 1.2 API. The config package which attempts to convert Log4j 1.x configurations to Log4j 2 is not supported without Log4j 2. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. == Usage diff --git a/src/site/asciidoc/log4j-api.adoc b/src/site/antora/modules/ROOT/pages/log4j-api.adoc similarity index 96% rename from src/site/asciidoc/log4j-api.adoc rename to src/site/antora/modules/ROOT/pages/log4j-api.adoc index 89e016f5021..fc30803f1dc 100644 --- a/src/site/asciidoc/log4j-api.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-api.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -16,7 +14,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. //// -= Log4j 2 API += Log4j API The Log4j 2 API provides the interface that applications should code to and provides the adapter components required for implementers to create a logging implementation. diff --git a/src/site/asciidoc/log4j-docker.adoc b/src/site/antora/modules/ROOT/pages/log4j-docker.adoc similarity index 75% rename from src/site/asciidoc/log4j-docker.adoc rename to src/site/antora/modules/ROOT/pages/log4j-docker.adoc index 78c77974155..c4eb104814d 100644 --- a/src/site/asciidoc/log4j-docker.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-docker.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -16,6 +14,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. //// + = Log4j Docker Support Log4j supports Docker by providing a Lookup to retrieve container information. @@ -25,7 +24,7 @@ Log4j supports Docker by providing a Lookup to retrieve container information. The Log4j Docker support requires access to the Docker REST interface. In practical terms this means the application either needs access to unix:///var/run/docker.sock through a volume mount (not recommended), bind Docker to another host/port or unix socket. or use a proxy application to provide access. -The https://github.com/apache/logging-log4j-samples[Log4j Spring Cloud sample application] uses a socat proxy to access Docker. +The https://github.com/apache/logging-log4j2/tree/main/log4j-spring-cloud-config/log4j-spring-cloud-config-samples/log4j-spring-cloud-config-sample-application[Log4j Spring Cloud sample application] uses a socat proxy to access Docker. == Lookup Attributes @@ -38,16 +37,8 @@ Log4j Docker provides access to the following container attributes: * shortContainerId - The first 12 characters of the container id. * shortImageId - The first 12 characters of the image id. -Attributes may be accessed by adding - ----- -${docker:containerId} ----- - -to the configuration. -Note that docker variables are only resolved once during logging initializaton so they shouldn't be referenced with more than one '$' character. - -== Requirements +Attributes may be accessed by adding `${docker:containerId}` to the configuration. +Note that docker variables are only resolved once during logging initialization so they shouldn't be referenced with more than one `$` character. -Log4j Docker requires Log4j Core, Log4j API and a minimum of Java 8. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +== Requirements Log4j Docker requires Log4j Core, Log4j API and a minimum of Java 8. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. diff --git a/src/site/asciidoc/log4j-flume-ng.adoc b/src/site/antora/modules/ROOT/pages/log4j-flume-ng.adoc similarity index 97% rename from src/site/asciidoc/log4j-flume-ng.adoc rename to src/site/antora/modules/ROOT/pages/log4j-flume-ng.adoc index 1ecd2d82afa..a61f1e5ff99 100644 --- a/src/site/asciidoc/log4j-flume-ng.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-flume-ng.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -16,6 +14,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. //// + = Flume Appender The Flume Appender allows applications to send events to Flume Agents. @@ -31,6 +30,7 @@ The following dependency should be added to your pom.xml in addition to the log4 // TODO: use variables for dependency versions +[source,xml] ---- @@ -61,6 +61,7 @@ The following dependency should be added to your pom.xml in addition to the log4 The following is a sample pom file for Maven that can be used as a template for integrating the Flume Embedded Appender into an application. +[source,xml] ---- @@ -214,7 +215,5 @@ The following is a sample pom file for Maven that can be used as a template for ---- -== Requirements - -The Flume Appender requires the Log4J 2 API. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +== Requirements The Flume Appender requires the Log4J 2 API. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. diff --git a/src/site/asciidoc/log4j-iostreams.adoc b/src/site/antora/modules/ROOT/pages/log4j-iostreams.adoc similarity index 96% rename from src/site/asciidoc/log4j-iostreams.adoc rename to src/site/antora/modules/ROOT/pages/log4j-iostreams.adoc index 9382dd51932..66e1f90170c 100644 --- a/src/site/asciidoc/log4j-iostreams.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-iostreams.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -26,7 +24,7 @@ The IOStreams component is a link:javadoc/log4j-api/index.html[Log4j API] extens The Log4j IOStreams API extension requires the Log4j 2 API. This component was introduced in Log4j 2.1. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. == Usage @@ -34,6 +32,7 @@ The main entry point for the IOStreams module is the builder class `IoBuilder`, One primary usage of this API extension is for setting up loggers in the JDBC API. For example: +[source,java] ---- PrintWriter logger = IoBuilder.forLogger(DriverManager.class) .setLevel(Level.DEBUG) diff --git a/src/site/asciidoc/log4j-jpl.adoc b/src/site/antora/modules/ROOT/pages/log4j-jpl.adoc similarity index 94% rename from src/site/asciidoc/log4j-jpl.adoc rename to src/site/antora/modules/ROOT/pages/log4j-jpl.adoc index 0357415effd..87cc6e4fb7a 100644 --- a/src/site/asciidoc/log4j-jpl.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-jpl.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -16,7 +14,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. //// -= Log4j 2 JDK Platform Logging Adapter += Log4j JDK Platform Logging Adapter The Log4j 2 JDK Logging Adapter allow to route all System.Logger events to Log4j 2 APIs. diff --git a/src/site/asciidoc/log4j-jul.adoc b/src/site/antora/modules/ROOT/pages/log4j-jul.adoc similarity index 89% rename from src/site/asciidoc/log4j-jul.adoc rename to src/site/antora/modules/ROOT/pages/log4j-jul.adoc index 16dfc27f614..1077ecc2708 100644 --- a/src/site/asciidoc/log4j-jul.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-jul.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -16,13 +14,6 @@ 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. //// -:doctype: book - -There are two possibilities: - -* Logging Adapter as complete replacement (preferred, but requires JVM start option) -* Bridge Handler, transfering JDK output to log4j, e.g. -useful for webapps = Log4j JDK Logging Adapter @@ -34,7 +25,7 @@ However, this does allow any other Log4j Provider besides the Core provider to b == Requirements The JDK Logging Adapter is dependent on the Log4j API and optionally Log4j Core. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. == Usage @@ -45,10 +36,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. @@ -88,7 +79,7 @@ Using the default `LevelConverter` implementation, custom logging levels are map | `ALL` |=== -= Log4j JDK Logging Bridge Handler +== Log4j JDK Logging Bridge Handler The LogManager is not always useable because you have to set a JVM wide effective system property - e.g. in web servers this is not possible if you are not the administrator. diff --git a/src/site/asciidoc/log4j-mongodb4.adoc b/src/site/antora/modules/ROOT/pages/log4j-mongodb4.adoc similarity index 88% rename from src/site/asciidoc/log4j-mongodb4.adoc rename to src/site/antora/modules/ROOT/pages/log4j-mongodb4.adoc index c0f07f2c5d1..fe7eab98613 100644 --- a/src/site/asciidoc/log4j-mongodb4.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-mongodb4.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -17,13 +15,11 @@ Licensed to the Apache Software Foundation (ASF) under one or more limitations under the License. //// -// TODO: use properties for dynamic dependency versions - -= MongoDB appender += MongoDB 4 appender http://www.mongodb.org/[MongoDB] is supported through the http://docs.mongodb.org/ecosystem/drivers/java/[Java MongoDB Driver]. -[source, xml] +[source,xml] ---- @@ -45,4 +41,4 @@ http://www.mongodb.org/[MongoDB] is supported through the http://docs.mongodb.or == Requirements The MongoDB Appender is dependent on the Log4j 2 API and implementation. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. diff --git a/src/site/asciidoc/log4j-slf4j-impl.adoc b/src/site/antora/modules/ROOT/pages/log4j-slf4j-impl.adoc similarity index 94% rename from src/site/asciidoc/log4j-slf4j-impl.adoc rename to src/site/antora/modules/ROOT/pages/log4j-slf4j-impl.adoc index 6dd6c36da86..e274b2604de 100644 --- a/src/site/asciidoc/log4j-slf4j-impl.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-slf4j-impl.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -16,7 +14,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. //// -= Log4j 2 SLF4J Binding += Log4j SLF4J Binding The Log4j 2 SLF4J Binding allows applications coded to the SLF4J API to use Log4j 2 as the implementation. @@ -30,7 +28,7 @@ Applications that take advantage of the Java Module System should use SLF4J 1.8. == Requirements The Log4j 2 SLF4J Binding has a dependency on the Log4j 2 API as well as the SLF4J API. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. == Usage diff --git a/src/site/asciidoc/log4j-slf4j2-impl.adoc b/src/site/antora/modules/ROOT/pages/log4j-slf4j2-impl.adoc similarity index 92% rename from src/site/asciidoc/log4j-slf4j2-impl.adoc rename to src/site/antora/modules/ROOT/pages/log4j-slf4j2-impl.adoc index 71626565bcc..0ee222d3180 100644 --- a/src/site/asciidoc/log4j-slf4j2-impl.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-slf4j2-impl.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -16,14 +14,14 @@ 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. //// -= Log4j 2 SLF4J Binding += Log4j SLF4J Binding The Log4j 2 SLF4J Binding allows applications coded to the SLF4J API to use Log4j 2 as the implementation. == Requirements The Log4j 2 SLF4J Binding has a dependency on the Log4j 2 API as well as the SLF4J API. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. == Usage diff --git a/src/site/asciidoc/log4j-spring-cloud-config-client.adoc b/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc similarity index 96% rename from src/site/asciidoc/log4j-spring-cloud-config-client.adoc rename to src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc index 3032d9ba6de..7931c76c248 100644 --- a/src/site/asciidoc/log4j-spring-cloud-config-client.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -37,6 +35,7 @@ If the monitor interval is less than zero Log4j will not check for changes to t When referencing a configuration located in Spring Cloud Config the configuration should be referenced similar to +[source,properties] ---- log4j.configurationFile=http://host.docker.internal:8888/ConfigService/sampleapp/default/master/log4j2.xml ---- @@ -46,9 +45,9 @@ The standard way to do that is to concatentate the paths to the files in a comma Unfortunately, Spring validates the URL being provided and commas are not allowed. Therefore, additional configurations must be supplied as "override" query parametes. +[source,properties] ---- -log4j.configurationFile=http://host.docker.internal:8888/ConfigService/sampleapp/default/master/log4j2.xml -?override=http://host.docker.internal:8888/ConfigService/sampleapp/default/master/log4j2-sampleapp.xml +log4j.configurationFile=http://host.docker.internal:8888/ConfigService/sampleapp/default/master/log4j2.xml?override=http://host.docker.internal:8888/ConfigService/sampleapp/default/master/log4j2-sampleapp.xml ---- Note that the location within the directory structure and how configuration files are located is completely dependent on the searchPaths setting in the Spring Cloud Config server. @@ -80,6 +79,7 @@ Any of the alternatives may be used in any configuration location. | Class used to create HTTP Authorization header |=== +[source,properties] ---- log4j2.configurationUserName=guest log4j2.configurationPassword=guest @@ -88,6 +88,7 @@ log4j2.configurationPassword=guest As noted above, Log4j supports accessing logging configuration from bootstrap.yml. As an example, to configure reading from a Spring Cloud Configuration service using basic authoriztion you can do: +[source,yaml] ---- spring: application: @@ -181,4 +182,4 @@ If not provided the default key store will be used. == Requirements The Log4j 2 Spring Cloud Configuration integration has a dependency on Log4j 2 API, Log4j 2 Core, and Spring Cloud Configuration versions 2.0.3.RELEASE or 2.1.1.RELEASE or later versions it either release series. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. diff --git a/src/site/asciidoc/log4j-to-jul.adoc b/src/site/antora/modules/ROOT/pages/log4j-to-jul.adoc similarity index 94% rename from src/site/asciidoc/log4j-to-jul.adoc rename to src/site/antora/modules/ROOT/pages/log4j-to-jul.adoc index 169fc3a2832..695a41c8d82 100644 --- a/src/site/asciidoc/log4j-to-jul.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-to-jul.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -26,7 +24,7 @@ With Log4j 2 as the implementation these would normally be formatted only when t == Requirements The Log4j 2 to JUL adapter is dependent on the Log4j 2 API. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. == Usage diff --git a/src/site/asciidoc/log4j-to-slf4j.adoc b/src/site/antora/modules/ROOT/pages/log4j-to-slf4j.adoc similarity index 94% rename from src/site/asciidoc/log4j-to-slf4j.adoc rename to src/site/antora/modules/ROOT/pages/log4j-to-slf4j.adoc index a51395c095b..45a090ffcfd 100644 --- a/src/site/asciidoc/log4j-to-slf4j.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-to-slf4j.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -25,7 +23,7 @@ With Log4j 2 as the implementation these would normally be formatted only when t == Requirements The Log4j 2 to SLF4J adapter is dependent on the Log4j 2 API and the SLF4J API. -For more information, see link:runtime-dependencies.html[Runtime Dependencies]. +For more information, see xref:runtime-dependencies.adoc[Runtime Dependencies]. == Usage diff --git a/src/site/antora/modules/ROOT/pages/manual/api-separation.adoc b/src/site/antora/modules/ROOT/pages/manual/api-separation.adoc new file mode 100644 index 00000000000..51233ef907e --- /dev/null +++ b/src/site/antora/modules/ROOT/pages/manual/api-separation.adoc @@ -0,0 +1,233 @@ +//// +Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +//// += API Separation + +When selecting a logging library, some care must be taken in order to ensure that multiple different logging libraries are properly accounted for. +For example, library code that you depend on may use slf4j, while other libraries may simply use java.util.logging. +All of these can be routed to the log4j core in order to be logged. + +If however you want to use a different logging implementation (such as logback), it is possible to route messages from the Log4j API to logback, ensuring that your application is not tied to a specific logging framework. + +A typical class using the Log4j2 API looks like the following: + +[,java] +---- +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public class Log4j2Test { + private static final Logger logger = LogManager.getLogger(); + + public Log4j2Test(){ + logger.info( "Hello World!" ); + } +} +---- + +In order to use the API portion of Log4j2, we only need to provide a single dependency, log4j-api. +Using Maven, you would add the following to your dependencies: + +[,xml] +---- + + org.apache.logging.log4j + log4j-api + 2.17.0 + +---- + +== Using Log4j2 API and Core + +Using the Log4j2 API and the implementation (Core) together means that log messages will be routed through the Log4j2 Core. +The Log4j2 core implementation is responsible for the following (note: this is not an exhaustive list): + +* Configuration of the system (via an XML file for example) +* Routing messages to Appenders +* Opening files and other resources for logging (e.g. +network sockets) + +The xref:manual/configuration.adoc[configuration] page in the manual describes the configuration format supported by the Log4j2 core implementation. + +To use both the API and the core implementation, you would add the following to your dependencies (assuming that you are using Maven): + +[,xml] +---- + + org.apache.logging.log4j + log4j-api + 2.17.0 + + + org.apache.logging.log4j + log4j-core + 2.17.0 + +---- + +Note that having two different versions of log4j-api and log4j-core on your classpath is not guaranteed to work correctly (e.g., log4j-api version 2.15 and log4j-core version 2.17 are not guaranteed to work correctly together). + +== Using Log4j2 API with Logback + +Since the Log4j2 API is generic, we can use it to send messages via SLF4J and then have Logback do the actual logging of the messages. +This means that you can write your code tied to the Log4j2 API, but users of your code do not need to use the Log4j2 core if they are already using Logback. + +To switch to using Logback as your logging backend, you will need to add the following to your dependencies (assuming that you are using Maven): + +[,xml] +---- + + org.apache.logging.log4j + log4j-api + 2.17.0 + + + org.apache.logging.log4j + log4j-to-slf4j + 2.17.0 + + + ch.qos.logback + logback-classic + 1.2.10 + +---- + +== Using Log4j2 as an SLF4J Implementation + +If you don't want to depend on the Log4j2 API and instead want to use SLF4J, that is possible as well. +Assuming that our code looks like the following: + +[,java] +---- +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Log4j2Test { + + private static final Logger logger = LoggerFactory.getLogger(Log4j2Test.class); + + public Log4j2Test(){ + logger.info( "Hello World!" ); + } +} +---- + +We can then route the messages to Log4j2 using the log4j-slf4j-impl like the following: + +[,xml] +---- + + org.slf4j + slf4j-api + 1.7.32 + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.17.0 + + + org.apache.logging.log4j + log4j-core + 2.17.0 + +---- + +Note that if we were using SLF4J 1.8 instead of 1.7, that requires us to use log4j-slf4j18-impl instead of log4j-slf4j-impl. + +== Using Log4j2 with JUL + +It is also possible to route messages that are logged using java.util.logging to Log4j2. +Assuming that the code looks like the following: + +[,java] +---- +import java.util.logging.Logger; + +public class Log4j2Test { + + private static final Logger logger = Logger.getLogger(Log4j2Test.class.getName()); + + public Log4j2Test() { + logger.info("Hello World!"); + } +} +---- + +We can then also route these messages to the Log4j2 core by adding in the JUL bridge, and setting `-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager` on the JVM (see the documentation on xref:../log4j-jul.adoc[the JUL adapter] for more information as to how this works). + +In order to route these messages to Log4j2, your dependencies would look like the following: + +[,xml] +---- + + org.apache.logging.log4j + log4j-jul + 2.17.0 + + + org.apache.logging.log4j + log4j-core + 2.17.0 + +---- + +== Using Log4j2 as a backend for Log4j1 + +Some software may still depend on Log4j1, and in some cases it may be infeasible to modify this software to migrate it to Log4j2. + +However, it may be possible to start using Log4j2 without modifying the application. + +Assuming that our code looks like the following: + +[,java] +---- +import org.apache.log4j.Logger; + +public class Log4j2Test { + + private static final Logger logger = Logger.getLogger(Log4j2Test.class); + + public Log4j2Test(){ + logger.info( "Hello World!" ); + } +} +---- + +we can then quickly and easily configure these messages to use Log4j2 as the logging implementation by depending on the `log4j-1.2-api` bridge, like so: + +[,xml] +---- + + org.apache.logging.log4j + log4j-1.2-api + 2.17.0 + + + org.apache.logging.log4j + log4j-core + 2.17.0 + +---- + +There are some limitations to this, but it is expected to work for the majority of common cases. +See the xref:manual/migration.adoc[manual page on migration] for more information on this feature. + +== Conclusion + +With the API separation that Log4j2 provides, it is possible to use multiple logging APIs and implementations in the same project. +This allows for greater flexibility, ensuring that you are not tied to a single API or implementation. diff --git a/src/site/asciidoc/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc similarity index 97% rename from src/site/asciidoc/manual/api.adoc rename to src/site/antora/modules/ROOT/pages/manual/api.adoc index e06f28f0796..7c5b8d0154c 100644 --- a/src/site/asciidoc/manual/api.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. //// -= Log4j 2 API += Log4j API == Overview @@ -31,7 +31,7 @@ application code. No introduction would be complete without the customary Hello, World example. Here is ours. First, a Logger with the name "HelloWorld" is obtained from the -link:../log4j-api/apidocs/org/apache/logging/log4j/LogManager.html[`LogManager`]. +link:../javadoc/log4j-api/org/apache/logging/log4j/LogManager.html[`LogManager`]. Next, the logger is used to write the "Hello, World!" message, however the message will be written only if the Logger is configured to allow informational messages. @@ -51,7 +51,7 @@ public class HelloWorld { The output from the call to `logger.info()` will vary significantly depending on the configuration used. See the -link:configuration.html[Configuration] section for more details. +xref:manual/configuration.adoc[Configuration] section for more details. === Substituting Parameters @@ -100,7 +100,7 @@ logger.debug("Long.MAX_VALUE = %,d", Long.MAX_VALUE); ---- To use a formatter Logger, you must call one of the `LogManager` -link:../log4j-api/apidocs/org/apache/logging/log4j/LogManager.html#getFormatterLogger(java.lang.Class)[`getFormatterLogger`] +link:../javadoc/log4j-api/org/apache/logging/log4j/LogManager.html#getFormatterLogger(java.lang.Class)[`getFormatterLogger`] methods. The output for this example shows that `Calendar::toString` is verbose compared to custom formatting: diff --git a/src/site/asciidoc/manual/appenders.adoc b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc similarity index 96% rename from src/site/asciidoc/manual/appenders.adoc rename to src/site/antora/modules/ROOT/pages/manual/appenders.adoc index 9e691033a4e..305be6061c2 100644 --- a/src/site/asciidoc/manual/appenders.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc @@ -19,13 +19,13 @@ Ralph Goers; Gary Gregory; Nick Williams; Matt Sicker Appenders are responsible for delivering LogEvents to their destination. Every Appender must implement the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/Appender.html[`Appender`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/Appender.html[`Appender`] interface. Most Appenders will extend -link:../log4j-core/apidocs/org/apache/logging/log4j/core/appender/AbstractAppender.html[`AbstractAppender`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/appender/AbstractAppender.html[`AbstractAppender`] which adds -link:../log4j-core/apidocs/org/apache/logging/log4j/core/LifeCycle.html[`Lifecycle`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/LifeCycle.html[`Lifecycle`] and -link:../log4j-core/apidocs/org/apache/logging/log4j/core/filter/Filterable.html[`Filterable`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/filter/Filterable.html[`Filterable`] support. `Lifecycle` allows components to finish initialization after configuration has completed and to perform cleanup during shutdown. `Filterable` allows the component to have `Filter`s attached to it which are @@ -33,7 +33,7 @@ evaluated during event processing. Appenders usually are only responsible for writing the event data to the target destination. In most cases they delegate responsibility for -formatting the event to a link:layouts.html[layout]. Some appenders wrap +formatting the event to a xref:manual/layouts.adoc[layout]. Some appenders wrap other appenders so that they can modify the `LogEvent`, handle a failure in an `Appender`, route the event to a subordinate `Appender` based on advanced `Filter` criteria or provide similar functionality that does not @@ -44,7 +44,7 @@ Loggers. In the tables below, the "Type" column corresponds to the Java type expected. For non-JDK classes, these should usually be in -link:../log4j-core/apidocs/index.html[Log4j Core] unless otherwise +link:../javadoc/log4j-core/index.html[Log4j Core] unless otherwise noted. [#AsyncAppender] @@ -61,9 +61,9 @@ https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ArrayBlockingQueu which does not require any external libraries. Note that multi-threaded applications should exercise care when using this appender as such: the blocking queue is susceptible to lock contention and our -link:../performance.html#asyncLogging[tests showed] performance may +xref:manual/performance.adoc#asyncLogging[tests showed] performance may become worse when more threads are logging concurrently. Consider using -link:async.html[lock-free Async Loggers] for optimal performance. +xref:manual/async.adoc[lock-free Async Loggers] for optimal performance. .AsyncAppender Parameters [width="100%",cols="20%,20%,60%",options="header",] @@ -88,7 +88,7 @@ buffer size must be a power of 2. When the application is logging faster than the underlying appender can keep up with for a long enough time to fill up the queue, the behaviour is determined by the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/async/AsyncQueueFullPolicy.html[`AsyncQueueFullPolicy`]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/async/AsyncQueueFullPolicy.html[`AsyncQueueFullPolicy`]. |errorRef |String |The name of the Appender to invoke if none of the appenders can be called, either due to errors in the appenders or @@ -120,7 +120,7 @@ There are also a few system properties that can be used to maintain application throughput even when the underlying appender cannot keep up with the logging rate and the queue is filling up. See the details for system properties -link:configuration.html#log4j2.AsyncQueueFullPolicy[`log4j2.AsyncQueueFullPolicy` +xref:manual/configuration.adoc#log4j2.AsyncQueueFullPolicy[`log4j2.AsyncQueueFullPolicy` and `log4j2.DiscardThreshold`]. A typical AsyncAppender configuration might look like: @@ -149,7 +149,7 @@ A typical AsyncAppender configuration might look like: [[BlockingQueueFactory]] Starting in Log4j 2.7, a custom implementation of `BlockingQueue` or `TransferQueue` can be specified using a -link:../log4j-core/apidocs/org/apache/logging/log4j/core/async/BlockingQueueFactory.html[`BlockingQueueFactory`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/async/BlockingQueueFactory.html[`BlockingQueueFactory`] plugin. To override the default `BlockingQueueFactory`, specify the plugin inside an `` element like so: @@ -243,7 +243,7 @@ Appender in a link:#FailoverAppender[FailoverAppender]. A typical Console configuration might look like: -[source,prettyprint,linenums] +[source,xml,prettyprint,linenums] ---- @@ -714,6 +714,10 @@ an embedded Flume Agent. As of Log4j 2.11.0, JDBC support has moved from the existing module `log4j-core` to the new module `log4j-jdbc`. +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:manual/configuration.adoc#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 JNDI `DataSource` or a custom factory method. Whichever approach you @@ -767,11 +771,11 @@ list of column mapping configurations. Each column must specify a column name. Each column can have a conversion type specified by its fully qualified class name. By default, the conversion type is `String`. If the configured type is assignment-compatible with -link:../log4j-api/apidocs/org/apache/logging/log4j/util/ReadOnlyStringMap.html[`ReadOnlyStringMap`] +link:../javadoc/log4j-api/org/apache/logging/log4j/util/ReadOnlyStringMap.html[`ReadOnlyStringMap`] / -link:../log4j-api/apidocs/org/apache/logging/log4j/spi/ThreadContextMap.html[`ThreadContextMap`] +link:../javadoc/log4j-api/org/apache/logging/log4j/spi/ThreadContextMap.html[`ThreadContextMap`] or -link:../log4j-api/apidocs/org/apache/logging/log4j/spi/ThreadContextStack.html[`ThreadContextStack`], +link:../javadoc/log4j-api/org/apache/logging/log4j/spi/ThreadContextStack.html[`ThreadContextStack`], then that column will be populated with the MDC or NDC respectively (this is database-specific how they handle inserting a `Map` or `List` value). If the configured type is assignment-compatible with @@ -829,7 +833,7 @@ containing a static factory method for obtaining JDBC connections. |method |Method |_Required._ The name of a static factory method for obtaining JDBC connections. This method must have no parameters and its return type must be either `java.sql.Connection` or `DataSource`. If the -method returns `Connection`s, it must obtain them from a connection pool +method returns `Connection`, it must obtain them from a connection pool (and they will be returned to the pool when Log4j is done with them); otherwise, logging will be very slow. If the method returns a `DataSource`, the `DataSource` will only be retrieved once, and it must @@ -1049,8 +1053,8 @@ import org.apache.commons.dbcp.PoolingDataSource; import org.apache.commons.pool.impl.GenericObjectPool; public class ConnectionFactory { - private static interface Singleton { - final ConnectionFactory INSTANCE = new ConnectionFactory(); + private interface Singleton { + ConnectionFactory INSTANCE = new ConnectionFactory(); } private final DataSource dataSource; @@ -1077,7 +1081,7 @@ public class ConnectionFactory { } ---- -This appender is link:messages.html#MapMessage[`MapMessage`]-aware. +This appender is xref:manual/messages.adoc#MapMessage[`MapMessage`]-aware. The following configuration uses no layout to indicate that the Appender should match the keys of a `MapMessage` to the names of @@ -1159,7 +1163,7 @@ Optional, default is 0 (infinite timeout). Optional, default is 0 (infinite timeout). |headers |Property[] |Additional HTTP headers to use. The values support -link:lookups.html[lookups]. +xref:manual/lookups.adoc[lookups]. |ignoreExceptions |boolean |The default is `true`, causing exceptions encountered while appending events to be internally logged and then @@ -1170,10 +1174,11 @@ Appender in a link:#FailoverAppender[FailoverAppender]. Here is a sample HttpAppender configuration snippet: -[source,prettyprint,linenums] +[source,xml] ---- - ... + + @@ -1184,6 +1189,8 @@ Here is a sample HttpAppender configuration snippet: + + ---- [#MemoryMappedFileAppender] @@ -1202,15 +1209,19 @@ appender can simply change the program's local memory, which is orders of magnitude faster. Also, in most operating systems the memory region mapped actually is the kernel's http://en.wikipedia.org/wiki/Page_cache[page cache] (file cache), -meaning that no copies need to be created in user space. (TODO: -performance tests that compare performance of this appender to -RandomAccessFileAppender and FileAppender.) +meaning that no copies need to be created in user space. + +// TODO: +// performance tests that compare performance of this appender to +// RandomAccessFileAppender and FileAppender.) There is some overhead with mapping a file region into memory, especially very large regions (half a gigabyte or more). The default region size is 32 MB, which should strike a reasonable balance between -the frequency and the duration of remap operations. (TODO: performance -test remapping various sizes.) +the frequency and the duration of remap operations. + +// (TODO: performance +// test remapping various sizes.) Similar to the FileAppender and the RandomAccessFileAppender, MemoryMappedFileAppender uses a MemoryMappedFileManager to actually @@ -1274,7 +1285,7 @@ Appender in a link:#FailoverAppender[FailoverAppender]. Here is a sample MemoryMappedFile configuration: -[source,prettyprint,linenums] +[source,xml] ---- @@ -1336,7 +1347,7 @@ providers as a guide for creating your own provider. The following example demonstrates how log events are persisted in NoSQL databases if represented in a JSON format: -[source,prettyprint,lang-javascript] +[source,json] ---- { "level": "WARN", @@ -1350,7 +1361,7 @@ databases if represented in a JSON format: }, "marker": { "name": "SomeMarker", - "parent" { + "parent": { "name": "SomeParentMarker" } }, @@ -1427,7 +1438,7 @@ be increased to the nearest integer multiple of 256. See the capped collection documentation linked above for more information. |======================================================================= -This appender is link:messages.html#MapMessage[MapMessage]-aware. +This appender is xref:manual/messages.adoc#MapMessage[MapMessage]-aware. Here are a few sample configurations for the NoSQLAppender and MongoDB4 provider: @@ -1469,6 +1480,29 @@ provider: ---- +You can define additional fields to log using KeyValuePair elements, for example: + +[source,xml] +---- + + + + + + + + + + + + + + + + + +---- + [#OutputStreamAppender] == OutputStreamAppender @@ -1489,7 +1523,7 @@ cannot be switched off) and internally it uses a `ByteBuffer + RandomAccessFile` instead of a `BufferedOutputStream`. We saw a 20-200% performance improvement compared to FileAppender with "bufferedIO=true" in our -link:../performance.html#whichAppender[measurements]. Similar to the +xref:manual/performance.adoc#whichAppender[measurements]. Similar to the FileAppender, RandomAccessFileAppender uses a RandomAccessFileManager to actually perform the file I/O. While RandomAccessFileAppender from different Configurations cannot be shared, the RandomAccessFileManagers @@ -1548,7 +1582,7 @@ Appender in a link:#FailoverAppender[FailoverAppender]. Here is a sample RandomAccessFile configuration: -[source,prettyprint,linenums] +[source,xml] ---- @@ -1602,7 +1636,7 @@ Appender in a link:#FailoverAppender[FailoverAppender]. |======================================================================= [#RewritePolicy] -===== RewritePolicy +=== RewritePolicy RewritePolicy is an interface that allows implementations to inspect and possibly modify LogEvents before they are passed to Appender. @@ -1610,7 +1644,7 @@ RewritePolicy declares a single method named rewrite that must be implemented. The method is passed the LogEvent and can return the same event or create a new one. -MapRewritePolicy +==== MapRewritePolicy MapRewritePolicy will evaluate LogEvents that contain a MapMessage and will add or update elements of the Map. @@ -1625,7 +1659,7 @@ will add or update elements of the Map. The following configuration shows a RewriteAppender configured to add a product key and its value to the MapMessage.: -[source,prettyprint,linenums] +[source,xml] ---- @@ -1648,7 +1682,7 @@ product key and its value to the MapMessage.: ---- -PropertiesRewritePolicy +==== PropertiesRewritePolicy PropertiesRewritePolicy will add properties configured on the policy to the ThreadContext Map being logged. The properties will not be added to @@ -1666,7 +1700,7 @@ keys and values to be added to the ThreadContext Map. The following configuration shows a RewriteAppender configured to add a product key and its value to the MapMessage: -[source,prettyprint,linenums] +[source,xml] ---- @@ -1690,7 +1724,7 @@ product key and its value to the MapMessage: ---- -LoggerNameLevelRewritePolicy +==== LoggerNameLevelRewritePolicy You can use this policy to make loggers in third party code less chatty by changing event levels. The LoggerNameLevelRewritePolicy will rewrite @@ -1712,7 +1746,7 @@ The following configuration shows a RewriteAppender configured to map level INFO to DEBUG and level WARN to INFO for all loggers that start with `com.foo.bar`. -[source,prettyprint,linenums] +[source,xml] ---- @@ -1808,7 +1842,7 @@ allows specifying a padding, like %3i for space-padding the counter to 3 digits or (usually more useful) %03i for zero-padding the counter to 3 digits. The pattern also supports interpolation at runtime so any of the Lookups (such as the -link:./lookups.html#DateLookup[DateLookup]) can be included in the +xref:manual/lookups.adoc#DateLookup[DateLookup]) can be included in the pattern. |immediateFlush |boolean a| @@ -1882,10 +1916,7 @@ file attribute view. [#TriggeringPolicies] == TriggeringPolicies -[#Triggering] -===== Triggering Policies - -Composite Triggering Policy +=== Composite Triggering Policy The `CompositeTriggeringPolicy` combines multiple triggering policies and returns true if any of the configured policies return true. The @@ -1896,7 +1927,7 @@ For example, the following XML fragment defines policies that rollover the log when the JVM starts, when the log size reaches twenty megabytes, and when the current date no longer matches the log’s start date. -[source,prettyprint,linenums] +[source,xml] ---- @@ -1905,7 +1936,7 @@ and when the current date no longer matches the log’s start date. ---- -Cron Triggering Policy +=== Cron Triggering Policy The `CronTriggeringPolicy` triggers rollover based on a cron expression. This policy is controlled by a timer and is asynchronous to processing log events, so it is possible that log events @@ -1919,7 +1950,7 @@ overwritten on each rollover. |Parameter Name |Type |Description |schedule |String |The cron expression. The expression is the same as what is allowed in the Quartz scheduler. See -link:../log4j-core/apidocs/org/apache/logging/log4j/core/util/CronExpression.html[CronExpression] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/util/CronExpression.html[CronExpression] for a full description of the expression. |evaluateOnStartup |boolean |On startup the cron expression will be @@ -1928,7 +1959,7 @@ expression indicates a rollover should have occurred between that time and the current time the file will be immediately rolled over. |======================================================================= -OnStartup Triggering Policy +=== OnStartup Triggering Policy The `OnStartupTriggeringPolicy` policy causes a rollover if the log file is older than the current JVM's start time and the minimum file size is @@ -1951,7 +1982,7 @@ Log4J cannot determine JVM start time with `java.lang.management.ManagementFactory.getRuntimeMXBean().getStartTime()` and falls back to Log4J initialization time instead.) -SizeBased Triggering Policy +=== SizeBased Triggering Policy The `SizeBasedTriggeringPolicy` causes a rollover once the file has reached the specified size. The size can be specified in bytes, with the suffix KB, MB, GB, or TB for example `20MB`. @@ -1962,7 +1993,7 @@ otherwise the target file will be overwritten on every rollover as the SizeBased will not cause the timestamp value in the file name to change. When used without a time based triggering policy the SizeBased Triggering Policy will cause the timestamp value to change. -TimeBased Triggering Policy +=== TimeBased Triggering Policy The `TimeBasedTriggeringPolicy` causes a rollover once the date/time pattern no longer applies to the active file. This policy accepts an @@ -1994,11 +2025,8 @@ load of doing so across time. [#RolloverStrategies] == RolloverStrategies -[#Rollover] -===== Rollover Strategies - [#DefaultRolloverStrategy] -== DefaultRolloverStrategy +=== DefaultRolloverStrategy Default Rollover Strategy @@ -2103,7 +2131,7 @@ archived log file during compression. |======================================================================= [#DirectWriteRolloverStrategy] -== DirectWriteRolloverStrategy +=== DirectWriteRolloverStrategy DirectWrite Rollover Strategy @@ -2143,7 +2171,7 @@ both the time and size based triggering policies, will create up to 7 archives on the same day (1-7) that are stored in a directory based on the current year and month, and will compress each archive using gzip: -[source,prettyprint,linenums] +[source,xml] ---- @@ -2170,7 +2198,7 @@ the current year and month, and will compress each archive using gzip: This second example shows a rollover strategy that will keep up to 20 files before removing them. -[source,prettyprint,linenums] +[source,xml] ---- @@ -2201,7 +2229,7 @@ archives on the same day (1-7) that are stored in a directory based on the current year and month, and will compress each archive using gzip and will roll every 6 hours when the hour is divisible by 6: -[source,prettyprint,linenums] +[source,xml] ---- @@ -2230,7 +2258,7 @@ and size based triggering policies, and writes directly to an unlimited number of archive files. The cron trigger causes a rollover every hour while the file size is limited to 250MB: -[source,prettyprint,linenums] +[source,xml] ---- @@ -2256,7 +2284,7 @@ while the file size is limited to 250MB: This sample configuration is the same as the previous but limits the number of files saved each hour to 10: -[source,prettyprint,linenums] +[source,xml] ---- @@ -2281,7 +2309,7 @@ number of files saved each hour to 10: ---- [#CustomDeleteOnRollover] -== CustomDeleteOnRollover +=== CustomDeleteOnRollover Log Archive Retention Policy: Delete on Rollover @@ -2313,12 +2341,12 @@ default is 1, meaning only the files in the specified base directory. false. |testMode |boolean |If true, files are not deleted but instead a message -is printed to the link:configuration.html#StatusMessages[status logger] +is printed to the xref:manual/configuration.adoc#StatusMessages[status logger] at INFO level. Use this to do a dry run to test if the configuration works as expected. Default is false. |pathSorter |PathSorter |A plugin implementing the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/appender/rolling/action/PathSorter.html[PathSorter] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/appender/rolling/action/PathSorter.html[PathSorter] interface to sort the files before selecting the files to delete. The default is to sort most recently modified files first. @@ -2343,7 +2371,7 @@ expression] or a https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystem.html#getPathMatcher(java.lang.String)[glob]. * link:#DeleteIfLastModified[IfLastModified] - accepts files that are as old as or older than the specified -link:../log4j-core/apidocs/org/apache/logging/log4j/core/appender/rolling/action/Duration.html#parse(CharSequence)[duration]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/appender/rolling/action/Duration.html#parse(CharSequence)[duration]. * link:#DeleteIfAccumulatedFileCount[IfAccumulatedFileCount] - accepts paths after some count threshold is exceeded during the file tree walk. * link:#DeleteIfAccumulatedFileSize[IfAccumulatedFileSize] - accepts @@ -2362,7 +2390,7 @@ specifying a script. The ScriptCondition should contain a link:#ScriptCondition[Script, ScriptRef or ScriptFile] element that specifies the logic to be -executed. (See also the link:filters.html#Script[ScriptFilter] +executed. (See also the xref:manual/filters.adoc#Script[ScriptFilter] documentation for more examples of configuring ScriptFiles and ScriptRefs.) @@ -2406,7 +2434,7 @@ the path name matches). |======================================================================= |Parameter Name |Type |Description |age |String |_Required._ Specifies a -link:../log4j-core/apidocs/org/apache/logging/log4j/core/appender/rolling/action/Duration.html#parse(CharSequence)[duration]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/appender/rolling/action/Duration.html#parse(CharSequence)[duration]. The condition accepts files that are as old or older than the specified duration. @@ -2458,7 +2486,7 @@ Archives are stored in a directory based on the current year and month. All files under the base directory that match the "*/app-*.log.gz" glob and are 60 days old or older are deleted at rollover time. -[source,prettyprint,linenums] +[source,xml] ---- @@ -2495,7 +2523,7 @@ delete files that match "*/app-*.log.gz" and are 30 days old or older, but keep the most recent 100 GB or the most recent 10 files, whichever comes first. -[source,prettyprint,linenums] +[source,xml] ---- @@ -2547,7 +2575,7 @@ comes first. specifies the logic to be executed. The script is passed a list of paths found under the base path and must return the paths to delete as a `java.util.List`. See also the -link:filters.html#Script[ScriptFilter] documentation for an example of +xref:manual/filters.adoc#Script[ScriptFilter] documentation for an example of how ScriptFiles and ScriptRefs can be configured. |======================================================================= @@ -2585,7 +2613,7 @@ The script returns a list of rolled over files under the base directory dated Friday the 13th. The Delete action will delete all files returned by the script. -[source,prettyprint,linenums] +[source,xml] ---- @@ -2710,7 +2738,7 @@ Below is a sample configuration that uses a RollingFileAppender and defines different POSIX file attribute view for current and rolled log files. -[source,prettyprint,linenums] +[source,xml] ---- @@ -2749,7 +2777,7 @@ buffered (this cannot be switched off) and internally it uses a `ByteBuffer + RandomAccessFile` instead of a `BufferedOutputStream`. We saw a 20-200% performance improvement compared to RollingFileAppender with "bufferedIO=true" in our -link:../performance.html#whichAppender[measurements]. The +xref:manual/performance.adoc#whichAppender[measurements]. The RollingRandomAccessFileAppender writes to the File named in the fileName parameter and rolls the file over according the TriggeringPolicy and the RolloverPolicy. Similar to the RollingFileAppender, @@ -2795,7 +2823,7 @@ a date/time pattern compatible with https://download.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html[`SimpleDateFormat`] and/or a %i which represents an integer counter. The pattern also supports interpolation at runtime so any of the Lookups (such as the -link:./lookups.html#DateLookup[DateLookup] can be included in the +xref:manual/lookups.adoc#DateLookup[DateLookup] can be included in the pattern. |immediateFlush |boolean a| @@ -2862,19 +2890,11 @@ file attribute view. |======================================================================= -[#FRFA_TriggeringPolicies] -== FRFA_TriggeringPolicies - -[#Triggering] -===== Triggering Policies - -See link:#TriggeringPolicies[RollingFileAppender Triggering Policies]. +=== Triggering Policies -[#FRFA_RolloverStrategies] -== FRFA_RolloverStrategies +See xref:#TriggeringPolicies[RollingFileAppender Triggering Policies]. -[#Rollover] -===== Rollover Strategies +=== Rollover Strategies See link:#RolloverStrategies[RollingFileAppender Rollover Strategies]. @@ -2884,7 +2904,7 @@ triggering policies, will create up to 7 archives on the same day (1-7) that are stored in a directory based on the current year and month, and will compress each archive using gzip: -[source,prettyprint,linenums] +[source,xml] ---- @@ -2911,7 +2931,7 @@ will compress each archive using gzip: This second example shows a rollover strategy that will keep up to 20 files before removing them. -[source,prettyprint,linenums] +[source,xml] ---- @@ -2943,7 +2963,7 @@ that are stored in a directory based on the current year and month, and will compress each archive using gzip and will roll every 6 hours when the hour is divisible by 6: -[source,prettyprint,linenums] +[source,xml] ---- @@ -3025,7 +3045,7 @@ default route on Windows and "ServiceOther" on all other operating systems. Note that the List Appender is one of our test appenders, any appender can be used, it is only used as a shorthand. -[source,prettyprint,linenums] +[source,xml] ---- @@ -3053,7 +3073,7 @@ appender can be used, it is only used as a shorthand. ---- [#Routes] -===== Routes +=== Routes The Routes element accepts a single attribute named "pattern". The pattern is evaluated against all the registered Lookups and the result @@ -3094,7 +3114,7 @@ Script. In this example, the script runs for each log event and picks a route based on the presence of a Marker named "AUDIT". -[source,prettyprint,linenums] +[source,xml] ---- @@ -3141,7 +3161,7 @@ based on the presence of a Marker named "AUDIT". ---- [#Purge] -===== Purge Policy +=== Purge Policy The RoutingAppender can be configured with a PurgePolicy whose purpose is to stop and remove dormant Appenders that have been dynamically @@ -3159,7 +3179,7 @@ RollingFileAppender that captures only the specific event type. Note that the AuditAppender was predefined while the RollingFileAppenders are created as needed. -[source,prettyprint,linenums] +[source,xml] ---- @@ -3209,7 +3229,7 @@ appender name is recorded under the name of the `ScriptAppenderSelector`, not the name of the selected appender, in this example, "SelectIt". -[source,prettyprint,linenums] +[source,xml] ---- @@ -3305,7 +3325,7 @@ Appender in a link:#FailoverAppender[FailoverAppender]. This is an unsecured TCP configuration: -[source,prettyprint,linenums] +[source,xml] ---- @@ -3324,7 +3344,7 @@ This is an unsecured TCP configuration: This is a secured link:#SSL[SSL] configuration: -[source,prettyprint,linenums] +[source,xml] ---- @@ -3370,7 +3390,7 @@ counterparty. Determines whether the remote authentication credentials |======================================================================= [#KeyStore] -===== KeyStore +=== KeyStore The keystore is meant to contain your private keys and certificates, and determines which authentication credentials to send to the remote host. @@ -3404,7 +3424,7 @@ algorithms]. |======================================================================= [#TrustStore] -===== TrustStore +=== TrustStore The trust store is meant to contain the CA certificates you are willing to trust when a remote party presents its certificate. Determines @@ -3444,16 +3464,14 @@ algorithms]. |======================================================================= [#Example] -===== Example +=== Example -[source,prettyprint,linenums] +[source,xml] ---- - ... - - - - - ... + + + + ---- [#SyslogAppender] diff --git a/src/site/asciidoc/manual/architecture.adoc b/src/site/antora/modules/ROOT/pages/manual/architecture.adoc similarity index 92% rename from src/site/asciidoc/manual/architecture.adoc rename to src/site/antora/modules/ROOT/pages/manual/architecture.adoc index e6ab20f2f32..02b4d24c97d 100644 --- a/src/site/asciidoc/manual/architecture.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/architecture.adoc @@ -21,7 +21,7 @@ Ralph Goers Log4j uses the classes shown in the diagram below. -image:../images/Log4jClasses.jpg[Log4j 2 Class Relationships,title="Log4j 2 Class Relationships"] +image:Log4jClasses.jpg[Log4j 2 Class Relationships,title="Log4j 2 Class Relationships"] Applications using the Log4j 2 API will request a Logger with a specific name from the LogManager. The LogManager will locate the appropriate @@ -79,24 +79,24 @@ Logger logger = LogManager.getRootLogger(); ---- All other Loggers can be retrieved using the -link:../log4j-api/apidocs/org/apache/logging/log4j/LogManager.html#getLogger(java.lang.String)[`LogManager.getLogger`] +link:../javadoc/log4j-api/org/apache/logging/log4j/LogManager.html#getLogger(java.lang.String)[`LogManager.getLogger`] static method by passing the name of the desired Logger. Further information on the Logging API can be found in the -link:../log4j-api/api.html[Log4j 2 API]. +xref:manual/api.adoc[Log4j API]. === LoggerContext The -link:../log4j-core/apidocs/org/apache/logging/log4j/core/LoggerContext.html[`LoggerContext`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/LoggerContext.html[`LoggerContext`] acts as the anchor point for the Logging system. However, it is possible to have multiple active LoggerContexts in an application depending on the circumstances. More details on the LoggerContext are in the -link:logsep.html[Log Separation] section. +xref:manual/logsep.adoc[Log Separation] section. === Configuration Every LoggerContext has an active -link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/Configuration.html[`Configuration`]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/config/Configuration.html[`Configuration`]. The Configuration contains all the Appenders, context-wide Filters, LoggerConfigs and contains the reference to the StrSubstitutor. During reconfiguration two Configuration objects will exist. Once all Loggers @@ -106,10 +106,10 @@ will be stopped and discarded. === Logger As stated previously, Loggers are created by calling -link:../log4j-api/apidocs/org/apache/logging/log4j/LogManager.html#getLogger(java.lang.String)[`LogManager.getLogger`]. +link:../javadoc/log4j-api/org/apache/logging/log4j/LogManager.html#getLogger(java.lang.String)[`LogManager.getLogger`]. The Logger itself performs no direct actions. It simply has a name and is associated with a LoggerConfig. It extends -link:../log4j-api/apidocs/org/apache/logging/log4j/spi/AbstractLogger.html[`AbstractLogger`] +link:../javadoc/log4j-api/org/apache/logging/log4j/spi/AbstractLogger.html[`AbstractLogger`] and implements the required methods. As the configuration is modified Loggers may become associated with a different LoggerConfig, thus causing their behavior to be modified. @@ -131,7 +131,7 @@ Logger y = LogManager.getLogger("wombat"); Configuration of the log4j environment is typically done at application initialization. The preferred way is by reading a configuration file. -This is discussed in link:configuration.html[Configuration]. +This is discussed in xref:manual/configuration.adoc[Configuration]. Log4j makes it easy to name Loggers by _software component_. This can be accomplished by instantiating a Logger in each class, with the logger @@ -153,7 +153,7 @@ seems to be the best strategy known so far. === LoggerConfig -link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/LoggerConfig.html[`LoggerConfig`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/config/LoggerConfig.html[`LoggerConfig`] objects are created when Loggers are declared in the logging configuration. The LoggerConfig contains a set of Filters that must allow the LogEvent to pass before it will be passed to any Appenders. It @@ -163,11 +163,11 @@ process the event. ==== Log Levels LoggerConfigs will be assigned a Log -link:../log4j-api/apidocs/org/apache/logging/log4j/Level.html[`Level`]. +link:../javadoc/log4j-api/org/apache/logging/log4j/Level.html[`Level`]. The set of built-in levels includes ALL, TRACE, DEBUG, INFO, WARN, ERROR, -FATAL, and OFF. Log4j 2 also supports link:customloglevels.html[custom log +FATAL, and OFF. Log4j 2 also supports xref:manual/customloglevels.adoc[custom log levels]. Another mechanism for getting more granularity is to use -link:../log4j-api/api.html#Markers[Markers] instead. The OFF and ALL +xref:manual/markers.adoc[markers] instead. The OFF and ALL levels are not intended to be used on calls to the logging API. Specifying OFF in the configuration implies no logging events should match while specifying ALL would mean all events match, including custom @@ -313,7 +313,7 @@ for further processing (Yes) or discarded (No). In addition to the automatic log Level filtering that takes place as described in the previous section, Log4j provides -link:../log4j-core/apidocs/org/apache/logging/log4j/core/Filter.html[`Filter`]s +link:../javadoc/log4j-core/org/apache/logging/log4j/core/Filter.html[`Filter`]s that can be applied before control is passed to any LoggerConfig, after control is passed to a LoggerConfig but before calling any Appenders, after control is passed to a LoggerConfig but before calling a specific @@ -337,15 +337,15 @@ The ability to selectively enable or disable logging requests based on their logger is only part of the picture. Log4j allows logging requests to print to multiple destinations. In log4j speak, an output destination is called an -link:../log4j-core/apidocs/org/apache/logging/log4j/core/Appender.html[`Appender`]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/Appender.html[`Appender`]. Currently, appenders exist for the console, files, remote socket servers, Apache Flume, remote UNIX Syslog daemons, and various -database APIs. See the section on link:appenders.html[Appenders] for +database APIs. See the section on xref:manual/appenders.adoc[Appenders] for more details on the various types available. More than one Appender can be attached to a Logger. An Appender can be added to a Logger by calling the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/Configuration.html#addLoggerAppender(org.apache.logging.log4j.core.Logger,%20org.apache.logging.log4j.core.Appender)[`addLoggerAppender`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/config/Configuration.html#addLoggerAppender(org.apache.logging.log4j.core.Logger,%20org.apache.logging.log4j.core.Appender)[`addLoggerAppender`] method of the current Configuration. If a LoggerConfig matching the name of the Logger does not exist, one will be created, the Appender will be attached to it and then all Loggers will be notified to update their @@ -426,11 +426,11 @@ The table below shows an example: More often than not, users wish to customize not only the output destination but also the output format. This is accomplished by associating a -link:../log4j-core/apidocs/org/apache/logging/log4j/core/Layout.html[`Layout`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/Layout.html[`Layout`] with an Appender. The Layout is responsible for formatting the LogEvent according to the user's wishes, whereas an appender takes care of sending the formatted output to its destination. The -link:../log4j-core/apidocs/org/apache/logging/log4j/core/layout/PatternLayout.html[`PatternLayout`], +link:../javadoc/log4j-core/org/apache/logging/log4j/core/layout/PatternLayout.html[`PatternLayout`], part of the standard log4j distribution, lets the user specify the output format according to conversion patterns similar to the C language `printf` function. @@ -448,7 +448,7 @@ third field is the level of the log statement. The fourth field is the name of the logger associated with the log request. The text after the '-' is the message of the statement. -Log4j comes with many different link:layouts.html[Layouts] for various +Log4j comes with many different xref:manual/layouts.adoc[Layouts] for various use cases such as JSON, XML, HTML, and Syslog (including the new RFC 5424 version). Other appenders such as the database connectors fill in specified fields instead of a particular textual layout. @@ -463,13 +463,13 @@ appropriate byte array when required. === StrSubstitutor and StrLookup The -link:../log4j-core/apidocs/org/apache/logging/log4j/core/lookup/StrSubstitutor.html[`StrSubstitutor`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/lookup/StrSubstitutor.html[`StrSubstitutor`] class and -link:../log4j-core/apidocs/org/apache/logging/log4j/core/lookup/StrLookup.html[`StrLookup`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/lookup/StrLookup.html[`StrLookup`] interface were borrowed from https://commons.apache.org/proper/commons-lang/[Apache Commons Lang] and then modified to support evaluating LogEvents. In addition the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/lookup/Interpolator.html[`Interpolator`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/lookup/Interpolator.html[`Interpolator`] class was borrowed from Apache Commons Configuration to allow the StrSubstitutor to evaluate variables that from multiple StrLookups. It too was modified to support evaluating LogEvents. Together these provide @@ -477,5 +477,5 @@ a mechanism to allow the configuration to reference variables coming from System Properties, the configuration file, the ThreadContext Map, StructuredData in the LogEvent. The variables can either be resolved when the configuration is processed or as each event is processed, if -the component is capable of handling it. See link:lookups.html[Lookups] +the component is capable of handling it. See xref:manual/lookups.adoc[Lookups] for more information. diff --git a/src/site/asciidoc/manual/async.adoc b/src/site/antora/modules/ROOT/pages/manual/async.adoc similarity index 94% rename from src/site/asciidoc/manual/async.adoc rename to src/site/antora/modules/ROOT/pages/manual/async.adoc index 679ff85e127..fdcece779c9 100644 --- a/src/site/asciidoc/manual/async.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/async.adoc @@ -83,18 +83,18 @@ state of the `myObject` parameter at the time of the call to `logger.debug()`. The log message will not change even if `myObject` is modified later. It is safe to asynchronously log mutable objects because most -link:../log4j-api/apidocs/org/apache/logging/log4j/message/Message.html[`Message`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/Message.html[`Message`] implementations built-in to Log4j take a snapshot of the parameters. There are some exceptions however: -link:../log4j-api/apidocs/org/apache/logging/log4j/message/MapMessage.html[`MapMessage`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/MapMessage.html[`MapMessage`] and -link:../log4j-api/apidocs/org/apache/logging/log4j/message/StructuredDataMessage.html[`StructuredDataMessage`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/StructuredDataMessage.html[`StructuredDataMessage`] are mutable by design: fields can be added to these messages after the message object was created. These messages should not be modified after they are logged with asynchronous loggers or asynchronous appenders; you may or may not see the modifications in the resulting log output. Similarly, custom -link:../log4j-api/apidocs/org/apache/logging/log4j/message/Message.html[`Message`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/Message.html[`Message`] implementations should be designed with asynchronous use in mind, and either take a snapshot of their parameters at construction time, or document their thread-safety characteristics. @@ -105,7 +105,7 @@ another thread is not likely to give better performance. is faster than the maximum sustained throughput of the underlying appender, the queue will fill up and the application will end up logging at the speed of the slowest appender. If this happens, consider -selecting a link:../performance.html#whichAppender[faster appender], or +selecting a xref:manual/performance.adoc#whichAppender[faster appender], or logging less. If neither of these is an option, you may get better throughput and fewer latency spikes by logging synchronously. @@ -179,7 +179,7 @@ of the application. NOTE: System properties were renamed into a more consistent style in Log4j 2.10.0. All old property names are still supported which are -documented link:configuration.html#SystemProperties[here]. +documented xref:manual/configuration.adoc#SystemProperties[here]. [[SysPropsAllAsync]] @@ -211,7 +211,7 @@ system. When the application is logging faster than the underlying appender can keep up with for a long enough time to fill up the queue, the behaviour is determined by the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/async/AsyncQueueFullPolicy.html[AsyncQueueFullPolicy]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/async/AsyncQueueFullPolicy.html[AsyncQueueFullPolicy]. |[[asyncLoggerWaitStrategy]]log4j2.asyncLoggerWaitStrategy |`Timeout` @@ -298,7 +298,7 @@ There are also a few system properties that can be used to maintain application throughput even when the underlying appender cannot keep up with the logging rate and the queue is filling up. See the details for system properties -link:configuration.html#asyncQueueFullPolicy[`log4j2.asyncQueueFullPolicy` +xref:manual/configuration.adoc#asyncQueueFullPolicy[`log4j2.asyncQueueFullPolicy` and `log4j2.discardThreshold`]. [#MixedSync-Async] @@ -365,7 +365,7 @@ of the application. NOTE: All system properties were renamed into a more consistent style in Log4j 2.10. All old property names are still supported which are -documented link:configuration.html#SystemProperties[here]. +documented xref:manual/configuration.adoc#SystemProperties[here]. [[SysPropsMixedSync-Async]] @@ -395,7 +395,7 @@ system. When the application is logging faster than the underlying appender can keep up with for a long enough time to fill up the queue, the behavious is determined by the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/async/AsyncQueueFullPolicy.html[AsyncQueueFullPolicy]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/async/AsyncQueueFullPolicy.html[AsyncQueueFullPolicy]. |[[asyncLoggerConfigWaitStrategy]]log4j2.asyncLoggerConfigWaitStrategy |`Timeout` @@ -451,7 +451,7 @@ There are also a few system properties that can be used to maintain application throughput even when the underlying appender cannot keep up with the logging rate and the queue is filling up. See the details for system properties -link:configuration.html#asyncQueueFullPolicy[`log4j2.asyncQueueFullPolicy` +xref:manual/configuration.adoc#asyncQueueFullPolicy[`log4j2.asyncQueueFullPolicy` and `log4j2.discardThreshold`]. [#WaitStrategy] @@ -509,12 +509,12 @@ WaitStrategy-related system properties are ignored if a `AsyncWaitStrategyFactor == Location, location, location... If one of the layouts is configured with a location-related attribute -like HTML link:layouts.html#HtmlLocationInfo[locationInfo], or one of -the patterns link:layouts.html#PatternClass[%C or $class], -link:layouts.html#PatternFile[%F or %file], -link:layouts.html#PatternLocation[%l or %location], -link:layouts.html#PatternLine[%L or %line], -link:layouts.html#PatternMethod[%M or %method], Log4j will take a +like HTML xref:manual/layouts.adoc#HtmlLocationInfo[locationInfo], or one of +the patterns xref:manual/layouts.adoc#PatternClass[%C or $class], +xref:manual/layouts.adoc#PatternFile[%F or %file], +xref:manual/layouts.adoc#PatternLocation[%l or %location], +xref:manual/layouts.adoc#PatternLine[%L or %line], +xref:manual/layouts.adoc#PatternMethod[%M or %method], Log4j will take a snapshot of the stack, and walk the stack trace to find the location information. @@ -526,7 +526,7 @@ be taken. However, asynchronous loggers need to make this decision before passing the log message to another thread; the location information will be lost after that point. The -link:../performance.html#asyncLoggingWithLocation[performance impact] of +xref:manual/performance.adoc#asyncLoggingWithLocation[performance impact] of taking a stack trace snapshot is even higher for asynchronous loggers: logging with location is 30-100 times slower than without location. For this reason, asynchronous loggers and asynchronous appenders do not @@ -567,7 +567,7 @@ whereas both synchronous loggers and asynchronous appenders have more or less constant throughput regardless of the number of threads that are doing the logging. -image:../images/async-vs-sync-throughput.png[Async loggers have much +image:async-vs-sync-throughput.png[Async loggers have much higher throughput than sync loggers.] === Asynchronous Throughput Comparison with Other Logging Packages @@ -580,7 +580,7 @@ all threads together remains roughly constant when adding more threads. Asynchronous loggers make more effective use of the multiple cores available on the machine in multi-threaded scenarios. -image:../images/async-throughput-comparison.png[Async loggers have the +image:async-throughput-comparison.png[Async loggers have the highest throughput.] On Solaris 10 (64bit) with JDK1.7.0_06, 4-core Xeon X5570 dual CPU @@ -651,7 +651,7 @@ threads This section has been rewritten with the Log4j 2.6 release. The previous version only reported _service time_ instead of _response -time_. See the link:../performance.html#responseTime[response time] side +time_. See the xref:manual/performance.adoc#responseTime[response time] side bar on the performance page on why this is too optimistic. Furthermore the previous version reported average latency, which does not make sense since latency is not a normal distribution. Finally, the previous @@ -665,7 +665,7 @@ his http://www.infoq.com/presentations/latency-response-time[How NOT to measure latency] presentation. (Now we know why this is also known as the "Oh s#@t!" presentation.) -link:../performance.html#responseTime[Response time] is how long it +xref:manual/performance.adoc#responseTime[Response time] is how long it takes to log a message under a certain load. What is often reported as latency is actually _service time_: how long it took to perform the operation. This hides the fact that a single spike in service time adds @@ -698,7 +698,7 @@ threads (each logging at a rate of 8,000 messages per second), we see that Logback 1.1.7, Log4j 1.2.17 experience latency spikes that are orders of magnitude larger than Log4j 2. -image:../images/ResponseTimeAsyncLogging16Threads@8kEach.png[When 16 +image:ResponseTimeAsyncLogging16Threads_8kEach.png[When 16 threads generate a total workload of 128,000 msg/sec, Logback 1.1.7 and Log4j 1.2.17 experience latency spikes that are orders of magnitude larger than Log4j 2] @@ -706,10 +706,10 @@ larger than Log4j 2] The graph below zooms in on the Log4j 2 results for the same test. We see that the worst-case response time is highest for the ArrayBlockingQueue-based Async Appender. -link:garbagefree.html[Garbage-free] async loggers have the best response +xref:manual/garbagefree.adoc[Garbage-free] async loggers have the best response time behaviour. -image:../images/ResponseTimeAsyncLogging16Threads@8kEachLog4j2Only-labeled.png[image] +image:ResponseTimeAsyncLogging16Threads_8kEachLog4j2Only-labeled.png[image] [#UnderTheHood] == Under The Hood diff --git a/src/site/asciidoc/manual/cloud.adoc b/src/site/antora/modules/ROOT/pages/manual/cloud.adoc similarity index 82% rename from src/site/asciidoc/manual/cloud.adoc rename to src/site/antora/modules/ROOT/pages/manual/cloud.adoc index a7e1f8a1c20..1bc57562730 100644 --- a/src/site/asciidoc/manual/cloud.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/cloud.adoc @@ -66,7 +66,7 @@ https://logging.apache.org/log4j/2.x/manual/lookups.html#DockerLookup[Docker Loo As discussed above, this is the recommended 12-Factor approach for applications running in a docker container. The Log4j team does not recommend this approach for performance reasons. -image::../images/DockerStdout.png[Stdout, "Application Logging to the Standard Output Stream"] +image:DockerStdout.png[Stdout, "Application Logging to the Standard Output Stream"] === Logging to the Standard Output Stream with the Docker Fluentd Logging Driver @@ -78,45 +78,41 @@ When routing to a log forwarder it is expected that the forwarder will have the application. If the forwarder should fail the management tools would be expected to also terminate other containers dependent on the forwarder. -image::../images/DockerFluentd.png[Docker Fluentbit, "Logging via StdOut using the Docker Fluentd Logging Driver to Fluent-bit"] +image:DockerFluentd.png[Docker Fluentbit, "Logging via StdOut using the Docker Fluentd Logging Driver to Fluent-bit"] As an alternative the logging drivers could be configured to route events directly to a logging aggregator. This is generally not a good idea as the logging drivers only allow a single host and port to be configured. The docker documentation isn't clear but infers that log events will be dropped when log events cannot be delivered so this method should not be used if a highly available solution is required. -image::../images/DockerFluentdAggregator.png[Docker Fluentd, "Logging via StdOut using the Docker Fluentd Logging Driver to Fluentd"] +image:DockerFluentdAggregator.png[Docker Fluentd, "Logging via StdOut using the Docker Fluentd Logging Driver to Fluentd"] === Logging to a File -While this is not the recommended 12-Factor approach, it performs very well. However, it requires that the -application declares a volume where the log files will reside and then configures the log forwarder to tail -those files. Care must also be taken to automatically manage the disk space used for the logs, which Log4j -can perform via the "Delete" action on the https://logging.apache.org/log4j/2.x/manual/appenders.html#RollingFileAppender[RollingFileAppender]. +While this is not the recommended 12-Factor approach, it performs very well. +However, it requires that the application declares a volume where the log files will reside and then configures the log forwarder to tail those files. +Care must also be taken to automatically manage the disk space used for the logs, which Log4j can perform via the "Delete" action on the xref:manual/appenders.adoc#RollingFileAppender[RollingFileAppender]. -image::../images/DockerLogFile.png[File, "Logging to a File"] +image:DockerLogFile.png[File, "Logging to a File"] === Sending Directly to a Log Forwarder via TCP -Sending logs directly to a Log Forwarder is simple as it generally just requires that the forwarder's -host and port be configured on a SocketAppender with an appropriate layout. +Sending logs directly to a Log Forwarder is simple as it generally just requires that the forwarder's host and port be configured on a SocketAppender with an appropriate layout. -image::../images/DockerTCP.png[TCP, "Application Logging to a Forwarder via TCP"] +image:DockerTCP.png[TCP, "Application Logging to a Forwarder via TCP"] === Sending Directly to a Log Aggregator via TCP -Similar to sending logs to a forwarder, logs can also be sent to a cluster of aggregators. However, -setting this up is not as simple since, to be highly available, a cluster of aggregators must be used. -However, the SocketAppender currently can only be configured with a single host and port. To allow -for failover if the primary aggregator fails the SocketAppender must be enclosed in a -https://logging.apache.org/log4j/2.x/manual/appenders.html#FailoverAppender[FailoverAppender], -which would also have the secondary aggregator configured. Another option is to have the SocketAppender -point to a highly available proxy that can forward to the Log Aggregator. +Similar to sending logs to a forwarder, logs can also be sent to a cluster of aggregators. +However, setting this up is not as simple since, to be highly available, a cluster of aggregators must be used. +However, the SocketAppender currently can only be configured with a single host and port. +To allow for failover if the primary aggregator fails the SocketAppender must be enclosed in a xref:manual/appenders.adoc#FailoverAppender[FailoverAppender], which would also have the secondary aggregator configured. +Another option is to have the SocketAppender point to a highly available proxy that can forward to the Log Aggregator. If the log aggregator used is Apache Flume (or similar) the Appenders for these support being configured with a list of hosts and ports so high availability is not an issue. -image::../images/LoggerAggregator.png[Aggregator, "Application Logging to an Aggregator via TCP"] +image:LoggerAggregator.png[Aggregator, "Application Logging to an Aggregator via TCP"] [#ELK] == Logging using Elasticsearch, Logstash, and Kibana @@ -128,6 +124,7 @@ events first to Logstash and then to Elasticsearch. === Log4j Configuration ==== JsonTemplateLayout + Log4j provides a multitude of JSON generating layouts. In particular, JSON Template Layout allows full schema customization and bundles ELK-specific layouts by default, which makes it a @@ -253,9 +250,8 @@ The logging configuration to use this template would be The significant difference with this configuration from the first example is that it references the custom template and it specifies an event delimiter of a null character ('\0'); -**Note**: The level being passed with the above template does not strictly conform to the GELF spec as the -Level being passed is the Log4j Level NOT the Level defined in the GELF spec. However, testing has shown -that Logstash, Elk, and Kibana are pretty tolerant of whatever data is passed to it. +NOTE: The level being passed with the above template does not strictly conform to the GELF spec as the Level being passed is the Log4j Level NOT the Level defined in the GELF spec. +However, testing has shown that Logstash, Elk, and Kibana are pretty tolerant of whatever data is passed to it. ==== Custom Template @@ -264,7 +260,7 @@ below is loosely based on ECS but a) adds the spring boot application name, b) f using PatternLayout, formats Map Messages as event.data attributes while setting the event action based on any Marker included in the event, includes all the ThreadContext attributes. -**Note**: The Json Template Layout escapes control sequences so messages that contain '\n' will have those +NOTE: The Json Template Layout escapes control sequences so messages that contain '\n' will have those control sequences copied as "\n" into the text rather than converted to a newline character. This bypasses many problems that occur with Log Forwarders such as Filebeat and FluentBit/Fluentd. Kibana will correctly interpret these sequences as newlines and display them correctly. Also note that the message pattern does @@ -448,19 +444,26 @@ filebeat.inputs: === Kibana Using the EnhancedGelf template or the custom template, the above configurations will allow the message -field to contain a fully formatted log event. The ThreadContext attributes, custom fields, thread name, etc., will all be available as attributes on each log event that can be used for filtering. The result will resemble: - -image::../images/kibana.png[Kibana, "Kibana Display"] +field to contain a fully formatted log event. The ThreadContext attributes, custom fields, thread name, etc., will all be available as attributes on each log event that can be used for filtering. == Managing Logging Configuration -Spring Boot provides another least common denominator approach to logging configuration. It will let you set the log level for various Loggers within an application which can be dynamically updated via REST endpoints provided by Spring. While this works in a lot of cases it does not support any of the more advanced filtering features of Log4j. For example, since it cannot add or modify any Filters other than the log level of a logger, changes cannot be made to allow all log events for a specific user or customer to temporarily be logged (see DynamicThresholdFilter or ThreadContextMapFilter) or any other kinds of changes to filters. Also, in a microservices, clustered environment it is quite likely that these changes will need to be propagated to multiple servers at the same time. Trying to achieve this via REST calls could be difficult. +Spring Boot provides another least common denominator approach to logging configuration. +It will let you set the log level for various Loggers within an application which can be dynamically updated via REST endpoints provided by Spring. +While this works in a lot of cases it does not support any of the more advanced filtering features of Log4j. +For example, since it cannot add or modify any Filters other than the log level of a logger, changes cannot be made to allow all log events for a specific user or customer to temporarily be logged (see xref:manual/filters.adoc#DynamicThresholdFilter[DynamicThresholdFilter] or xref:manual/filters.adoc#ThreadContextMapFilter[ThreadContextMapFilter]) or any other kinds of changes to filters. +Also, in a microservices, clustered environment it is quite likely that these changes will need to be propagated to multiple servers at the same time. +Trying to achieve this via REST calls could be difficult. -Since its first release Log4j has supported reconfiguration through a file. Beginning with Log4j 2.12.0 Log4j also supports accessing the configuration via HTTP(S) and monitoring the file for changes by using the HTTP “If-Modified-Since” header. A patch has also been integrated into Spring Cloud Config starting with versions 2.0.3 and 2.1.1 for it to honor the If-Modified-Since header. In addition, the log4j-spring-cloud-config project will listen for update events published by Spring Cloud Bus and then verify that the configuration file has been modified, so polling via HTTP is not required. +Since its first release Log4j has supported reconfiguration through a file. +Beginning with Log4j 2.12.0 Log4j also supports accessing the configuration via HTTP(S) and monitoring the file for changes by using the HTTP "If-Modified-Since" header. +A patch has also been integrated into Spring Cloud Config starting with versions 2.0.3 and 2.1.1 for it to honor the If-Modified-Since header. +In addition, the log4j-spring-cloud-config project will listen for update events published by Spring Cloud Bus and then verify that the configuration file has been modified, so polling via HTTP is not required. -Log4j also supports composite configurations. A distributed application spread across microservices could share a common configuration file that could be used to control things like enabling debug logging for a specific user. +Log4j also supports composite configurations. +A distributed application spread across microservices could share a common configuration file that could be used to control things like enabling debug logging for a specific user. -While the standard Spring Boot REST endpoints to update logging will still work any changes made by those REST endpoints will be lost if Log4j reconfigures itself do to changes in the logging configuration file. +While the standard Spring Boot REST endpoints to update logging will still work any changes made by those REST endpoints will be lost if Log4j reconfigures itself do to changes in the logging configuration file. Further information regarding integration of the log4j-spring-cloud-config-client can be found at Log4j Spring Cloud Config Client. @@ -475,7 +478,9 @@ Both of these require that the log4j-spring-cloud-client jar is included in the === Integration with Docker -Applications within a Docker container that log using a Docker logging driver can include special attributes in the formatted log event as described at Customize Log Driver Output. Log4j provides similar functionality via the Docker Lookup. More information on Log4j's Docker support may also be found at Log4j-Docker. +Applications within a Docker container that log using a Docker logging driver can include special attributes in the formatted log event as described at https://docs.docker.com/config/containers/logging/log_tags/[Customize Log Driver Output]. +Log4j provides similar functionality via the xref:manual/lookups.adoc#DockerLookup[Docker Lookup]. +More information on Log4j's Docker support may also be found at xref:log4j-docker.adoc[Log4j Docker]. === Integration with Kubernetes @@ -483,9 +488,13 @@ Applications managed by Kubernetes can bypass the Docker/Kubernetes logging infr == Appender Performance -The numbers in the table below represent how much time in seconds was required for the application to call logger.debug(...) 100,000 times. These numbers only include the time taken to deliver to the specifically noted endpoint and many not include the actual time required before they are available for viewing. All measurements were performed on a MacBook Pro with a 2.9GHz Intel Core I9 processor with 6 physical and 12 logical cores, 32GB of 2400 MHz DDR4 RAM, and 1TB of Apple SSD storage. The VM used by Docker was managed by VMWare Fusion and had 4 CPUs and 2 GB of RAM. These number should be used for relative performance comparisons as the results on another system may vary considerably. +The numbers in the table below represent how much time in seconds was required for the application to call `+logger.debug(...)+` 100,000 times. +These numbers only include the time taken to deliver to the specifically noted endpoint and many not include the actual time required before they are available for viewing. +All measurements were performed on a MacBook Pro with a 2.9GHz Intel Core I9 processor with 6 physical and 12 logical cores, 32GB of 2400 MHz DDR4 RAM, and 1TB of Apple SSD storage. +The VM used by Docker was managed by VMWare Fusion and had 4 CPUs and 2 GB of RAM. +These number should be used for relative performance comparisons as the results on another system may vary considerably. -The sample application used can be found under the log4j-spring-cloud-config/log4j-spring-cloud-config-samples directory in the Log4j source repository. +The sample application used can be found under the in https://github.com/apache/logging-log4j-samples[the Log4j samples source repository]. [options="header"] |=========================================================================== @@ -537,25 +546,18 @@ the same pace that log events are written. == Logging Recommendations - -1. Use asynchronous logging unless guaranteed delivery is absolutely required. As +. Use asynchronous logging unless guaranteed delivery is absolutely required. As the performance numbers show, so long as the volume of logging is not high enough to fill up the circular buffer the overhead of logging will almost be unnoticeable to the application. -1. If overall performance is a consideration or you require multiline events such as stack traces +. If overall performance is a consideration or you require multiline events such as stack traces be processed properly then log via TCP to a companion container that acts as a log forwarder or directly to a log aggregator as shown above in xref:#ELK[Logging with ELK]. Use the Log4j Docker Lookup to add the container information to each log event. -1. Whenever guaranteed delivery is required use Flume Avro with a batch size of 1 or another Appender such +. Whenever guaranteed delivery is required use Flume Avro with a batch size of 1 or another Appender such as the Kafka Appender with syncSend set to true that only return control after the downstream agent acknowledges receipt of the event. Beware that using an Appender that writes each event individually should be kept to a minimum since it is much slower than sending buffered events. -1. Logging to files within the container is discouraged. Doing so requires that a volume be declared in +. Logging to files within the container is discouraged. Doing so requires that a volume be declared in the Docker configuration and that the file be tailed by a log forwarder. However, it performs better than logging to the standard output stream. If logging via TCP is not an option and proper multiline handling is required then consider this option. - - - - - - diff --git a/src/site/antora/modules/ROOT/pages/manual/compatibility.adoc b/src/site/antora/modules/ROOT/pages/manual/compatibility.adoc new file mode 100644 index 00000000000..8f2f0aff3d2 --- /dev/null +++ b/src/site/antora/modules/ROOT/pages/manual/compatibility.adoc @@ -0,0 +1,22 @@ +//// +Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +//// + +// NOTE: do not delete this page: external pages may be linking to it + +== Compatibility with Log4j 1 + +See the xref:manual/migration.adoc#Log4j1.2Bridge[Log4j 1.x bridge (log4j-1.2-api)] section of the Log4j 1.x Migration page. diff --git a/src/site/asciidoc/manual/configuration.adoc b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc similarity index 95% rename from src/site/asciidoc/manual/configuration.adoc rename to src/site/antora/modules/ROOT/pages/manual/configuration.adoc index 872e8c02614..b872e42db97 100644 --- a/src/site/asciidoc/manual/configuration.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc @@ -36,8 +36,8 @@ interface to add components to the default configuration. This page focuses primarily on configuring Log4j through a configuration file. Information on programmatically configuring Log4j can be found at -link:extending.html[Extending Log4j 2] and -link:customconfig.html[Programmatic Log4j Configuration]. +xref:manual/extending.adoc[Extending Log4j 2] and +xref:manual/customconfig.adoc[Programmatic Log4j Configuration]. All available formats are functionally equivalent. For example, a configuration file in XML can be rewritten using the properties format @@ -219,7 +219,7 @@ highest to lowest. As delivered, Log4j contains four ConfigurationFactory implementations: one for JSON, one for YAML, one for properties, and one for XML. -1. Log4j will inspect the `"log4j.configurationFile"` system property +1. Log4j will inspect the `"log4j2.configurationFile"` system property and, if set, will attempt to load the configuration using the `ConfigurationFactory` that matches the file extension. Note that this is not restricted to a location on the local file system and may contain @@ -302,10 +302,10 @@ configuration file. The default configuration, provided in the DefaultConfiguration class, will set up: * A -link:../log4j-core/apidocs/org/apache/logging/log4j/core/appender/ConsoleAppender.html[`ConsoleAppender`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/appender/ConsoleAppender.html[`ConsoleAppender`] attached to the root logger. * A -link:../log4j-core/apidocs/org/apache/logging/log4j/core/layout/PatternLayout.html[`PatternLayout`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/layout/PatternLayout.html[`PatternLayout`] set to the pattern "%d\{HH:mm:ss.SSS} [%t] %-5level %logger\{36} - %msg%n" attached to the ConsoleAppender @@ -387,10 +387,13 @@ configuration: [source,xml] ---- - - - - + + + + + + + ---- With this configuration all log events from `com.foo.Bar` will be @@ -614,7 +617,7 @@ don't wait for background tasks. Not all appenders will honor this, it is a hint and not an absolute guarantee that the shutdown procedure will not take longer. Setting this too low increase the risk of losing outstanding log events not yet written to the final destination. See -link:../log4j-core/target/site/apidocs/org/apache/logging/log4j/core/LoggerContext.html$%7Besc.hash%7Dstop(long,%20java.util.concurrent.TimeUnit)[LoggerContext.stop(long, +link:../javadoc/log4j-core/org/apache/logging/log4j/core/LoggerContext.html$%7Besc.hash%7Dstop(long,%20java.util.concurrent.TimeUnit)[LoggerContext.stop(long, java.util.concurrent.TimeUnit)]. (Not used if `shutdownHook` is set to "disable".) @@ -896,7 +899,7 @@ declare multiple loggers as an array. } ---- -Additional link:../runtime-dependencies.html[runtime dependencies] are +Additional xref:runtime-dependencies.adoc[runtime dependencies] are required for using JSON configuration files. [#YAML] @@ -957,7 +960,7 @@ Configuration: ---- -Additional link:../runtime-dependencies.html[runtime dependencies] are +Additional xref:runtime-dependencies.adoc[runtime dependencies] are required for using YAML configuration files. [#Properties] @@ -1074,7 +1077,7 @@ rootLogger.appenderRef.stdout.ref = STDOUT An understanding of how loggers work in Log4j is critical before trying to configure them. Please reference the Log4j -link:architecture.html[architecture] if more information is required. +xref:manual/architecture.adoc[architecture] if more information is required. Trying to configure Log4j without understanding those concepts will lead to frustration. @@ -1220,11 +1223,11 @@ will be resolved when the configuration file is interpreted while others may be passed to components where they will be evaluated at runtime. To accomplish this, Log4j uses variations of https://commons.apache.org/proper/commons-lang/[Apache Commons Lang]'s -link:../log4j-core/apidocs/org/apache/logging/log4j/core/lookup/StrSubstitutor.html[`StrSubstitutor`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/lookup/StrSubstitutor.html[`StrSubstitutor`] and -link:../log4j-core/apidocs/org/apache/logging/log4j/core/lookup/StrLookup.html[`StrLookup`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/lookup/StrLookup.html[`StrLookup`] classes. In a manner similar to Ant or Maven, this allows variables -declared as `${name}` to be resolved using properties declared in the +declared as `$\{name}` to be resolved using properties declared in the configuration itself. For example, the following example shows the filename for the rolling file appender being declared as a property. @@ -1275,7 +1278,7 @@ While this is useful, there are many more places properties can originate from. To accommodate this, Log4j also supports the syntax `${prefix:name}` where the prefix identifies tells Log4j that variable name should be evaluated in a specific context. See the -link:lookups.html[Lookups] manual page for more details. The contexts +xref:manual/lookups.adoc[Lookups] manual page for more details. The contexts that are built in to Log4j are: [cols="1m,5"] @@ -1285,9 +1288,9 @@ that are built in to Log4j are: base64 - Base64 encoded data. The format is ${dollar}{base64:Base64_encoded_data}. + Base64 encoded data. The format is ${base64:Base64_encoded_data}. For example: - ${dollar}{base64:SGVsbG8gV29ybGQhCg==} yields Hello World!. + ${base64:SGVsbG8gV29ybGQhCg==} yields Hello World!. @@ -1306,9 +1309,17 @@ The bundle name follows package naming conventions, for example: |date |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.adoc[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}`. +| event +| Retrieves values from fields within the log event. The format is ${event:some.field}. See the Lookups manual page for a list of available fields. +| java +| Retrieves information about the Java environment the application is running in. The format is ${java:some.property}. See the Lookups manual page for a list of available properties. + |jndi |A value set in the default JNDI Context. @@ -1317,12 +1328,18 @@ The bundle name follows package naming conventions, for example: https://docs.oracle.com/javase/6/docs/api/java/lang/management/RuntimeMXBean.html#getInputArguments--[RuntimeMXBean.getInputArguments()]. Not available on Android. +| k8s +| Returns attributes from the Kubernetes environment the application is running in. The format is ${k8s:some.attribute}. See the Lookups manual page for a list of available attributes. + |log4j |Log4j configuration properties. The expressions `${log4j:configLocation}` and `${log4j:configParentLocation}` respectively provide the absolute path to the log4j configuration file and its parent folder. +| lower +| Converts the passed in argument to lower case (usually used with nested lookups). The format is ${lower:argument}. + |main |A value set with ../log4j-core/apidocs/org/apache/logging/log4j/core/lookup/MapLookup.html#setMainArguments-java.lang.String:A-[MapLookup.setMainArguments(String[])] @@ -1330,15 +1347,26 @@ and its parent folder. |map |A value from a MapMessage +| marker +| Allows use of markers in configurations. The formats are ${marker:} and ${marker:some.name}. See the Lookups manual page for further details. + |sd |A value from a StructuredDataMessage. The key "id" will return the name of the StructuredDataId without the enterprise number. The key "type" will return the message type. Other keys will retrieve individual elements from the Map. +| spring +| Returns values of Spring properties from the Spring configuration. The format is ${spring:some.property}. See the Lookups manual page for requirements and details. + |sys |System properties. The formats are `${sys:some.property}` and `${sys:some.property:-default_value}`. + +| upper +| Converts the passed in argument to upper case (usually used with nested lookups). The format is ${upper:argument}. +| web +| Returns values of variables associated with the Servlet Context. The format is ${spring:some.key}. See the Lookups manual page for a list of available keys. |=== [#DefaultProperties] @@ -1361,7 +1389,7 @@ included, such as ``${main:\--file:-app.properties}`. This would use the == Enabling Message Pattern Lookups A message is processed (by default) without using lookups, for example if you defined `FOO_BAR`, then `logger.info("${foo.bar}")` will output `${foo.bar}` instead of `FOO_BAR`. -You could enable message pattern lookups by defining the message pattern using %m{lookups}. +You could enable message pattern lookups by defining the message pattern using `%m\{lookups}`. [#RuntimeLookup] == Lookup Variables with Multiple Leading '$' Characters @@ -1401,7 +1429,7 @@ _As a footnote, it is worth pointing out that the variables in the RollingFile appender declaration will also not be evaluated when the configuration is processed. This is simply because the resolution of the whole RollingFile element is deferred until a match occurs. See -link:appenders.html#RoutingAppender[RoutingAppender] for more +xref:manual/appenders.adoc#RoutingAppender[RoutingAppender] for more information._ [#Scripts] @@ -1618,7 +1646,7 @@ file that includes two other files: == Composite Configuration Log4j allows multiple configuration files to be used by specifying them -as a list of comma separated file paths on log4j.configurationFile or, +as a list of comma separated file paths on log4j2.configurationFile or, when using URLs, by adding secondary configuration locations as query parameters named "override". The merge logic can be controlled by specifying a class that implements the MergeStrategy interface on the log4j.mergeStrategy @@ -1676,7 +1704,7 @@ initialization. In addition, normal logging within appenders could create infinite recursion which Log4j will detect and cause the recursive events to be ignored. To accomodate this need, the Log4j 2 API includes a -link:../log4j-api/apidocs/org/apache/logging/log4j/status/StatusLogger.html[`StatusLogger`]. +link:../javadoc/log4j-api/org/apache/logging/log4j/status/StatusLogger.html[`StatusLogger`]. Components declare an instance of the StatusLogger similar to: [source,java] @@ -1815,7 +1843,7 @@ log4j2.json that might be present. Thus a different log configuration can be used during testing than what is used in production. A second approach, which is extensively used by Log4j 2, is to set the -log4j.configurationFile property in the method annotated with +log4j2.configurationFile property in the method annotated with @BeforeClass in the junit test class. This will allow an arbitrarily named file to be used during the test. @@ -1842,4 +1870,3 @@ public class AwesomeTest { } } ---- - diff --git a/src/site/asciidoc/manual/customconfig.adoc b/src/site/antora/modules/ROOT/pages/manual/customconfig.adoc similarity index 99% rename from src/site/asciidoc/manual/customconfig.adoc rename to src/site/antora/modules/ROOT/pages/manual/customconfig.adoc index bddf4197eeb..cd3cbbd7d73 100644 --- a/src/site/asciidoc/manual/customconfig.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/customconfig.adoc @@ -67,7 +67,7 @@ follow. == Understanding ConfigurationFactory During initialization, Log4j 2 will search for available -link:extending.html#ConfigurationFactory[ConfigurationFactories] and +xref:manual/extending.adoc#ConfigurationFactory[ConfigurationFactories] and then select the one to use. The selected `ConfigurationFactory` creates the `Configuration` that Log4j will use. Here is how Log4j finds the available ConfigurationFactories: diff --git a/src/site/asciidoc/manual/customloglevels.adoc b/src/site/antora/modules/ROOT/pages/manual/customloglevels.adoc similarity index 98% rename from src/site/asciidoc/manual/customloglevels.adoc rename to src/site/antora/modules/ROOT/pages/manual/customloglevels.adoc index c8c5ad11d26..f9eeadac518 100644 --- a/src/site/asciidoc/manual/customloglevels.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/customloglevels.adoc @@ -285,7 +285,7 @@ to the built-in ones: [source,sh,subs="attributes"] ---- -java -cp log4j-core-{Log4jReleaseVersion}.jar org.apache.logging.log4j.core.tools.ExtendedLoggerGenerator \ +java -cp log4j-core-{log4j-core-version}.jar org.apache.logging.log4j.core.tools.ExtendedLoggerGenerator \ com.mycomp.ExtLogger DIAG=350 NOTICE=450 VERBOSE=550 > com/mycomp/ExtLogger.java ---- @@ -307,7 +307,7 @@ built-in levels and has only custom levels: [source,sh,subs="attributes"] ---- -java -cp log4j-core-{Log4jReleaseVersion}.jar org.apache.logging.log4j.core.tools.CustomLoggerGenerator \ +java -cp log4j-core-{log4j-core-version}.jar org.apache.logging.log4j.core.tools.CustomLoggerGenerator \ com.mycomp.MyLogger DEFCON1=350 DEFCON2=450 DEFCON3=550 > com/mycomp/MyLogger.java ---- diff --git a/src/site/asciidoc/manual/dependencyinjection.adoc b/src/site/antora/modules/ROOT/pages/manual/dependencyinjection.adoc similarity index 99% rename from src/site/asciidoc/manual/dependencyinjection.adoc rename to src/site/antora/modules/ROOT/pages/manual/dependencyinjection.adoc index 56b5fe2d54b..e6686c541a6 100644 --- a/src/site/asciidoc/manual/dependencyinjection.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/dependencyinjection.adoc @@ -15,7 +15,6 @@ limitations under the License. //// = Dependency Injection -Matt Sicker Log4j 3.x extends its plugin system into a more general dependency injection API inspired by https://javaee.github.io/javaee-spec/javadocs/javax/inject/package-summary.html[`javax.inject`] and its open source implementations such as https://github.com/zsoltherpai/feather[Feather] and https://github.com/google/guice[Guice] along with https://docs.spring.io/spring-framework/reference/core/beans/introduction.html[Spring Framework] and `BeanFactory` API. Dependency injection can be thought of as a replacement for calling `new` or custom factory methods in Java code; alternatively, it can be thought of as a factory for factory instances. diff --git a/src/site/asciidoc/manual/eventlogging.adoc b/src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc similarity index 97% rename from src/site/asciidoc/manual/eventlogging.adoc rename to src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc index d45fe7158bf..d89e5e47800 100644 --- a/src/site/asciidoc/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 - -[#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 @@ -139,4 +135,4 @@ public class MyApp { The `EventLogger` class uses a `Logger` named "EventLogger". `EventLogger` uses a logging level of OFF as the default to indicate that it cannot be filtered. These events can be formatted for printing using the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/layout/StructuredDataLayout.html[`StructuredDataLayout`]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/layout/StructuredDataLayout.html[`StructuredDataLayout`]. diff --git a/src/site/asciidoc/manual/extending.adoc b/src/site/antora/modules/ROOT/pages/manual/extending.adoc similarity index 93% rename from src/site/asciidoc/manual/extending.adoc rename to src/site/antora/modules/ROOT/pages/manual/extending.adoc index f33962d2710..3d88ca16ea8 100644 --- a/src/site/asciidoc/manual/extending.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/extending.adoc @@ -47,11 +47,11 @@ and bound to the LogManager. In Log4j 2 this is provided by Applications may change the LoggerContextFactory that will be used by 1. Create a binding to the logging implementation. -.. Implement a new link:../log4j-core/apidocs/org/apache/logging/log4j/core/impl/Log4jContextFactory.html[`LoggerContextFactory`]. -.. Implement a class that extends link:../log4j-core/apidocs/org/apache/logging/spi/Provider.html[`org.apache.logging.spi.Provider`] +.. Implement a new link:../javadoc/log4j-core/org/apache/logging/log4j/core/impl/Log4jContextFactory.html[`LoggerContextFactory`]. +.. Implement a class that extends link:../javadoc/log4j-core/org/apache/logging/spi/Provider.html[`org.apache.logging.spi.Provider`] with a no-arg constructor that calls super-class's constructor with the Priority, the API version(s), `LoggerContextFactory` class, and -optionally, a link:../log4j-core/apidocs/org/apache/logging/log4j/spi/ThreadContextMap.html[`ThreadContextMap`] implementation class. +optionally, a link:../javadoc/log4j-core/org/apache/logging/log4j/spi/ThreadContextMap.html[`ThreadContextMap`] implementation class. .. Create a `META-INF/services/org.apache.logging.spi.Provider` file that contains the name of the class that implements `org.apache.logging.spi.Provider`. @@ -77,7 +77,7 @@ Callback classes must have a no-args constructor and need to be defined in two p == ContextSelector ContextSelectors are called by the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/impl/Log4jContextFactory.html[Log4j +link:../javadoc/log4j-core/org/apache/logging/log4j/core/impl/Log4jContextFactory.html[Log4j LoggerContext factory]. They perform the actual work of locating or creating a LoggerContext, which is the anchor for Loggers and their configuration. ContextSelectors are free to implement any mechanism they @@ -89,21 +89,18 @@ This class is then used for creating `ContextSelector` instances. Log4j provides five ContextSelectors: -link:../log4j-core/apidocs/org/apache/logging/log4j/core/selector/BasicContextSelector.html[`BasicContextSelector`]:: +link:../javadoc/log4j-core/org/apache/logging/log4j/core/selector/BasicContextSelector.html[`BasicContextSelector`]:: Uses either a LoggerContext that has been stored in a ThreadLocal or a common LoggerContext. -link:../log4j-core/apidocs/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html[`ClassLoaderContextSelector`]:: +link:../javadoc/log4j-core/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html[`ClassLoaderContextSelector`]:: Associates LoggerContexts with the ClassLoader that created the caller of the getLogger(...) call. This is the default ContextSelector. -link:../log4j-core/apidocs/org/apache/logging/log4j/core/selector/JndiContextSelector.html[`JndiContextSelector`]:: - Locates the LoggerContext by querying JNDI. Please see link:../manual/configuration.html#allowedJndiProtocols[log4j2.allowedJndiProtocols], -link:../manual/configuration.html#allowedLdapClasses[log4j2.allowedLdapClasses], and -link:../manual/configuration.html#allowedLdapHosts[log4j2.allowedLdapHosts] for restrictions on using JNDI -with Log4j. -link:../log4j-core/apidocs/org/apache/logging/log4j/core/async/AsyncLoggerContextSelector.html[`AsyncLoggerContextSelector`]:: +link:../javadoc/log4j-core/org/apache/logging/log4j/core/selector/JndiContextSelector.html[`JndiContextSelector`]:: + Locates the LoggerContext by querying JNDI. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/async/AsyncLoggerContextSelector.html[`AsyncLoggerContextSelector`]:: Creates a LoggerContext that ensures that all loggers are AsyncLoggers. -link:../log4j-core/apidocs/org/apache/logging/log4j/core/osgi/BundleContextSelector.html[`BundleContextSelector`]:: +link:../javadoc/log4j-core/org/apache/logging/log4j/core/osgi/BundleContextSelector.html[`BundleContextSelector`]:: Associates LoggerContexts with the ClassLoader of the bundle that created the caller of the getLogger call. This is enabled by default in OSGi environments. @@ -114,7 +111,7 @@ link:../log4j-core/apidocs/org/apache/logging/log4j/core/osgi/BundleContextSelec Modifying the way in which logging can be configured is usually one of the areas with the most interest. The primary method for doing that is by implementing or extending a -link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/ConfigurationFactory.html[`ConfigurationFactory`]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/config/ConfigurationFactory.html[`ConfigurationFactory`]. Log4j provides two ways of adding new ConfigurationFactories. The first is by defining the system property named "log4j.configurationFactory" to the name of the class that should be searched first for a configuration. @@ -124,9 +121,9 @@ All the ConfigurationFactories are then processed in order. Each factory is called on its `getSupportedTypes()` method to determine the file extensions it supports. If a configuration file is located with one of the specified file extensions then control is passed to that -`ConfigurationFactory` to load the configuration and create the link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/Configuration.html[`Configuration`] object. +`ConfigurationFactory` to load the configuration and create the link:../javadoc/log4j-core/org/apache/logging/log4j/core/config/Configuration.html[`Configuration`] object. -Most `Configuration` extend the link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/AbstractConfiguration.html[`AbstractConfiguration`] class. This class expects that the subclass will process the configuration file and create +Most `Configuration` extend the link:../javadoc/log4j-core/org/apache/logging/log4j/core/config/AbstractConfiguration.html[`AbstractConfiguration`] class. This class expects that the subclass will process the configuration file and create a hierarchy of `Node` objects. Each `Node` is fairly simple in that it consists of the name of the node, the name/value pairs associated with the node, The `PluginType` of the node and a List of all of its child @@ -205,7 +202,7 @@ A `LogEventFactory` is used to generate LogEvents. Applications may replace the standard `LogEventFactory` by binding a factory for `LogEventFactory` in `Injector`. If no binding is already present, the value of the system property `log4j2.logEventFactory` is checked for the name of the custom `LogEventFactory` class. -Note: When log4j is configured to have link:async.html#AllAsync[all +Note: When log4j is configured to have xref:manual/async.adoc#AllAsync[all loggers asynchronous], log events are pre-allocated in a ring buffer and the `LogEventFactory` is not used. @@ -237,7 +234,7 @@ A Lookup must be declared using a `@Plugin @Lookup` annotation. The `value` spec match the prefix. The example below shows a Lookup that will return the value of a System Property. -The provided Lookups are documented here: link:./lookups.html[Lookups] +The provided Lookups are documented here: xref:manual/lookups.adoc[Lookups] [source,java] ---- @@ -478,7 +475,7 @@ public final class QueryConverter extends LogEventPatternConverter { } ---- -A pattern to use this converter could be specified as `... %q ...` or `... %q{argument} ...`. +A pattern to use this converter could be specified as `... %q ...` or `... %q\{argument} ...`. The "argument" will be passed as first (and only) value to the `options` parameter of the `newInstance(...)` method. @@ -590,10 +587,10 @@ ListAppender list2 = ListAppender.newBuilder().setName("List1").setEntryPerNewLi [#Custom_ContextDataProvider] == Custom ContextDataProvider -The link:../log4j-core/apidocs/org/apache/logging/log4j/core/util/ContextDataProvider.html[`ContextDataProvider`] +The link:../javadoc/log4j-core/org/apache/logging/log4j/core/util/ContextDataProvider.html[`ContextDataProvider`] (introduced in Log4j 2.13.2) is an interface applications and libraries can use to inject additional key-value pairs into the LogEvent's context data. Log4j's -link:../log4j-core/apidocs/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.html[`ThreadContextDataInjector`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/impl/ThreadContextDataInjector.html[`ThreadContextDataInjector`] uses `java.util.ServiceLoader` to locate and load `ContextDataProvider` instances. Log4j itself adds the ThreadContext data to the LogEvent using `org.apache.logging.log4j.core.impl.ThreadContextDataProvider`. Custom implementations @@ -606,16 +603,16 @@ declare it as a service by defining the implmentation class in a file named A garbage-free `StringMap`-based context map can be installed by setting system property `log4j2.garbagefreeThreadContextMap` to true. -Any custom link:../log4j-core/apidocs/org/apache/logging/log4j/spi/ThreadContextMap.html[`ThreadContextMap`] +Any custom link:../javadoc/log4j-core/org/apache/logging/log4j/spi/ThreadContextMap.html[`ThreadContextMap`] implementation can be installed by setting system property `log4j2.threadContextMap` to the fully qualified class name of the class implementing the `ThreadContextMap` interface. By also implementing the `ReadOnlyThreadContextMap` interface, your custom `ThreadContextMap` implementation will be accessible to applications via the -link:../log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html#getThreadContextMap()[`ThreadContext::getThreadContextMap`] +link:../javadoc/log4j-api/org/apache/logging/log4j/ThreadContext.html#getThreadContextMap()[`ThreadContext::getThreadContextMap`] method. [#Custom_Plugins] == Custom Plugins // TODO -See the link:plugins.html[Plugins] section of the manual. +See the xref:manual/plugins.adoc[Plugins] section of the manual. diff --git a/src/site/asciidoc/manual/filters.adoc b/src/site/antora/modules/ROOT/pages/manual/filters.adoc similarity index 99% rename from src/site/asciidoc/manual/filters.adoc rename to src/site/antora/modules/ROOT/pages/manual/filters.adoc index 48725444226..abd5a678980 100644 --- a/src/site/asciidoc/manual/filters.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/filters.adoc @@ -700,7 +700,7 @@ Throwable as part of the Message. The sample below shows how to declare script fields and then reference them in specific components. See -link:appenders.html#ScriptCondition[ScriptCondition] for an example of +xref:manual/appenders.adoc#ScriptCondition[ScriptCondition] for an example of how the `ScriptPlugin` element can be used to embed script code directly in the configuration. diff --git a/src/site/asciidoc/manual/flowtracing.adoc b/src/site/antora/modules/ROOT/pages/manual/flowtracing.adoc similarity index 99% rename from src/site/asciidoc/manual/flowtracing.adoc rename to src/site/antora/modules/ROOT/pages/manual/flowtracing.adoc index c4026612c08..1ba1875feb2 100644 --- a/src/site/asciidoc/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 - -[#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/asciidoc/manual/garbagefree.adoc b/src/site/antora/modules/ROOT/pages/manual/garbagefree.adoc similarity index 92% rename from src/site/asciidoc/manual/garbagefree.adoc rename to src/site/antora/modules/ROOT/pages/manual/garbagefree.adoc index 2f37b99c3ac..43f3ba6ca65 100644 --- a/src/site/asciidoc/manual/garbagefree.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/garbagefree.adoc @@ -63,15 +63,11 @@ configuration, and as a result the same application with Log4j 2.6 has a memory allocation rate of 1.6 MB/sec and was GC-free with 0 (zero) garbage collections. -[cols="2*"] -|=== -|link:../images/log4j-2.5-FlightRecording.png[image:../images/log4j-2.5-FlightRecording-thumbnail40pct.png[image]] + -With Log4j 2.5: memory allocation rate 809 MB/sec, 141 minor -collections. -|link:../images/log4j-2.6-FlightRecording.png[image:../images/log4j-2.6-FlightRecording-thumbnail40pct.png[image]] + -Log4j 2.6 did not allocate temporary objects: 0 (zero) garbage -collections. -|=== +.Using Log4j 2.5: memory allocation rate 809 MB/sec, 141 minor collections +image:log4j-2.5-FlightRecording-thumbnail40pct.png[xref=image$log4j-2.5-FlightRecording.png] + +.Using Log4j 2.6: no temporary object allocations, 0 (zero) garbage collections +image:log4j-2.6-FlightRecording-thumbnail40pct.png[xref=image$log4j-2.6-FlightRecording.png] [#Config] == Configuration @@ -107,9 +103,9 @@ are not garbage-free since they cause `java.util.concurrent.locks.AbstractQueuedSynchronizer$Node` objects to be created. The default wait strategy used by Log4j uses a synchronized block instead of a ReentrantLock to avoid this problem. The Yield and Sleep wait strategies are garbage-free. (For configuring predefined wait strategies, see -link:async.html#SysPropsAllAsync[here] and -link:async.html#SysPropsMixedSync-Async[here], -you may also configure a link:async.html#WaitStrategy[custom wait strategy].) +xref:manual/async.adoc#SysPropsAllAsync[here] and +xref:manual/async.adoc#SysPropsMixedSync-Async[here], +you may also configure a xref:manual/async.adoc#WaitStrategy[custom wait strategy].) === Disabling Garbage-free Logging @@ -129,13 +125,13 @@ performance is important, consider using Async Loggers. Instead of system properties, the above properties can also be specified in a file named `log4j2.component.properties` by including this file in the classpath of the application. See the -link:configuration.html#SystemProperties[manual regarding system +xref:manual/configuration.adoc#SystemProperties[manual regarding system properties] for more info. [#Appenders] === Supported Appenders -The following link:appenders.html[appenders] are garbage-free during +The following xref:manual/appenders.adoc[appenders] are garbage-free during steady-state logging: * Console @@ -148,13 +144,13 @@ file rollover) Any other appenders not in the above list (including AsyncAppender) create temporary objects during steady-state logging. Instead of -AsyncAppender, use link:async.html[Async Loggers] to log asynchronously +AsyncAppender, use xref:manual/async.adoc[Async Loggers] to log asynchronously in a garbage-free manner. [#Filters] === Supported Filters -The following link:filters.html[filters] are garbage-free during +The following xref:manual/filters.adoc[filters] are garbage-free during steady-state logging: * CompositeFilter (adding and removing element filters creates temporary @@ -178,7 +174,7 @@ them. ==== JsonTemplateLayout `JsonTemplateLayout` is garbage-free with -link:json-template-layout.html#faq-garbage-free[a few exceptions]. +xref:manual/json-template-layout.adoc#faq-garbage-free[a few exceptions]. ==== PatternLayout @@ -186,11 +182,11 @@ PatternLayout with the following limited set of conversion patterns is garbage-free. Format modifiers to control such things as field width, padding, left and right justification will not generate garbage. -[cols="1,2"] +[cols="1m,2"] |=== |Conversion Pattern |Description -|%c{precision}, %logger{precision} +|%c\{precision}, %logger\{precision} |Logger name |%d, %date @@ -198,25 +194,26 @@ a| Note: Only the predefined date formats are garbage-free: (millisecond separator may be either a comma ',' or a period '.') +[cols="1m,1"] !=== !Pattern !Example -!%d{DEFAULT} +!%d\{DEFAULT} !2012-11-02 14:34:02,781 -!%d{ISO8601} +!%d\{ISO8601} !2012-11-02T14:34:02,781 -!%d{ISO8601_BASIC} +!%d\{ISO8601_BASIC} !20121102T143402,781 -!%d{ABSOLUTE} +!%d\{ABSOLUTE} !14:34:02,781 -!%d{DATE} +!%d\{DATE} !02 Nov 2012 14:34:02,781 -!%d{COMPACT} +!%d\{COMPACT} !20121102143402781 !%d{HH:mm:ss,SSS} @@ -228,32 +225,32 @@ separator may be either a comma ',' or a period '.') !%d{HH:mm:ss}{GMT+0} !18:34:02 -!%d{UNIX} +!%d\{UNIX} !1351866842 -!%d{UNIX_MILLIS} +!%d\{UNIX_MILLIS} !1351866842781 !=== -|%enc{pattern}, %encode{pattern} +|%enc\{pattern}, %encode\{pattern} |Encodes special characters such as '\n' and HTML characters to help prevent log forging and some XSS attacks that could occur when displaying logs in a web browser - garbage-free since 2.8 -|%equals{pattern}{test}{substitution}, -%equalsIgnoreCase{pattern}{test}{substitution} +|%equals\{pattern}\{test}\{substitution}, +%equalsIgnoreCase\{pattern}\{test}\{substitution} |Replaces occurrences of 'test', a string, with its replacement 'substitution' in the string resulting from evaluation of the pattern - garbage-free since 2.8 -|%highlight{pattern}{style} +|%highlight\{pattern}\{style} |Adds ANSI colors - garbage-free since 2.7 (unless nested pattern is not garbage free) -|%K{key}, %map{key}, %MAP{key} +|%K\{key}, %map\{key}, %MAP\{key} |Outputs the entries in a -link:../log4j-api/apidocs/org/apache/logging/log4j/message/MapMessage.html[MapMessage], +link:../javadoc/log4j-api/org/apache/logging/log4j/message/MapMessage.html[MapMessage], if one is present in the event - garbage-free since 2.8. |%m, %msg, %message @@ -278,8 +275,8 @@ characters - garbage-free since 2.8 |%N, %nano |System.nanoTime() when the event was logged -|%notEmpty{pattern}, %varsNotEmpty{pattern}, -%variablesNotEmpty{pattern} +|%notEmpty\{pattern}, %varsNotEmpty\{pattern}, +%variablesNotEmpty\{pattern} |Outputs the result of evaluating the pattern if and only if all variables in the pattern are not empty - garbage-free since 2.8 @@ -295,7 +292,7 @@ started until the creation of the logging event - garbage-free since 2.8 |A sequence number that will be incremented in every event - garbage-free since 2.8 -|%style{pattern}{ANSI style} +|%style\{pattern}{ANSI style} |Style the message - garbage-free since 2.7 (unless nested pattern is not garbage free) @@ -415,7 +412,7 @@ configured to be garbage-free by setting system property * Logging very large messages (more than 518 characters) when all loggers are Async Loggers will cause the internal StringBuilder in the RingBuffer to be trimmed back to their max size. -* Logging messages containing '${': substituting a ${variable} creates +* Logging messages containing '${': substituting a `$\{variable}` creates temporary objects. * Logging a lambda _as a parameter_ (`logger.info("lambda value is {}", () -> callExpensiveMethod())`) @@ -440,7 +437,7 @@ spike in service time adds queueing delay for many of the subsequent operations. Service time is easy to measure (and often looks good on paper) but is irrelevant for users since it omits the time spent waiting for service. For this reason we report response time: service time plus -wait time. See the link:../performance.html#responseTime[response time +wait time. See the xref:manual/performance.adoc#responseTime[response time section] of the performance page for more detail. The response time test results below were all derived from running the @@ -466,7 +463,7 @@ response time behaviour for Log4j's Async Loggers. In the graph, "100k" means logging at a sustained load of 100,000 messages/second, "800k" is a sustained load of 800,000 messages/second. -image:../images/ResponseTimeAsyncClassicVsGcFree-label.png[image] +image:ResponseTimeAsyncClassicVsGcFree-label.png[image] In *classic* mode we see numerous minor garbage collections which pause the application threads for 3 milliseconds or more. This quickly adds up @@ -511,7 +508,7 @@ milliseconds where the garbage-free response times were less than 3 milliseconds. It may be possible to improve on this, we did not investigate further yet. -image:../images/ResponseTimeSyncClassicVsGcFree.png[image] +image:ResponseTimeSyncClassicVsGcFree.png[image] The above results are obtained with the ResponseTimeTest class which can be found in the Log4j 2 unit test source directory, running on JDK @@ -528,7 +525,7 @@ logging. The graph below compares the sustained throughput of synchronous logging to a file with Log4j 2.6 in garbage-free mode, classic mode and Log4j 2.5. -image:../images/garbage-free2.6-SyncThroughputLinux.png[Throughput of +image:garbage-free2.6-SyncThroughputLinux.png[Throughput of Log4j 2.6 in garbage-free mode is slightly worse than in classic mode, but on par with 2.5 and much better than alternatives logging libraries] diff --git a/src/site/asciidoc/manual/index.adoc b/src/site/antora/modules/ROOT/pages/manual/index.adoc similarity index 84% rename from src/site/asciidoc/manual/index.adoc rename to src/site/antora/modules/ROOT/pages/manual/index.adoc index 57af2536547..15f93a160b2 100644 --- a/src/site/asciidoc/manual/index.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/index.adoc @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. //// -= Overview -Ralph Goers += Manual == Welcome to Log4j! @@ -24,7 +23,7 @@ In conformance with this rule, the E.U. http://www.semper.org[SEMPER] project decided to write its own tracing API. This was in early 1996. After countless enhancements, several incarnations and much work that API has evolved to become log4j, a popular logging package for Java. The -package is distributed under the link:../LICENSE[Apache Software +package is distributed under the https://www.apache.org/licenses/LICENSE-2.0[Apache Software License], a fully-fledged open source license certified by the http://www.opensource.org[open source] initiative. The latest log4j version, including full-source code, class files and documentation can @@ -69,7 +68,7 @@ simple to understand and to use. == Log4j 2 -Log4j 1.x has been widely adopted and used in many applications. +Log4j 1 has been widely adopted and used in many applications. However, through the years development on it has slowed down. It has become more difficult to maintain due to its need to be compliant with very old versions of Java and became @@ -83,33 +82,33 @@ Log4j 1.x and Logback will lose events while reconfiguring. Log4j 2 will not. In Logback, exceptions in Appenders are never visible to the application. In Log4j 2 Appenders can be configured to allow the exception to percolate to the application. -2. Log4j 2 contains next-generation link:async.html[Asynchronous +2. Log4j 2 contains next-generation xref:manual/async.adoc[Asynchronous Loggers] based on the https://lmax-exchange.github.io/disruptor/[LMAX Disruptor library]. In multi-threaded scenarios Asynchronous Loggers have 10 times higher throughput and orders of magnitude lower latency than Log4j 1.x and Logback. -3. Log4j 2 is link:garbagefree.html[garbage free] for stand-alone +3. Log4j 2 is xref:manual/garbagefree.adoc[garbage free] for stand-alone applications, and low garbage for web applications during steady state logging. This reduces pressure on the garbage collector and can give better response time performance. -4. Log4j 2 uses a link:plugins.html[Plugin system] that makes it -extremely easy to link:extending.html[extend the framework] by adding -new link:appenders.html[Appenders], link:filters.html[Filters], -link:layouts.html[Layouts], link:lookups.html[Lookups], and Pattern +4. Log4j 2 uses a xref:manual/plugins.adoc[Plugin system] that makes it +extremely easy to xref:manual/extending.adoc[extend the framework] by adding +new xref:manual/appenders.adoc[Appenders], xref:manual/filters.adoc[Filters], +xref:manual/layouts.adoc[Layouts], xref:manual/lookups.adoc[Lookups], and Pattern Converters without requiring any changes to Log4j. 5. Due to the Plugin system configuration is simpler. Entries in the configuration do not require a class name to be specified. -6. Support for link:customloglevels.html[custom log levels]. Custom log +6. Support for xref:manual/customloglevels.adoc[custom log levels]. Custom log levels can be defined in code or in configuration. -7. Support for link:api.html#LambdaSupport[lambda expressions]. Client +7. Support for xref:manual/api.adoc#LambdaSupport[lambda expressions]. Client code running on Java 8 can use lambda expressions to lazily construct a log message only if the requested log level is enabled. Explicit level checks are not needed, resulting in cleaner code. -8. Support for link:messages.html[Message objects]. Messages allow +8. Support for 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 link:layouts.html[Layouts], -link:filters.html[Filters] and link:lookups.html[Lookups] to manipulate +their own `Message` types and write custom xref:manual/layouts.adoc[Layouts], +xref:manual/filters.adoc[Filters] and xref:manual/lookups.adoc[Lookups] to manipulate them. 9. Log4j 1.x supports Filters on Appenders. Logback added TurboFilters to allow filtering of events before they are processed by a Logger. @@ -122,10 +121,10 @@ the data to be transported in any format desired. 11. Layouts in Log4j 1.x and Logback return a String. This resulted in the problems discussed at http://logback.qos.ch/manual/encoders.html[Logback Encoders]. Log4j 2 -takes the simpler approach that link:layouts.html[Layouts] always return +takes the simpler approach that xref:manual/layouts.adoc[Layouts] always return a byte array. This has the advantage that it means they can be used in virtually any Appender, not just the ones that write to an OutputStream. -12. The link:appenders.html#SyslogAppender[Syslog Appender] supports +12. The xref:manual/appenders.adoc#SyslogAppender[Syslog Appender] supports both TCP and UDP as well as support for the BSD syslog and the http://tools.ietf.org/html/rfc5424[RFC 5424] formats. 13. Log4j 2 takes advantage of Java 5 concurrency support and performs diff --git a/src/site/asciidoc/manual/jmx.adoc b/src/site/antora/modules/ROOT/pages/manual/jmx.adoc similarity index 98% rename from src/site/asciidoc/manual/jmx.adoc rename to src/site/antora/modules/ROOT/pages/manual/jmx.adoc index 750a5c28b9c..f559fac845e 100644 --- a/src/site/asciidoc/manual/jmx.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/jmx.adoc @@ -90,7 +90,7 @@ The best way to find out which methods and attributes of the various Log4j comp The screenshot below shows the Log4j MBeans in JConsole. -image:../images/jmx-jconsole-mbeans.png[JConsole screenshot of the +image:jmx-jconsole-mbeans.png[JConsole screenshot of the MBeans tab] [#ClientGUI] diff --git a/src/site/asciidoc/manual/json-template-layout.adoc b/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc similarity index 96% rename from src/site/asciidoc/manual/json-template-layout.adoc rename to src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc index 58baafe47e3..c672912fcd3 100644 --- a/src/site/asciidoc/manual/json-template-layout.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc @@ -17,24 +17,22 @@ = JSON Template Layout Volkan Yazıcı -include::../_constants.adoc[] - `JsonTemplateLayout` is a customizable, efficient, and garbage-free JSON 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:#layout-config[layout configuration] parameters) -* Customizable timestamp formatting (see xref:event-template-resolver-timestamp[] +* Customizable timestamp formatting (see xref:#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:#event-template-resolver-exception[] + and xref:#event-template-resolver-exceptionRootCause[] event template resolvers) -* xref:extending[Extensible plugin support] +* xref:manual/extending.adoc[Extensible plugin support] -* Customizable object xref:recycling-strategy[recycling strategy] +* Customizable object xref:#recycling-strategy[recycling strategy] [#usage] == Usage @@ -47,7 +45,7 @@ enough to enable access to `JsonTemplateLayout` in your Log4j configuration: org.apache.logging.log4j log4j-layout-template-json - {project-version} + {log4j-layout-template-json-version} ---- @@ -117,7 +115,7 @@ in combination with the below `log4j2.xml` configuration: or with the below `log4j2.properties` configuration: -[source,ini] +[source,properties] ---- appender.console.layout.type = JsonTemplateLayout appender.console.layout.eventTemplateUri = classpath:EcsLayout.json @@ -366,7 +364,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:#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`] @@ -788,7 +786,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:#event-template-resolver-exception[] resolver. [#event-template-resolver-level] ===== `level` @@ -885,7 +883,7 @@ index = "index" -> number key = "key" -> string ---- -Performs link:lookups.html#AppMainArgsLookup[Main Argument Lookup] for the +Performs xref:manual/lookups.adoc#AppMainArgsLookup[Main Argument Lookup] for the given `index` or `key`. ====== Examples @@ -1125,14 +1123,14 @@ pattern = "pattern" -> string stackTraceEnabled = "stackTraceEnabled" -> boolean ---- -Resolver delegating to link:layouts.html#PatternLayout[`PatternLayout`]. +Resolver delegating to xref:manual/layouts.adoc#PatternLayout[`PatternLayout`]. The default value of `stackTraceEnabled` is inherited from the parent `JsonTemplateLayout`. ====== Examples -Resolve the string produced by `%p %c{1.} [%t] %X{userId} %X %m%ex` pattern: +Resolve the string produced by `%p %c{1.} [%t] %X\{userId} %X %m%ex` pattern: [source,json] ---- @@ -1487,8 +1485,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:#event-template-resolver-exception[] and +xref:#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. @@ -1537,7 +1535,7 @@ All above accesses to `StackTraceElement` is garbage-free. [#extending] == Extending -`JsonTemplateLayout` relies on Log4j link:plugins.html[plugin system] to build +`JsonTemplateLayout` relies on Log4j xref:manual/plugins.adoc[plugin system] to build up the features it provides. This enables feature customization a breeze for users. As of this moment, following features are implemented by means of plugins: @@ -1561,12 +1559,12 @@ In a nutshell, you annotate your classes with `@Plugin` and their (`static`) creator methods with `@PluginFactory`. Last, you inform the Log4j plugin system to discover these custom classes. This can be done either using `packages` declared in your Log4j configuration or by various other ways described in -link:plugins.html[plugin system documentation]. +xref:manual/plugins.adoc[plugin system documentation]. [#extending-event-resolvers] === Extending Event Resolvers -All available xref:event-template-resolvers[event template resolvers] are simple +All available xref:#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. @@ -1854,7 +1852,7 @@ alternatives. [#faq-lookups] === Are lookups supported in templates? -Yes, link:lookups.html[lookups] (e.g., `${java:version}`, +Yes, xref:manual/lookups.adoc[lookups] (e.g., `${java:version}`, `${env:USER}`, `${date:MM-dd-yyyy}`) are supported in string literals of templates. Though note that they are not garbage-free. @@ -1891,7 +1889,7 @@ enabled. Take into account the following caveats: garbage-free except for certain types (e.g., `BigDecimal`, `BigInteger`, ``Collection``s, except `List`). -* link:lookups.html[Lookups] (that is, `${...}` variables) are not garbage-free. +* xref:manual/lookups.adoc[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:#event-template-resolvers[the notes on garbage footprint of resolvers] you employ in templates. diff --git a/src/site/asciidoc/manual/layouts.adoc b/src/site/antora/modules/ROOT/pages/manual/layouts.adoc similarity index 93% rename from src/site/asciidoc/manual/layouts.adoc rename to src/site/antora/modules/ROOT/pages/manual/layouts.adoc index 14d0411090e..1c556500438 100644 --- a/src/site/asciidoc/manual/layouts.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/layouts.adoc @@ -159,7 +159,7 @@ Produces a CSV record with the following fields: 0,1441617184044,DEBUG,main,"one=1, two=2, three=3",org.apache.logging.log4j.spi.AbstractLogger,,,,org.apache.logging.log4j.core.layout.CsvLogEventLayoutTest.testLayout(CsvLogEventLayoutTest.java:98),{},[] .... -Additional link:../runtime-dependencies.html[runtime dependencies] are +Additional xref:runtime-dependencies.adoc[runtime dependencies] are required for using CSV layouts. [#HTMLLayout] @@ -331,7 +331,7 @@ JSON Template Layout will render JSON documents as follows: } ---- -See link:json-template-layout.html[JSON Template Layout] page for the complete +See xref:manual/json-template-layout.adoc[JSON Template Layout] page for the complete documentation. [#PatternLayout] @@ -375,13 +375,13 @@ WARN [main]: Message 2 Note that there is no explicit separator between text and conversion specifiers. The pattern parser knows when it has reached the end of a conversion specifier when it reads a conversion character. In the -example above the conversion specifier *%-5p* means the priority of the +example above the conversion specifier `%-5p` means the priority of the logging event should be left justified to a width of five characters. If the pattern string does not contain a specifier to handle a Throwable -being logged, parsing of the pattern will act as if the "%xEx" specifier +being logged, parsing of the pattern will act as if the `%xEx` specifier had be added to the end of the string. To suppress formatting of the -Throwable completely simply add "%ex{0}" as a specifier in the pattern +Throwable completely simply add `%ex\{0}` as a specifier in the pattern string. .PatternLayout Parameters @@ -467,12 +467,12 @@ https://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html[Pattern]. The conversions that are provided with Log4j are: -[cols="1,3a"] +[cols="1m,3a"] |=== |Conversion Pattern |Description -|*c*{precision} + -*logger*{precision} +|*c*\{precision} + +*logger*\{precision} |Outputs the name of the logger that published the logging event. The logger conversion specifier can be optionally followed by _precision specifier_, which consists of a decimal integer, or a pattern starting @@ -495,15 +495,15 @@ default, the layout prints the logger name in full. !=== !Conversion Pattern !Logger Name !Result -!%c{1} +!%c\{1} !org.apache.commons.Foo !Foo -!%c{2} +!%c\{2} !org.apache.commons.Foo !commons.Foo -!%c{10} +!%c\{10} !org.apache.commons.Foo !org.apache.commons.Foo @@ -549,8 +549,8 @@ default, the layout prints the logger name in full. !=== -|[[PatternClass]] *C*{precision} + -*class*{precision} +|[[PatternClass]] *C*\{precision} + +*class*\{precision} |Outputs the fully qualified class name of the caller issuing the logging request. This conversion specifier can be optionally followed by _precision specifier_, that follows the same rules as the logger name @@ -560,8 +560,8 @@ Generating the class name of the caller (link:#LocationInformation[location information]) is an expensive operation and may impact performance. Use with caution. -|[[PatternDate]] *d*{pattern} + -*date*{pattern} +|[[PatternDate]] *d*\{pattern} + +*date*\{pattern} |Outputs the date of the logging event. The date conversion specifier may be followed by a set of braces containing a date and time pattern string per https://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html[`SimpleDateFormat`]. @@ -572,49 +572,49 @@ The predefined _named_ formats are: !=== !Pattern !Example -!%d{DEFAULT} +!%d\{DEFAULT} !2012-11-02 14:34:02,123 -!%d{DEFAULT_MICROS} +!%d\{DEFAULT_MICROS} !2012-11-02 14:34:02,123456 -!%d{DEFAULT_NANOS} +!%d\{DEFAULT_NANOS} !2012-11-02 14:34:02,123456789 -!%d{ISO8601} +!%d\{ISO8601} !2012-11-02T14:34:02,781 -!%d{ISO8601_BASIC} +!%d\{ISO8601_BASIC} !20121102T143402,781 -!%d{ISO8601_OFFSET_DATE_TIME_HH} +!%d\{ISO8601_OFFSET_DATE_TIME_HH} !2012-11-02'T'14:34:02,781-07 -!%d{ISO8601_OFFSET_DATE_TIME_HHMM} +!%d\{ISO8601_OFFSET_DATE_TIME_HHMM} !2012-11-02'T'14:34:02,781-0700 -!%d{ISO8601_OFFSET_DATE_TIME_HHCMM} +!%d\{ISO8601_OFFSET_DATE_TIME_HHCMM} !2012-11-02'T'14:34:02,781-07:00 -!%d{ABSOLUTE} +!%d\{ABSOLUTE} !14:34:02,781 -!%d{ABSOLUTE_MICROS} +!%d\{ABSOLUTE_MICROS} !14:34:02,123456 -!%d{ABSOLUTE_NANOS} +!%d\{ABSOLUTE_NANOS} !14:34:02,123456789 -!%d{DATE} +!%d\{DATE} !02 Nov 2012 14:34:02,781 -!%d{COMPACT} +!%d\{COMPACT} !20121102143402781 -!%d{UNIX} +!%d\{UNIX} !1351866842 -!%d{UNIX_MILLIS} +!%d\{UNIX_MILLIS} !1351866842781 !=== @@ -644,7 +644,7 @@ You can define custom date formats: !18:34:02 !=== -%d{UNIX} outputs the UNIX time in seconds. %d{UNIX_MILLIS} outputs the +`%d\{UNIX}` outputs the UNIX time in seconds. `%d\{UNIX_MILLIS}` outputs the UNIX time in milliseconds. The UNIX time is the difference, in seconds for UNIX and in milliseconds for UNIX_MILLIS, between the current time and midnight, January 1, 1970 UTC. While the time unit is milliseconds, @@ -664,8 +664,8 @@ the "fraction-of-second" pattern letter `S`. Users may revert back to a millisecond-precision clock when running on Java 9 by setting system property `log4j2.Clock` to `SystemMillisClock`. -|*enc*{_pattern_}{[HTML\|XML\|JSON\|CRLF]} + -*encode*{_pattern_}{[HTML\|XML\|JSON\|CRLF]} +|*enc*\{pattern}{[HTML\|XML\|JSON\|CRLF]} + +*encode*\{pattern}{[HTML\|XML\|JSON\|CRLF]} |Encodes and escapes special characters suitable for output in specific markup languages. By default, this encodes for HTML if only one option is specified. The second option is used to specify which encoding format @@ -674,7 +674,7 @@ provided data so that the output data is not written improperly or insecurely. A typical usage would encode the message `%enc{%m}` but user input could -come from other locations as well, such as the MDC `%enc{%mdc{key}}` +come from other locations as well, such as the MDC `%enc{%mdc\{key}}` Using the HTML encoding format, the following characters are replaced: @@ -717,7 +717,7 @@ specified by https://www.ietf.org/rfc/rfc4627.txt[RFC 4627 section 2.5]: !\\ !=== -For example, the pattern `{"message": "%enc{%m}{JSON}"}` could be used +For example, the pattern `{"message": "%enc{%m}\{JSON}"}` could be used to output a valid JSON document containing the log message as a string value. @@ -730,8 +730,8 @@ Using the CRLF encoding format, the following characters are replaced: !Converted into literal strings "\r" and "\n" respectively !=== -|*equals*{pattern}{test}{substitution} + -*equalsIgnoreCase*{pattern}{test}{substitution} +|*equals*\{pattern}\{test}\{substitution} + +*equalsIgnoreCase*\{pattern}\{test}\{substitution} |Replaces occurrences of 'test', a string, with its replacement 'substitution' in the string resulting from evaluation of the pattern. For example, "%equals{[%marker]}{[]}\{}" will replace '[]' strings @@ -761,9 +761,9 @@ will output the full trace as one would normally find with a call to `Throwable.printStackTrace()`. You can follow the throwable conversion word with an option in the form -`%throwable{option}`. +`%throwable\{option}`. -`%throwable{short}` outputs the first line of the Throwable. +`%throwable\{short}` outputs the first line of the Throwable. `%throwable{short.className}` outputs the name of the class where the exception occurred. @@ -781,9 +781,9 @@ exception occurred. `%throwable{short.localizedMessage}` outputs the localized message. -`%throwable{n}` outputs the first n lines of the stack trace. +`%throwable\{n}` outputs the first n lines of the stack trace. -Specifying `%throwable{none}` or `%throwable{0}` suppresses output of +Specifying `%throwable\{none}` or `%throwable\{0}` suppresses output of the exception. Use `{filters(packages)}` where _packages_ is a list of package names to @@ -804,7 +804,7 @@ Generating the file information (link:#LocationInformation[location information]) is an expensive operation and may impact performance. Use with caution. -|*highlight*{pattern}{style} +|*highlight*\{pattern}\{style} |Adds ANSI colors to the result of the enclosed pattern based on the current event's logging level. (See Jansi link:#enable-jansi[configuration].) @@ -833,7 +833,7 @@ The default colors for each level are: !=== The color names are ANSI names defined in the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/pattern/AnsiEscape.html[`AnsiEscape`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/pattern/AnsiEscape.html[`AnsiEscape`] class. The color and attribute names and are standard, but the exact shade, @@ -854,7 +854,7 @@ You can use the default colors with: %highlight{%d [%t] %-5level: %msg%n%throwable} .... -You can override the default colors in the optional {style} option. For +You can override the default colors in the optional `\{style}` option. For example: .... @@ -900,14 +900,14 @@ The STYLE value can be one of: !TRACE !Normal !=== -|[[PatternMap]] *K*{key} + -*map*{key} + -*MAP*{key} +|[[PatternMap]] *K*\{key} + +*map*\{key} + +*MAP*\{key} |Outputs the entries in a -link:../log4j-api/apidocs/org/apache/logging/log4j/message/MapMessage.html[MapMessage], -if one is present in the event. The *K* conversion character can be +link:../javadoc/log4j-api/org/apache/logging/log4j/message/MapMessage.html[MapMessage], +if one is present in the event. The `K` conversion character can be followed by the key for the map placed between braces, as in -*%K{clientNumber}* where `clientNumber` is the key. The value in the +`%K\{clientNumber}` where `clientNumber` is the key. The value in the Map corresponding to the key will be output. If no additional sub-option is specified, then the entire contents of the Map key value pair set is output using a format {{key1,val1},{key2,val2}} @@ -931,13 +931,13 @@ Generating line number information (link:#LocationInformation[location information]) is an expensive operation and may impact performance. Use with caution. -|[[PatternMessage]] *m*{lookups}{ansi} + -*msg*{lookups}{ansi} + -*message{lookups}{ansi} +|[[PatternMessage]] *m*\{lookups}\{ansi} + +*msg*\{lookups}\{ansi} + +*message\{lookups}\{ansi} |Outputs the application supplied message associated with the logging event. -Add `{ansi}` to render messages with ANSI escape codes (requires JAnsi, +Add `\{ansi}` to render messages with ANSI escape codes (requires JAnsi, see link:#enable-jansi[configuration].) The default syntax for embedded ANSI codes is: @@ -977,7 +977,7 @@ The call site can look like this: logger.info("@\|KeyStyle {}\|@ = @\|ValueStyle {}\|@", entry.getKey(), entry.getValue()); .... -Use `{lookups}` to log messages like `"${date:YYYY-MM-dd}"` using lookups. +Use `\{lookups}` to log messages like `"${date:YYYY-MM-dd}"` using lookups. using any lookups. This will replace the date template `{date:YYYY-MM-dd}` with an actual date. This can be confusing in many cases, and it's often both easier and more obvious to handle the lookup in code. @@ -1008,9 +1008,9 @@ If the length is greater than 20, then the output will contain a trailing ellipsis. If the provided length is invalid, a default value of 100 is used. -Example syntax: `%maxLen{%p: %c{1} - %m%notEmpty{ =>%ex{short}}}{160}` +Example syntax: `%maxLen{%p: %c\{1} - %m%notEmpty{ =>%ex\{short}}}\{160}` will be limited to 160 characters with a trailing ellipsis. Another -example: `%maxLen{%m}{20}` will be limited to 20 characters and no +example: `%maxLen{%m}\{20}` will be limited to 20 characters and no trailing ellipsis. |[[PatternNewLine]] *n* @@ -1031,9 +1031,9 @@ event was created. underlying platform. An optional default value may be specified to be shown if the platform does not support process IDs. -|[[VariablesNotEmpty]] *variablesNotEmpty*{pattern} + -*varsNotEmpty*{pattern} + -*notEmpty*{pattern} +|[[VariablesNotEmpty]] *variablesNotEmpty*\{pattern} + +*varsNotEmpty*\{pattern} + +*notEmpty*\{pattern} |Outputs the result of evaluating the pattern if and only if all variables in the pattern are not empty. @@ -1094,12 +1094,12 @@ upper-case): |Outputs the number of milliseconds elapsed since the JVM was started until the creation of the logging event. -|[[PatternRepeat]] *R*{string}{count} + -*repeat*{string}{count} +|[[PatternRepeat]] *R*\{string}\{count} + +*repeat*\{string}\{count} |Produces a string containing the requested number of instances of the specified string. -For example, "%repeat{\*}{2}" will result in the string "**". +For example, "%repeat{\*}\{2}" will result in the string "**". -|[[PatternReplace]] *replace*{pattern}{regex}{substitution} +|[[PatternReplace]] *replace*\{pattern}\{regex}\{substitution} |Replaces occurrences of 'regex', a regular expression, with its replacement 'substitution' in the string resulting from evaluation of the pattern. For example, "%replace{%msg}{\s}\{}" will remove all @@ -1127,10 +1127,10 @@ printed starting with the first exception that was thrown followed by each subsequent wrapping exception. The throwable conversion word can be followed by an option in the form -`%rEx{short}` which will only output the first line of the Throwable or -`%rEx{n}` where the first n lines of the stack trace will be printed. +`%rEx\{short}` which will only output the first line of the Throwable or +`%rEx\{n}` where the first n lines of the stack trace will be printed. -Specifying `%rEx{none}` or `%rEx{0}` will suppress printing of the +Specifying `%rEx\{none}` or `%rEx\{0}` will suppress printing of the exception. Use `filters(packages)` where _packages_ is a list of package names to @@ -1149,7 +1149,7 @@ only when there is a throwable to print. every event. The counter is a static variable so will only be unique within applications that share the same converter Class object. -|[[PatternStyle]] *style*{pattern}{ANSI style} +|[[PatternStyle]] *style*\{pattern}{ANSI style} |Uses ANSI escape sequences to style the result of the enclosed pattern. The style can consist of a comma separated list of style names from the following table. (See Jansi link:#enable-jansi[configuration].) @@ -1282,7 +1282,7 @@ logging event. |Outputs the Thread Context Map (also known as the Mapped Diagnostic Context or MDC) associated with the thread that generated the logging event. The *X* conversion character can be followed by one or more keys -for the map placed between braces, as in *%X{clientNumber}* where +for the map placed between braces, as in *%X\{clientNumber}* where `clientNumber` is the key. The value in the MDC corresponding to the key will be output. @@ -1296,7 +1296,7 @@ value pair set is output using a format {key1=val1, key2=val2}. The key/value pairs will be printed in sorted order. See the -link:../log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html[ThreadContext] +link:../javadoc/log4j-api/org/apache/logging/log4j/ThreadContext.html[ThreadContext] class for more details. |[[PatternUUID]] *u*{"RANDOM" \| "TIME"} + @@ -1334,9 +1334,9 @@ class packaging data will be preceded by a tilde, i.e. the '~' character. The throwable conversion word can be followed by an option in the form -`%xEx{short}` which will only output the first line of the Throwable or -`%xEx{n}` where the first n lines of the stack trace will be printed. -Specifying `%xEx{none}` or `%xEx{0}` will suppress printing of the +`%xEx\{short}` which will only output the first line of the Throwable or +`%xEx\{n}` where the first n lines of the stack trace will be printed. +Specifying `%xEx\{none}` or `%xEx\{0}` will suppress printing of the exception. Use `filters(packages)` where _packages_ is a list of package names to @@ -1347,7 +1347,7 @@ example: `separator(\|)`. The default value is the `line.separator` system property, which is operating system dependent. The `ansi` option renders stack traces with ANSI escapes code using the -JAnsi library. (See link:#enable-jansi[configuration].) Use `{ansi}` to +JAnsi library. (See link:#enable-jansi[configuration].) Use `\{ansi}` to use the default color mapping. You can specify your own mappings with `key=value` pairs. The keys are: @@ -1501,11 +1501,13 @@ in stack traces. [source,xml] ---- - - org.junit,org.apache.maven,sun.reflect,java.lang.reflect - -... - + + + org.junit,org.apache.maven,sun.reflect,java.lang.reflect + + + + ---- The result printed to the console will appear similar to: @@ -1581,7 +1583,7 @@ the pattern specified on that PatternMatch element will be used. ==== ScriptPatternSelector The ScriptPatternSelector executes a script as descibed in the -link:../configuration.html#Scripts[Scripts] section of the Configuration +xref:manual/configuration.adoc#Scripts[Scripts] section of the Configuration chapter. The script is passed all the properties configured in the Properties section of the configuration, the StrSubstitutor used by the Confguration in the "substitutor" variables, and the log event in the @@ -1797,7 +1799,7 @@ be taken. However, asynchronous loggers need to make this decision before passing the log message to another thread; the location information will be lost after that point. The -link:../performance.html#asyncLoggingWithLocation[performance impact] of +xref:manual/performance.adoc#asyncLoggingWithLocation[performance impact] of taking a stack trace snapshot is even higher for asynchronous loggers: logging with location is 30-100 times slower than without location. For this reason, asynchronous loggers and asynchronous appenders do not diff --git a/src/site/asciidoc/manual/log4j1-compat.adoc b/src/site/antora/modules/ROOT/pages/manual/log4j1-compat.adoc similarity index 100% rename from src/site/asciidoc/manual/log4j1-compat.adoc rename to src/site/antora/modules/ROOT/pages/manual/log4j1-compat.adoc diff --git a/src/site/asciidoc/manual/logbuilder.adoc b/src/site/antora/modules/ROOT/pages/manual/logbuilder.adoc similarity index 97% rename from src/site/asciidoc/manual/logbuilder.adoc rename to src/site/antora/modules/ROOT/pages/manual/logbuilder.adoc index 6f428f000aa..f6b93f158a8 100644 --- a/src/site/asciidoc/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] @@ -53,7 +52,7 @@ can simply ask for the stack trace entry at a fixed index instead of having to w to determine the calling class. Of course, if the location information will not be used by the layout this will result in slower performance. -=== Location Performance +== Location Performance The table below shows some of the results from the FileAppenderBenchmark and FileAppenderWithLocationBenchmark classes in the log4j-perf-test project when configured to use 4 threads. The results show that lazily including @@ -63,7 +62,7 @@ it is still about 2.5 times slower than not including location information. The tests were run on a 2018 MacBook Pro with a 2.9 GHz Intel Core i9 processor with 6 cores, 32 GB of memory and 1 TB of SSD storage on Java 11 using Log4j 2.13.0 and Logback 1.2.3. -image:../images/LocationPerf.png[Location Performance] +image:LocationPerf.png[Location Performance] |=== |Test|Print Location Info|No Location Info Printed diff --git a/src/site/asciidoc/manual/logsep.adoc b/src/site/antora/modules/ROOT/pages/manual/logsep.adoc similarity index 94% rename from src/site/asciidoc/manual/logsep.adoc rename to src/site/antora/modules/ROOT/pages/manual/logsep.adoc index 284e9efeba8..6ccb02937ee 100644 --- a/src/site/asciidoc/manual/logsep.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/logsep.adoc @@ -72,7 +72,7 @@ default, each JAR bundle is scanned for its own Log4j configuration file. Similar to the web application paradigm, every bundle has its own LoggerContext. As this may be undesirable when a global Log4j configuration is wanted, then the -link:extending.html#ContextSelector[ContextSelector] should be +xref:manual/extending.adoc#ContextSelector[ContextSelector] should be overridden with `BasicContextSelector` or `JndiContextSelector`. [#Approaches] @@ -99,9 +99,9 @@ system property `log4j2.contextSelector` to create a single LoggerContext using a single configuration that will be shared across all applications. 2. Place the logging jars in the container's classpath and use the -default ClassLoaderContextSelector. Follow the -link:webapp.html[instructions to initialize Log4j 2 in a web -application]. Each application can be configured to share the same +default ClassLoaderContextSelector. +See the instructions shared in link:/log4j/jakarta[Log4j Jakarta EE]. +Each application can be configured to share the same configuration used at the container or can be individually configured. If status logging is set to debug in the configuration there will be output from when logging is initialized in the container and then again @@ -109,7 +109,7 @@ in each web application. The `JndiContextSelector` will not work unless `log4j2.enableJndi=true` is set as a system property or environment variable. See the -link:./configuration.html#enableJndi[log4j2.enableJndi] system property. +xref:manual/configuration.adoc#enableJndi[log4j2.enableJndi] system property. The exact method for setting system properties depends on the container. For Tomcat, edit `$CATALINA_HOME/conf/catalina.properties`. Consult the diff --git a/src/site/asciidoc/manual/lookups.adoc b/src/site/antora/modules/ROOT/pages/manual/lookups.adoc similarity index 85% rename from src/site/asciidoc/manual/lookups.adoc rename to src/site/antora/modules/ROOT/pages/manual/lookups.adoc index a10e9aa4b92..7bc82be0bd9 100644 --- a/src/site/asciidoc/manual/lookups.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/lookups.adoc @@ -20,10 +20,10 @@ Ralph Goers Lookups provide a way to add values to the Log4j configuration at arbitrary places. They are a particular type of Plugin that implements the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/lookup/StrLookup.html[`StrLookup`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/lookup/StrLookup.html[`StrLookup`] interface. Information on how to use Lookups in configuration files can -be found in the link:configuration.html#PropertySubstitution[Property -Substitution] section of the link:configuration.html[Configuration] +be found in the xref:manual/configuration.adoc#PropertySubstitution[Property +Substitution] section of the xref:manual/configuration.adoc[Configuration] page. [#ContextMapLookup] @@ -96,6 +96,7 @@ Log4j Docker provides access to the following container attributes: |The first 12 characters of the image id. |=== +[source,xml] ---- @@ -104,7 +105,7 @@ Log4j Docker provides access to the following container attributes: ---- -This Lookup is subject to the requirements listed at link:../log4j-docker/index.html[Log4j Docker Support] +This Lookup is subject to the requirements listed at xref:log4j-docker.adoc[Log4j Docker Support] [#EnvironmentLookup] == Environment Lookup @@ -173,7 +174,7 @@ The EventLookup provides access to fields within the log event from the configur In this example the RoutingAppender picks a route based on the presence of a Marker named "AUDIT" being present in the log event. -[source,prettyprint,linenums] +[source,xml] ---- @@ -269,7 +270,7 @@ For example: As of Log4j 2.15.1 JNDI operations require that `log4j2.enableJndi=true` be set as a system property or the corresponding environment variable for this lookup to function. See the -link:./configuration.html#enableJndi[log4j2.enableJndi] system property. +xref:manual/configuration.adoc#enableJndiLookup[log4j2.enableJndiLookup] system property. The JndiLookup allows variables to be retrieved via JNDI. By default the key will be prefixed with java:comp/env/, however if the key contains a @@ -356,10 +357,11 @@ application to Log4j: [source,java] ---- import org.apache.logging.log4j.core.lookup.MainMapLookup; - -public static void main(String args[]) { - MainMapLookup.setMainArguments(args); - ... +public class Main { + public static void main(String[] args) { + MainMapLookup.setMainArguments(args); + // ... + } } ---- @@ -410,7 +412,6 @@ Then the following substitutions are possible: |${main:bar} |null -|=== |${main:\--quiet:-true} |true @@ -435,21 +436,21 @@ The MapLookup serves several purposes. 1. Provide the base for Properties declared in the configuration file. 2. Retrieve values from MapMessages in LogEvents. 3. Retrieve values set with -link:../log4j-core/apidocs/org/apache/logging/log4j/core/lookup/MapLookup.html#setMainArguments%28java.lang.String%5B%5D%29[MapLookup.setMainArguments(String[])] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/lookup/MapLookup.html#setMainArguments%28java.lang.String%5B%5D%29[MapLookup.setMainArguments(String[])] The first item simply means that the MapLookup is used to substitute properties that are defined in the configuration file. These variables -are specified without a prefix - e.g. `${name}`. The second usage allows +are specified without a prefix - e.g. `$\{name}`. The second usage allows a value from the current -link:../log4j-api/apidocs/org/apache/logging/log4j/message/MapMessage.html[`MapMessage`], +link:../javadoc/log4j-api/org/apache/logging/log4j/message/MapMessage.html[`MapMessage`], if one is part of the current log event, to be substituted. In the example below the RoutingAppender will use a different RollingFileAppender for each unique value of the key named "type" in the MapMessage. Note that when used this way a value for "type" should be declared in the properties declaration to provide a default value in case the message is not a MapMessage or the MapMessage does not contain -the key. See the link:configuration.html#PropertySubstitution[Property -Substitution] section of the link:configuration.html[Configuration] +the key. See the xref:manual/configuration.adoc#PropertySubstitution[Property +Substitution] section of the xref:manual/configuration.adoc[Configuration] page for information on how to set the default values. [source,xml] @@ -469,6 +470,8 @@ page for information on how to set the default values. ---- +== Marker Lookup + The marker lookup allows you to use markers in interesting configurations like a routing appender. Consider the following YAML configuration and code that logs to different files based on markers: @@ -545,7 +548,7 @@ values it will also return the name portion of the id (not including the enterprise number) and the type field. The main difference between the example below and the example for MapMessage is that the "type" is an attribute of the -link:../log4j-api/apidocs/org/apache/logging/log4j/message/StructuredDataMessage.html[StructuredDataMessage] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/StructuredDataMessage.html[StructuredDataMessage] while "type" would have to be an item in the Map in a MapMessage. [source,xml] @@ -624,45 +627,6 @@ retrieved: |attr._name_ |Returns the ServletContext attribute with the specified name -|request.attr._name_ -|Returns the ServletRequest attribute with the specified name - requires Log4jServletFilter - -|header._name_ -|Returns the HttpServletRequest header with the specified name - requires Log4jServletFilter - -|cookie._name_ -|Returns the HttpServletRequest cookie with the specified name - requires Log4jServletFilter - -|header._name_ -|Returns the HttpServletRequest header with the specified name - requires Log4jServletFilter - -|request._method_ -|Returns the HttpServletRequest method - requires Log4jServletFilter - -|request._uri_ -|Returns the HttpServletRequest URI - requires Log4jServletFilter - -|request._url_ -|Returns the HttpServletRequest URL - requires Log4jServletFilter - -|request._remoteAddress_ -|Returns the HttpServletRequest remote address - requires Log4jServletFilter - -|request._remoteHost_ -|Returns the HttpServletRequest remote host - requires Log4jServletFilter - -|request.parameter._name_ -|Returns the HttpServletRequest parameter - requires Log4jServletFilter - -|request.principal -|Returns the HttpServletRequest principal name - requires Log4jServletFilter - -|session.id -|Returns the HttpSession id or null if none is started - requires Log4jServletFilter - -|session.attr._name_ -|Returns the HttpSession attribute value (using _toString()_ if not null) or null if absent - requires Log4jServletFilter - |contextPath |The context path of the web application @@ -707,22 +671,3 @@ located then the corresponding value will be returned. ---- - -=== Request lookups and asynchronous calls - -Servlet 3.0 supports asynchronous calls, by default the request tracking - and therefore request related lookups, -will not work. To make it work you can extract the servlet context attribute `log4j.requestExecutor` which -is a `BiConsumer` and call it passing the correct request and task to execute -synchronously. During this task execution the lookups will be set up properly: - -[source,java] ----- -@GET // example using JAX-RS asynchronous feature backed by servlet AsyncContext -public void get(@Suspended AsyncResponse response, - @Context ServletContext context, - @Context ServletRequest request) { - final BiConsumer log4jWrapper = - (BiConsumer) context.getAttribute("log4j.requestExecutor"); - myThreadPool.submit(() -> log4jWrapper.accept(request, () -> response.resume(doInternalGet())); -} ----- diff --git a/src/site/asciidoc/manual/markers.adoc b/src/site/antora/modules/ROOT/pages/manual/markers.adoc similarity index 98% rename from src/site/asciidoc/manual/markers.adoc rename to src/site/antora/modules/ROOT/pages/manual/markers.adoc index c705f7163a8..41dc4245bd3 100644 --- a/src/site/asciidoc/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 - -[#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/asciidoc/manual/messages.adoc b/src/site/antora/modules/ROOT/pages/manual/messages.adoc similarity index 91% rename from src/site/asciidoc/manual/messages.adoc rename to src/site/antora/modules/ROOT/pages/manual/messages.adoc index e80a012d5e8..7769192eb81 100644 --- a/src/site/asciidoc/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 - -[#Messages] -== Messages += Messages Although Log4j 2 provides Logger methods that accept Strings and Objects, all of these are ultimately captured in Message objects that @@ -77,7 +73,7 @@ public class SQLMessage implements Message { public enum SQLType { UPDATE, QUERY - }; + } private final SQLType type; private final String table; @@ -101,7 +97,8 @@ public class SQLMessage implements Message { case QUERY: return createQueryString(); break; - default; + default: + throw new UnsupportedOperationException(); } } @@ -160,7 +157,7 @@ public class MyApp { public String doUpdate(String table, Map params) { logger.entry(param); - logger.debug(UPDATE_MARKER, new SQLMessage(SQLMessage.SQLType.UPDATE, table, parmas); + logger.debug(UPDATE_MARKER, new SQLMessage(SQLMessage.SQLType.UPDATE, table, parmas)); return logger.exit(); } @@ -177,10 +174,10 @@ Layouts can be written to take special action when an `SQLMessage` is encountered. [#FormattedMessage] -=== FormattedMessage +== FormattedMessage The message pattern passed to a -link:../log4j-api/apidocs/org/apache/logging/log4j/message/FormattedMessage.html[`FormattedMessage`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/FormattedMessage.html[`FormattedMessage`] is first checked to see if it is a valid `java.text.MessageFormat` pattern. If it is, a `MessageFormatMessage` is used to format it. If not it is next checked to see if it contains any tokens that are valid @@ -189,9 +186,9 @@ is used to format it. Finally, if the pattern doesn't match either of those then a `ParameterizedMessage` is used to format it. [#LocalizedMessage] -=== LocalizedMessage +== LocalizedMessage -link:../log4j-api/apidocs/org/apache/logging/log4j/message/LocalizedMessage.html[`LocalizedMessage`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/LocalizedMessage.html[`LocalizedMessage`] is provided primarily to provide compatibility with Log4j 1.x. Generally, the best approach to localization is to have the client UI render the events in the client's locale. @@ -203,7 +200,7 @@ with the name of the Logger used to log the event. The message retrieved from the bundle will be formatted using a FormattedMessage. [#LoggerNameAwareMessage] -=== LoggerNameAwareMessage +== LoggerNameAwareMessage `LoggerNameAwareMessage` is an interface with a `setLoggerName` method. This method will be called during event construction so that the Message has @@ -211,7 +208,7 @@ the name of the Logger used to log the event when the message is being formatted. [#MapMessage] -=== MapMessage +== MapMessage A `MapMessage` contains a Map of String keys and values. `MapMessage` implements `FormattedMessage` and accepts format specifiers of "XML", @@ -225,24 +222,24 @@ Some Appenders make special use of `MapMessage` objects: * When a JMS Appender is configured with a no layout, it converts a Log4j `MapMessage` to a JMS `javax.jms.MapMessage`. -* When a link:appenders.html#JDBCAppender[JDBC Appender] is configured +* When a xref:manual/appenders.adoc#JDBCAppender[JDBC Appender] is configured with no layout, it converts a Log4j `MapMessage` to values in a SQL INSERT statement. -* When a link:appenders.html#NoSQLAppenderMongoDB4[MongoDB4 Appender] is +* When a xref:manual/appenders.adoc#NoSQLAppenderMongoDB4[MongoDB4 Appender] is configured with no layout, it converts a Log4j `MapMessage` to fields in a MongoDB object. [#MessageFormatMessage] -=== MessageFormatMessage +== MessageFormatMessage -link:../log4j-api/apidocs/org/apache/logging/log4j/message/MessageFormatMessage.html[`MessageFormatMessage`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/MessageFormatMessage.html[`MessageFormatMessage`] handles messages that use a https://docs.oracle.com/javase/7/docs/api/java/text/MessageFormat.html[conversion format]. While this `Message` has more flexibility than `ParameterizedMessage`, it is also about two times slower. [#MultiformatMessage] -=== MultiformatMessage +== MultiformatMessage A `MultiformatMessage` will have a getFormats method and a `getFormattedMessage` method that accepts and array of format Strings. The @@ -255,28 +252,28 @@ which accepts a format String of "XML" which will cause it to format the event data as XML instead of the RFC 5424 format. [#ObjectMessage] -=== ObjectMessage +== ObjectMessage Formats an `Object` by calling its `toString` method. Since Log4j 2.6, Layouts trying to be low-garbage or garbage-free will call the `formatTo(StringBuilder)` method instead. [#ParameterizedMessage] -=== ParameterizedMessage +== ParameterizedMessage -link:../log4j-api/apidocs/org/apache/logging/log4j/message/ParameterizedMessage.html[`ParameterizedMessage`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/ParameterizedMessage.html[`ParameterizedMessage`] handles messages that contain "\{}" in the format to represent replaceable tokens and the replacement parameters. [#ReusableObjectMessage] -=== ReusableObjectMessage +== ReusableObjectMessage In garbage-free mode, this message is used to pass logged Objects to the Layout and Appenders. Functionally equivalent to <>. [#ReusableParameterizedMessage] -=== ReusableParameterizedMessage +== ReusableParameterizedMessage In garbage-free mode, this message is used to handle messages that contain "\{}" in the format to represent replaceable tokens and the @@ -284,22 +281,22 @@ replacement parameters. Functionally equivalent to <>. [#ReusableSimpleMessage] -=== ReusableSimpleMessage +== ReusableSimpleMessage In garbage-free mode, this message is used to pass logged `String`s and `CharSequence`s to the Layout and Appenders. Functionally equivalent to <>. [#SimpleMessage] -=== SimpleMessage +== SimpleMessage `SimpleMessage` contains a `String` or `CharSequence` that requires no formatting. [#StringFormattedMessage] -=== StringFormattedMessage +== StringFormattedMessage -link:../log4j-api/apidocs/org/apache/logging/log4j/message/StringFormattedMessage.html[`StringFormattedMessage`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/StringFormattedMessage.html[`StringFormattedMessage`] handles messages that use a https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax[conversion format] that is compliant with @@ -308,21 +305,21 @@ While this Message has more flexibility than `ParameterizedMessage`, it is also 5 to 10 times slower. [#StructuredDataMessage] -=== StructuredDataMessage +== StructuredDataMessage -link:../log4j-api/apidocs/org/apache/logging/log4j/message/StructuredDataMessage.html[`StructuredDataMessage`] +link:../javadoc/log4j-api/org/apache/logging/log4j/message/StructuredDataMessage.html[`StructuredDataMessage`] allows applications to add items to a `Map` as well as set the id to allow a message to be formatted as a Structured Data element in accordance with http://tools.ietf.org/html/rfc5424[RFC 5424]. [#ThreadDumpMessage] -=== ThreadDumpMessage +== ThreadDumpMessage A ThreadDumpMessage, if logged, will generate stack traces for all threads. The stack traces will include any locks that are held. [#TimestampMessage] -=== TimestampMessage +== TimestampMessage A TimestampMessage will provide a `getTimestamp` method that is called during event construction. The timestamp in the Message will be used in diff --git a/src/site/antora/modules/ROOT/pages/manual/migration.adoc b/src/site/antora/modules/ROOT/pages/manual/migration.adoc new file mode 100644 index 00000000000..202cae8d919 --- /dev/null +++ b/src/site/antora/modules/ROOT/pages/manual/migration.adoc @@ -0,0 +1,448 @@ +//// +Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +//// + += 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. + +This page explains how to migrate applications or libraries currently using the Log4j 1.x API to use Log4j v2 as their main logging framework. + +[#Log4j12Bridge] +== Option 1: use the Log4j 1.x bridge (log4j-1.2-api) + +You may be able to convert an application to Log4j 2 _without any code changes_ by replacing the Log4j 1.x jar file with Log4j 2's `log4j-1.2-api.jar`. + +The Log4j 1.x bridge is useful when: + +* the application itself is (maybe partly) still using the Log4j 1.x API, or if +* the application depends on a library which depends on the Log 1.x API, or +* the application needs to support logging configurations in the old Log4j 1.x format. + +To use this option, applications need to use the following three jar files: the Log4j 2 API jar (`log4j-api.jar`), the Log4j 2 implementation jar (`log4j-core.jar`) and the Log4j 1.x bridge jar (`log4j-1.2-api.jar`). + +image:whichjar-log4j-1.2-api.png[Using log4j 2 via the log4j 1.x API] + +For most applications this is sufficient. +This is a low-effort way to migrate, and may also allow for migration to proceed gradually over time. + +[#EnablingLog4j12Bridge] +=== Enabling the Log4j 1.x bridge + +Enable the Log4j 1.x bridge via one of the following steps: + +. Set the system property "log4j1.compatibility" to a value of "true". +Log4j 2 will then add log4j.properties, log4j-test.properties, log4j.xml and log4j-test.xml to the xref:manual/configuration.adoc#AutomaticConfiguration[configuration files] it searches for on the class path. +. Set the Log4j 1 system property "log4j.configuration" to the location of the log4j 1 configuration file. +The files must have a file extension of either ".properties" or ".xml". + +[#APICompatibility] +=== API Compatibility + +Log4j 2 provides support for the Log4j 1 logging methods by providing alternate implementations of the classes containing those methods. +These classes may be found in the log4j-1.2-api jar distributed with the project. +All calls to perform logging will result in the data passed to the logging methods to be forwarded to the Log4j2 API where they can be processed by implementations of the Log4j 2 API. + +[#ConfigurationCompatibility] +=== Configuration Compatibility + +Log4j 2 provides support for Log4j 1 configuration files. +Configuration of the Appenders, Layouts and Filters that were provided in the Log4j 1 distribution will be redirected to their Log4j 2 counterparts - with the exception of the implemented Rewrite Policies. +This means that although the behavior of these components will be similar, they may not be exactly the same. +For example, the XML generated by the XMLLayout may not exactly match the XML generated by the Log4j1XMLLayout. + +In addition, Log4j 2 supports custom Log4j 1 Appenders, Filters, and Layouts with some constraints. +Since the original Log4j 1 components may not be present in Log4j 2, custom components that extend them will fail. + +==== Supported Components + +Supported Appenders include: AsyncAppender, ConsoleAppender, DailyRollingFileAppender, FileAppender, NullAppender, RewriteAppender (limited), RollingFileAppender, SyslogAppender. + +Supported Filters include: DenyAllFilter, LevelMatchFilter, LevelRangeFilter, StringMatchFilter. + +Supported Layouts include: HtmlLayout, PatternLayout, SimpleLayout, TTCCLayout , XmlLayout. + +Supported Rewrite Policies include: MapRewritePolicy, PropertyRewritePolicy. + +==== Unsupported or Unimplemented Components + +If your configuration contains any of the below components, consider xref:#Log4j2ConfigurationFormat[migrating your configuration] to the Log4j 2 format. + +===== Appenders + +* JDBCAppender (cannot be mapped to Log4j 2's JdbcAppender) +* JMSAppender +* SMTPAppender +* SocketAppender (Requires the use of the SerializedLayout which is a security risk) +* SocketHubAppender (Requires the use of the SerializedLayout which is a security risk) +* TelnetAppender (Security risk) + +===== Rewrite Policies + +* ReflectionRewritePolicy +* Custom rewrite policies since LoggingEvent is currently a no-op. + +===== Renderers + +Log4j 2 currently ignores renderers. + +[#Log4j12BridgeLimitations] +=== Limitations of the Log4j 1.x bridge + +Applications can migrate by just using the bridge without further code changes, if they meet the following requirements: + +. They must not access methods and classes internal to the Log4j 1.x implementation such as ``Appender``s, `LoggerRepository` or ``Category``'s `callAppenders` method. +. They must not programmatically configure Log4j. +. They must not configure by calling the Log4j 1.x classes `DOMConfigurator` or `PropertyConfigurator`. + +=== When to stop using the Log4j 1.x bridge + +Once you have migrated all of your own application and library code under your control, you may not need the bridge anymore. +Note that when you use a library/framework that can be configured to use several logging frameworks, then you typically don't need the log4j-1.2-api bridge either, as you may be able to directly configure it to use Log4j v2 instead v1. +Some libraries/frameworks even auto-detect the presence of certain logging framework implementations on their classpath, and automagically switch their internal logging delegation accordingly; +try simple removing the Log4j v1 dependency instead of replacing it with this bridge, and test if logging from all of your dependencies still work. + +If you own or can contribute open source to the library you depend on, consider replacing its use of the Log4j v1 API with the v2 API. + +While the Log4j 1.x bridge supports logging configurations that use the Log4j 1.x properties or XML format, migrating to the new 2.x format is not difficult. +The Log4j 2 website contains extensive documentation on the 2.x configuration format. +Examples for migrating logging configurations from the v1 format to the v2 format are below. + +[#Log4j2API] +== Option 2: convert your application to the Log4j 2 API (log4j-api) + +The other migration option involves changing your application code to use the Log4j 2 API. +For the most part, converting from the Log4j 1.x API to Log4j 2 should be fairly simple. +Many of the log statements will require no modification. +However, where necessary the following changes must be made. + +image:whichjar-log4j-api.png[Using log4j 2 via the log4j 2.x API] + +|=== +| Log4j 1.x | Log4j 2.x + +| Package name: `org.apache.log4j` +| `org.apache.logging.log4j` + +| Calls to `org.apache.log4j.Logger.getLogger()` +| `org.apache.logging.log4j.LogManager.getLogger()` + +| Calls to `org.apache.log4j.Logger.getRootLogger()` or `org.apache.log4j.LogManager.getRootLogger()` +| `org.apache.logging.log4j.LogManager.getRootLogger()` + +| Calls to `org.apache.log4j.Logger.getLogger` that accept a `LoggerFactory` +| Remove the `org.apache.log4j.spi.LoggerFactory` and use one of Log4j 2's other extension mechanisms + +| Calls to `org.apache.log4j.Logger.getEffectiveLevel()` +| `org.apache.logging.log4j.Logger.getLevel()` + +| Calls to `org.apache.log4j.LogManager.shutdown()` +| Not needed in version 2 because the Log4j Core now automatically adds a JVM shutdown hook on start up to perform any Core clean ups. +Starting in Log4j 2.1, you can specify a custom link:../javadoc/log4j-core/org/apache/logging/log4j/core/util/ShutdownCallbackRegistry.html[ShutdownCallbackRegistry] to override the default JVM shutdown hook strategy. +Starting in Log4j 2.6, you can use `org.apache.logging.log4j.LogManager.shutdown()` to initiate shutdown manually. + +| Calls to `org.apache.log4j.Logger.setLevel()` or similar methods +| Not supported at API level. +Equivalent functionality is provided in the Log4j 2 implementation classes, see `org.apache.logging.log4j.core.config.Configurator.setLevel()`, but this may leave the application susceptible to changes in Log4j 2 internals. + +| String concatenation like `logger.info("hi " + userName)` +| Parameterized messages like `logger.info("hi {}", userName)` + +| http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/MDC.html[`org.apache.log4j.MDC`] and http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/NDC.html[`org.apache.log4j.NDC`] +| xref:manual/thread-context.adoc[Thread Context] +|=== + +[#Log4j2ConfigurationFormat] +== Migrating logging configurations to the Log4j 2 format + +Although the Log4j 2 configuration syntax is different from that of Log4j 1.x, most, if not all, of the same functionality is available. + +=== Interpolation + +Note that system property interpolation via the `+${foo}+` syntax has been extended to allow property lookups from many different sources. +See the xref:manual/lookups.adoc[Lookups] documentation for more details. +For example, using a lookup for the system property named `catalina.base`, in Log4j 1.x, the syntax would be `${catalina.base}`. +In Log4j 2, the syntax would be `${sys:catalina.base}`. + +=== Layouts + +Log4j 1.x has a XMLLayout which is different from the XmlLayout in Log4j 2. +The log4j-1.2-api module contains a `Log4j1XmlLayout` that produces output in the Log4j 1.x format. + +The Log4j 1.x `SimpleLayout` can be emulated with PatternLayout "%level - %m%n". + +The Log4j 1.x `TTCCLayout` can be emulated with PatternLayout "%r [%t] %p %c %notEmpty{%ndc }- %m%n". + +Both `PatternLayout` and `EnhancedPatternLayout` in Log4j 1.x can be replaced with `PatternLayout` in Log4j 2. +The log4j-1.2-api module contains two pattern conversions "%ndc" and "%properties" which can be used to emulate "%x" and "%X" in Log4j 1.x PatternLayout ("%x" and %X" in Log4j 2 have a slightly different format). + +Below are some example configurations for Log4j 1.x and their counterparts in Log4j 2. + +=== Sample 1 - Migrating a simple Console Appender configuration + +Log4j 1.x XML configuration + +[,xml] +---- + + + + + + + + + + + + + + + +---- + +Log4j 2 XML configuration + +[,xml] +---- + + + + + + + + + + + + + +---- + +=== Sample 2 - Migrating a simple File Appender, XMLLayout and SimpleLayout configuration + +Log4j 1.x XML configuration + +[,xml] +---- + + + + + + + + + + + + + + + + + + + +---- + +Log4j 2 XML configuration + +[,xml] +---- + + + + + + + + + + + + + + + + + + +---- + +=== Sample 3 - Migrating a SocketAppender configuration + +Log4j 1.x XML configuration. +This example from Log4j 1.x is misleading. +The SocketAppender does not actually use a Layout. +Configuring one will have no effect. + +[,xml] +---- + + + + + + + + + + + + + + + + + + + + + + + + +---- + +Log4j 2 XML configuration + +[,xml] +---- + + + + + + + + + + + + + + + + + + +---- + +=== Sample 4 - Migrating an AsyncAppender and TTCCLayout configuration + +Log4j 1.x XML configuration using the AsyncAppender. + +[,xml] +---- + + + + + + + + + + + + + + + + + + +---- + +Log4j 2 XML configuration. + +[,xml] +---- + + + + + + + + + + + + + + + +---- + +=== Sample 5 - Migrating a configuration using AsyncAppender with Console and File + +Log4j 1.x XML configuration using the AsyncAppender. + +[,xml] +---- + + + + + + + + + + + + + + + + + + + + + + +---- + +Log4j 2 XML configuration. +Note that the Async Appender should be configured after the appenders it references. +This will allow it to shut down properly. + +[,xml] +---- + + + + + + + + + + + + + + + + + + + +---- diff --git a/src/site/asciidoc/performance.adoc b/src/site/antora/modules/ROOT/pages/manual/performance.adoc similarity index 94% rename from src/site/asciidoc/performance.adoc rename to src/site/antora/modules/ROOT/pages/manual/performance.adoc index ce643eb0041..81c91d864de 100644 --- a/src/site/asciidoc/performance.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/performance.adoc @@ -77,13 +77,9 @@ little: to do X amount of work it always takes X amount of time. The serviced. _As the workload increases, wait time often grows to many times the service time._ -[[responseTimeVsServiceTime]] +[#responseTimeVsServiceTime] +=== Why Care About Response Time Latency? -.Why Care About Response Time Latency? -**** -[width="100%",cols="50%,50%"] -|=== -a| What is often measured and reported as _latency_ is actually _service time_, and omits that a service time spike adds wait time for many subsequent events. This may present results that are more optimistic @@ -105,10 +101,7 @@ To learn more, watch Gil Tene's eye-opening presentation http://www.infoq.com/presentations/latency-response-time[How NOT to measure latency]. - -|link:images/ResponseTimeVsServiceTimeAsyncLoggers.png[image:images/ResponseTimeVsServiceTimeAsyncLoggers.png[image,width=480,height=288]] -|=== -**** +image:ResponseTimeVsServiceTimeAsyncLoggers.png[image,width=480,height=288] [#loglibComparison] == Logging Library Performance Comparison @@ -145,17 +138,17 @@ appender thread needs to wait until a slot becomes available in the queue, and throughput will drop to the maximum sustained throughput of the underlying appenders at best. -image:images/async-throughput-comparison.png[Peak throughput comparison] +image:async-throughput-comparison.png[Peak throughput comparison] -For details, see the link:manual/async.html[Async Loggers] manual page. +For details, see the xref:manual/async.adoc[Async Loggers] manual page. [#asyncLoggingResponseTime] === Asynchronous Logging Response Time Response time behaviour varies a lot with the workload and the number of -threads that log concurrently. The link:manual/async.html#Latency[Async +threads that log concurrently. The xref:manual/async.adoc#Latency[Async Loggers] manual page and the -link:manual/garbagefree.html#Latency[garbage-free logging] manual page +xref:manual/garbagefree.adoc#Latency[garbage-free logging] manual page provide some graphs showing response time behaviour under various loads. This section shows another graph showing response time latency behaviour @@ -172,7 +165,7 @@ than the other. Generally, garbage-free async loggers had the best response time behaviour in all configurations we tested. -image:images/ResponseTimeAsyncLogging4Threads@16kEach.png[Response time comparison] +image:ResponseTimeAsyncLogging4Threads_16kEach.png[Response time comparison] The above result was obtained with the ResponseTimeTest class which can be found in the Log4j 2 unit test source directory, running on JDK @@ -231,7 +224,7 @@ cost increases sharply with the number of parameters. In this area, Log4j 2 still has work to do to improve: we would like to keep this cost more constant._ -image:images/ParamMsgThrpt1-4T.png[image] +image:ParamMsgThrpt1-4T.png[image] The results above are for JUL (java.util.logging) 1.8.0_45, Log4j 2.6, Log4j 1.2.17 and Logback 1.1.7, and were obtained with the @@ -247,12 +240,12 @@ the log4j-perf-test module. Some layouts can show the class, method and line number in the application where the logging call was made. In Log4j 2, examples of such layout options are HTML -link:layouts.html#HtmlLocationInfo[locationInfo], or one of the patterns -link:layouts.html#PatternClass[%C or $class], -link:layouts.html#PatternFile[%F or %file], -link:layouts.html#PatternLocation[%l or %location], -link:layouts.html#PatternLine[%L or %line], -link:layouts.html#PatternMethod[%M or %method]. In order to provide +xref:manual/layouts.adoc#HtmlLocationInfo[locationInfo], or one of the patterns +xref:manual/layouts.adoc#PatternClass[%C or $class], +xref:manual/layouts.adoc#PatternFile[%F or %file], +xref:manual/layouts.adoc#PatternLocation[%l or %location], +xref:manual/layouts.adoc#PatternLine[%L or %line], +xref:manual/layouts.adoc#PatternMethod[%M or %method]. In order to provide caller location information, the logging library will take a snapshot of the stack, and walk the stack trace to find the location information. @@ -262,7 +255,7 @@ Our tests show that _capturing caller location has a similar impact across all logging libraries, and slows down asynchronous logging by about 30-100x_. -image:images/AsyncWithLocationThrpt1T-labeled.png[image] +image:AsyncWithLocationThrpt1T-labeled.png[image] The results above are for JUL (java.util.logging) 1.8.0_45, Log4j 2.6, Log4j 1.2.17 and Logback 1.1.7, and were obtained with the @@ -298,7 +291,7 @@ has 1/4th of its single-threaded capacity, Logback has 1/10th of its single-threaded capacity, and JUL steadily drops from 1/4th to 1/10th of its single-threaded throughput as more threads are added._ -image:images/SyncThroughputLoggerComparisonLinux.png[image] +image:SyncThroughputLoggerComparisonLinux.png[image] The synchronous logging throughput results above are obtained with the http://openjdk.java.net/projects/code-tools/jmh/[JMH] Java benchmark @@ -312,7 +305,7 @@ workload and the number of threads. Below is a sample for a workload of 32,000 events per second, with 2 threads logging 16,000 events per second each. -image:images/SynchronousFileResponseTime2T32k-labeled.png[image] +image:SynchronousFileResponseTime2T32k-labeled.png[image] The above result was obtained with the ResponseTimeTest class which can be found in the Log4j 2 unit test source directory, running on JDK @@ -359,14 +352,14 @@ It appears that coarse-grained synchronization in SLF4J can impact performance in multi-threaded scenarios. See http://jira.qos.ch/browse/SLF4J-240[SLF4J-240]. -image:images/MarkerFilterCostComparison.png[image] +image:MarkerFilterCostComparison.png[image] Log4j and Logback also support filtering on a value in the Log4j ThreadContext vs filtering in Logback on a value in the MDC. The graph below shows that the performance difference between Log4j 2 and Logback is small for the ThreadContext filter. -image:images/ThreadContextFilterCostComparison.png[image] +image:ThreadContextFilterCostComparison.png[image] The Filter comparison results above are obtained with the http://openjdk.java.net/projects/code-tools/jmh/[JMH] Java benchmark @@ -420,7 +413,7 @@ Another takeaway is just how much of a performance drag logging to the console can be. Considering logging to a file and using a tool like `tail` to watch the file change in real time. -image:images/Log4j2AppenderThroughputComparison-linux.png[image] +image:Log4j2AppenderThroughputComparison-linux.png[image] On Windows, the results are similar but the RandomAccessFile and MemoryMappedFile appenders outperform the plain File appender in @@ -428,7 +421,7 @@ multi-threaded scenarios. The absolute numbers are higher on Windows: we don't know why but it looks like Windows handles lock contention better than Linux. -image:images/Log4j2AppenderThroughputComparison-windows.png[image] +image:Log4j2AppenderThroughputComparison-windows.png[image] The Log4j 2 appender comparison results above are obtained with the http://openjdk.java.net/projects/code-tools/jmh/[JMH] Java benchmark diff --git a/src/site/asciidoc/manual/plugins.adoc b/src/site/antora/modules/ROOT/pages/manual/plugins.adoc similarity index 85% rename from src/site/asciidoc/manual/plugins.adoc rename to src/site/antora/modules/ROOT/pages/manual/plugins.adoc index 3185575c79f..37c3228ba37 100644 --- a/src/site/asciidoc/manual/plugins.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/plugins.adoc @@ -15,7 +15,6 @@ limitations under the License. //// = Plugins -Ralph Goers ; Matt Sicker Log4j 1.x allowed for extension by requiring class attributes on most of the configuration declarations. In the case of some elements, notably @@ -23,11 +22,10 @@ the PatternLayout, the only way to add new pattern converters was to extend the PatternLayout class and add them via code. One goal of Log4j 2 is to make extending it extremely easy through the use of plugins. -In Log4j 3.x, a plugin is declared by adding a link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/Plugin.html[`@Plugin`] and `@Namespace` annotation to the class declaration. +In Log4j 3.x, a plugin is declared by adding a `@Plugin` and `@Namespace` annotation to the class declaration. During initialization the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/Configuration.html[`Configuration`] -will invoke the -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/util/PluginRegistry.html[`PluginRegistry`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/config/Configuration.html[`Configuration`] +will invoke the `PluginRegistry` to load the built-in Log4j plugins as well as any custom plugins. The `Injector` locates plugins by looking in the following places: @@ -111,7 +109,7 @@ Core plugins support a few different dependency injection rules for binding conf Each plugin must declare a static method annotated with `@Factory` or `@PluginFactory` or contain an `@Inject`-annotated constructor or no-args constructor. These static factory method or `@Inject` constructor parameters are used for initial dependency injection. When a static factory method returns a type that implements `java.util.function.Supplier` such as through `Builder`, then that supplier instance first has its members injected before invoking `Supplier::get` to obtain the resulting plugin instance. -See link:./dependencyinjection.html[Dependency Injection] for further details on how dependency injection works. +See xref:manual/dependencyinjection.adoc[Dependency Injection] for further details on how dependency injection works. Plugins are configured using additional plugin qualifier annotations such as `@PluginAttribute`, `@PluginBuilderAttribute`, `@PluginElement`, `@PluginValue`, etc., as described below. There are dozens of plugins in Log4j Core that can be @@ -122,23 +120,23 @@ Builders] for more details. === Attribute Types -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/PluginAttribute.html[`PluginAttribute`]:: +`PluginAttribute`:: The parameter must be convertible from a String using a link:#TypeConverters[TypeConverter]. Most built-in types are already supported, but custom `TypeConverter` plugins may also be provided for more type support. Note that `PluginBuilderAttribute` can be used in builder class fields as an easier way to provide default values. -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/PluginElement.html[`PluginElement`]:: +`PluginElement`:: The parameter may represent a complex object that itself has parameters that can be configured. This also supports injecting an array of elements. -link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/plugins/PluginConfiguration.html[`PluginConfiguration`]:: +link:../javadoc/log4j-core/org/apache/logging/log4j/core/config/plugins/PluginConfiguration.html[`PluginConfiguration`]:: The current `Configuration` object will be passed to the plugin as a parameter. -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/PluginNode.html[`PluginNode`]:: +`PluginNode`:: The current `Node` being parsed will be passed to the plugin as a parameter. -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/PluginValue.html[`PluginValue`]:: +`PluginValue`:: The value of the current `Node` or its attribute named `value`. === Constraint Validators @@ -147,10 +145,10 @@ Plugin factory fields, methods, and parameters can be automatically validated at runtime using constraint validators inspired by the http://beanvalidation.org/[Bean Validation spec]. The following annotations are bundled in Log4j, but custom -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/validation/ConstraintValidator.html[`ConstraintValidators`] +`ConstraintValidators` can be created as well. -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/validation/constraints/Required.html[`Required`]:: +`Required`:: This annotation validates that a value is non-empty. This covers a check for `null` as well as several other scenarios: empty `CharSequence` objects, empty arrays, empty `Collection` instances, @@ -159,19 +157,18 @@ link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/validation/constr This annotation validates that a class name can be loaded. This is useful for plugins that should only be loaded when an optional class is present. `RequiredProperty`:: This annotation validates that a system property is set to some value. -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/validation/constraints/ValidHost.html[`ValidHost`]:: +`ValidHost`:: This annotation validates that a value corresponds to a valid hostname. This uses the same validation as http://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html#getByName-java.lang.String-[`InetAddress::getByName`]. -link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/plugins/validation/constraints/ValidPort.html[`ValidPort`]:: +`ValidPort`:: This annotation validates that a value corresponds to a valid port number between 0 and 65535. [#Converters] == Converters -Converters are used by -link:../log4j-core/apidocs/org/apache/logging/log4j/core/layout/PatternLayout.html[`PatternLayout`] +Converters are used by xref:manual/layouts.adoc#PatternLayout[`PatternLayout`] to render the elements identified by the conversion pattern. Every converter must specify its category as "Converter" on the `@Plugin` annotation, have a static `newInstance` method that accepts an array of @@ -180,7 +177,7 @@ Converter, and must have a `@ConverterKeys` annotation present that contains the array of converter patterns that will cause the Converter to be selected. Converters that are meant to handle `LogEvent` must extend the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/layout/LogEventPatternConverter.html[`LogEventPatternConverter`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/layout/LogEventPatternConverter.html[`LogEventPatternConverter`] class and must implement a format method that accepts a `LogEvent` and a `StringBuilder` as arguments. The Converter should append the result of its operation to the `StringBuilder`. @@ -211,7 +208,7 @@ Some components within Log4j may provide the ability to perform data encryption. These components require a secret key to perform the encryption. Applications may provide the key by creating a class that implements the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/util/SecretKeyProvider.html[`SecretKeyProvider`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/util/SecretKeyProvider.html[`SecretKeyProvider`] interface. [#Lookups] @@ -219,7 +216,7 @@ interface. Lookups are perhaps the simplest plugins of all. They must declare their type as "Lookup" on the plugin annotation and must implement the -link:../log4j-core/apidocs/org/apache/logging/log4j/core/lookup/StrLookup.html[`StrLookup`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/lookup/StrLookup.html[`StrLookup`] interface. They will have two methods; a `lookup` method that accepts a `String` key and returns a `String` value and a second `lookup` method that accepts both a `LogEvent` and a `String` key and returns a `String`. Lookups @@ -230,7 +227,7 @@ locate. [#TypeConverters] == TypeConverters -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/convert/TypeConverter.html[`TypeConverter`]s +``TypeConverter``s are a sort of meta-plugin used for converting strings into other types in a plugin factory method parameter. Other plugins can already be injected via the `@PluginElement` annotation; now, any type supported by @@ -238,9 +235,9 @@ the type conversion system can be used in a `@PluginAttribute` parameter. Conversion of enum types are supported on demand and do not require custom `TypeConverter` classes. A large number of built-in Java classes are already supported; see -link:../log4j-plugins/apidocs/org/apache/logging/log4j/plugins/convert/TypeConverters.html[`TypeConverters`] +`TypeConverters` and -link:../log4j-core/apidocs/org/apache/logging/log4j/core/config/plugins/convert/CoreConverters.html[`CoreConverters`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/config/plugins/convert/CoreConverters.html[`CoreConverters`] for a more exhaustive listing. Unlike other plugins, the plugin name of a `TypeConverter` is purely diff --git a/src/site/asciidoc/manual/systemproperties.adoc b/src/site/antora/modules/ROOT/pages/manual/systemproperties.adoc similarity index 98% rename from src/site/asciidoc/manual/systemproperties.adoc rename to src/site/antora/modules/ROOT/pages/manual/systemproperties.adoc index 4097b68b2d5..cc383880281 100644 --- a/src/site/asciidoc/manual/systemproperties.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/systemproperties.adoc @@ -55,7 +55,7 @@ provide a file containing the application specific properties, locate them as system properties or environment variables, or in Log4j's system scoped properties files. This is achieved using the following rules: -1. In general, Log4j properties are named using the scheme ``log4j2.{contextName}.{componentName}.{key}``. +1. In general, Log4j properties are named using the scheme ``log4j2.\{contextName}.\{componentName}.\{key}``. A contextName of ``\*`` indicates the property is system wide. For example, the Log4j configuration file could be identified as ``log4j2.*.Configuration.file`` as the system wide value while ``log4j2.PaymentUI.Configuration.file`` would only apply to the application with the context name @@ -65,19 +65,19 @@ cannot be configured as system properties or in Log4j's ``log4j2.components.prop ``log4j2.components.json`` files. Instead, they should be placed into a file named ``META-INF/log4j2.context.properties`` or ``META-INF/log4j2.context.json`` in the classpath of the ClassLoader for the application. In this case the properties should be specified only as -``{componentName}.{key}``, leaving off the leading "log4j2" and contextName since these properties +``\{componentName}.\{key}``, leaving off the leading "log4j2" and contextName since these properties only apply to the context in which they are located. 3. While applications that use names to identify the LoggerContext can also use the ``META-INF/log4j2.context`` files, generally this is not very useful since they may share ClassLoaders. Instead, they can -use files named ``META-INF/log4j2.{contextName}.properties`` or ``META-INF/log4j2.{contextName}.json``. +use files named ``META-INF/log4j2.\{contextName}.properties`` or ``META-INF/log4j2.\{contextName}.json``. Like the properties specified in item 2 above, these properties must also specify their properties as -``{componentName}.{key}`` leaving off the leading "log4j2" and contextName. +``\{componentName}.\{key}`` leaving off the leading "log4j2" and contextName. === Custom Property Sources Properties are located using PropertySources. This system is extensible and is enabled through the -link:../log4j-api/apidocs/org/apache/logging/log4j/util/PropertySource.html[`PropertySource`] +link:../javadoc/log4j-api/org/apache/logging/log4j/util/PropertySource.html[`PropertySource`] interface. Additional property source classes can be added through the standard `ServiceLoader` mechanism in Java SE. @@ -112,11 +112,11 @@ underscores. Only this naming scheme is support for environment variables as there were no old naming schemes to maintain compatibility with. -|`log4j2.context.json` or `log4j2.{contextName}.json` +|`log4j2.context.json` or `log4j2.\{contextName}.json` |110 |Properties in these files only apply to the specific LoggerContext to which they are bound, either by name or ClassLoader. -|`log4j2.context.properties' or `log4j2.{contextName}.properties` +|`log4j2.context.properties' or `log4j2.\{contextName}.properties` |120 |Properties in these files only apply to the specific LoggerContext to which they are bound, either by name or ClassLoader. @@ -761,7 +761,7 @@ must have a default constructor. |log4j2.loggerContextStacktraceOnStart, LOG4J_LOGGER_CONTEXT_STACKTRACE_ON_START |System/Application |false -|Prints a stacktrace to the link:#StatusMessages[status logger] at DEBUG level when the +|Prints a stacktrace to the status logger at DEBUG level when the LoggerContext is started. For debug purposes. |ThreadContext diff --git a/src/site/asciidoc/manual/thread-context.adoc b/src/site/antora/modules/ROOT/pages/manual/thread-context.adoc similarity index 89% rename from src/site/asciidoc/manual/thread-context.adoc rename to src/site/antora/modules/ROOT/pages/manual/thread-context.adoc index c90501d3577..47430deaceb 100644 --- a/src/site/asciidoc/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 ; Gary Gregory -== 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`] @@ -198,30 +196,31 @@ so. The `getContext()` and `cloneStack()` methods can be used to obtain copies of the Map and Stack respectively. Note that all methods of the -link:../log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html[`ThreadContext`] +link:../javadoc/log4j-api/org/apache/logging/log4j/ThreadContext.html[`ThreadContext`] class are static. -==== 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. -Set the system property `log4j2.disableThreadContext` to `true` to disable both the Thread Context Map and Stack. -Set the system property `log4j2.isThreadContextMapInheritable` to `true` to enable child threads to inherit the Thread +=== 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. +* Set the system property `log4j2.disableThreadContext` to `true` to disable both the Thread Context Map and Stack. +* 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`] +link:../javadoc/log4j-core/org/apache/logging/log4j/core/layout/PatternLayout.html[`PatternLayout`] provides mechanisms to print the contents of the -link:../log4j-api/apidocs/org/apache/logging/log4j/ThreadContext.html[`ThreadContext`] +link:../javadoc/log4j-api/org/apache/logging/log4j/ThreadContext.html[`ThreadContext`] Map and Stack. * Use `%X` by itself to include the full contents of the Map. -* Use `%X{key}` to include the specified key. +* Use `%X\{key}` to include the specified key. * 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 @@ -235,5 +234,5 @@ logging done in the other threads will not show these attributes. Log4j 2.7 adds a flexible mechanism to tag logging statements with context data coming from other sources than the ThreadContext. See the -manual page on link:extending.html#Custom_ContextDataInjector[extending +manual page on xref:manual/extending.adoc#Custom_ContextDataProvider[extending Log4j] for details. diff --git a/src/site/asciidoc/manual/usage.adoc b/src/site/antora/modules/ROOT/pages/manual/usage.adoc similarity index 98% rename from src/site/asciidoc/manual/usage.adoc rename to src/site/antora/modules/ROOT/pages/manual/usage.adoc index 22c434d1809..3c158bf7047 100644 --- a/src/site/asciidoc/manual/usage.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/usage.adoc @@ -16,14 +16,14 @@ //// = Usage -[#Static_vs_Non_Static] +[#static-vs-non-static] == Static vs Non-Static Loggers As with any variable in Java, Loggers may be declared as static variables or class member variables. However, there are a few factors to consider when choosing to declare a logger as static vs non-static. Generally, it is better to declare Loggers as static. 1. Instantiation of a new Logger is a fairly expensive operation when using the default ContextSelector, -link:../log4j-core/apidocs/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html[ClassLoaderContextSelector]. +link:../javadoc/log4j-core/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.html[ClassLoaderContextSelector]. When the Logger is created the `ClassLoaderContextSelector` will locate the ClassLoader for the Class the Logger is associated with and add the Logger to the LoggerContext associated with that ClassLoader. 2. Once a Logger is created it will not be deleted until the `LoggerContext` it is associated with @@ -34,6 +34,7 @@ difference between a static or non-static Logger. assigned when they are created, which usually will be the name of the class they are associated with. See the discussion below on logger names vs class names and the example for more information. +[#logger-name-vs-class-name] == Logging the Logger name vs the Class name The logger name of a Logger is specified when the Logger is created. When a log method is called the class name value in the log event will reflect the name of the class the log method was called from, which is diff --git a/src/site/asciidoc/plugin-reference.adoc b/src/site/antora/modules/ROOT/pages/plugin-reference.adoc similarity index 96% rename from src/site/asciidoc/plugin-reference.adoc rename to src/site/antora/modules/ROOT/pages/plugin-reference.adoc index f41b0bbfbaa..c3417aa050f 100644 --- a/src/site/asciidoc/plugin-reference.adoc +++ b/src/site/antora/modules/ROOT/pages/plugin-reference.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with diff --git a/src/site/asciidoc/log4j-layout-template-json.adoc b/src/site/antora/modules/ROOT/pages/release-notes.adoc similarity index 55% rename from src/site/asciidoc/log4j-layout-template-json.adoc rename to src/site/antora/modules/ROOT/pages/release-notes.adoc index 4cfbfdff6c2..8f72eb57528 100644 --- a/src/site/asciidoc/log4j-layout-template-json.adoc +++ b/src/site/antora/modules/ROOT/pages/release-notes.adoc @@ -1,5 +1,3 @@ -// vim: set syn=markdown : - //// Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -16,17 +14,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. //// -= Apache Log4j JSON Template Layout module - -This module provides a customizable, efficient, and garbage-free JSON generating Apache Log4j layout. -It encodes log events according to the structure described by the JSON template provided. - -== Requirements - -This module was introduced in Log4j 2.14.0. - -Some features may require optional link:../runtime-dependencies.html[dependencies]. -These dependencies are specified in the documentation for those features. += Release notes -Some Log4j features require external dependencies. -See the link:dependencies.html#Dependency_Tree[Dependency Tree] for the exact list of JAR files needed for these features. +This file is a stub. +Its content will be auto-generated during build. diff --git a/src/site/antora/modules/ROOT/pages/runtime-dependencies.adoc b/src/site/antora/modules/ROOT/pages/runtime-dependencies.adoc new file mode 100644 index 00000000000..39edcd74eb4 --- /dev/null +++ b/src/site/antora/modules/ROOT/pages/runtime-dependencies.adoc @@ -0,0 +1,242 @@ +//// + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +//// += Runtime Dependencies + +Some Log4J features depend on external libraries. This page lists the required and optional dependencies. + +As of version 2.10.0, the Log4j API is a named Java module (with a `module-info.java`). Since version 2.21.0, all the remaining artifacts are named modules. The characteristics of the modules are: + +[options="header"] +|=== +| Artifact Name | Module Name | Module Characteristics + +| log4j-api +| org.apache.logging.log4j +| Module Directive Notes +exports org.apache.logging.log4j +exports org.apache.logging.log4j.message +exports org.apache.logging.log4j.simple +exports org.apache.logging.log4j.spi +exports org.apache.logging.log4j.spi +exports org.apache.logging.log4j.util Some classes in this package are used by the logging implementation and should be considered private. The module info definition may be modified in the future to export these only to the logging implementation. +uses org.apache.logging.log4j.spi.Provider Service that must be provided by the logging implementation. + + +| log4j-appserver +| org.apache.logging.log4j.appserver +| Named Module + +| log4j-cassandra +| org.apache.logging.log4j.cassandra +| Named Module + +| log4j-core +| org.apache.logging.log4j.core +| Named Module. Most of its dependencies are optional. + +| log4j-couchdb +| org.apache.logging.log4j.couchdb +| Named Module + +| log4j-docker +| org.apache.logging.log4j.docker +| Named Module + +| log4j-1.2-api +| org.apache.log4j +| Named Module + +| log4j-flume-ng +| org.apache.logging.log4j.flume +| Named Module + +| log4j-iostreams +| org.apache.logging.log4j.iostreams +| Named Module + +| log4j-jakarta-smtp +| org.apache.logging.log4j.smtp +| Named Module + +| log4j-jakarta-web +| org.apache.logging.log4j.web +| Named Module. Uses the same name as `log4j-web` since it is its Jakarta EE 9 equivalent. + +| log4j-jcl +| org.apache.logging.log4j.jcl +| Named Module + +| log4j-jul +| org.apache.logging.log4j.jul +| Named Module + +| log4j-mongodb +| org.apache.logging.log4j.mongodb +| Named Module + +| log4j-slf4j-impl +| org.apache.logging.log4j.slf4j.impl +| Named Module + +| log4j-slf4j2-impl +| org.apache.logging.log4j.slf4j2.impl +| Named Module + +| log4j-taglib +| org.apache.logging.log4j.taglib +| Named Module + +| log4j-to-slf4j +| org.apache.logging.log4j.to.slf4j +| Named Module + +| log4j-web +| org.apache.logging.log4j.web +| Named Module. Uses the same name as `log4j-jakarta-web` since it is its Java EE 8 equivalent. +|=== + +As of version 2.9.1, Log4j supports Java 9 but will still work in Java 7 or 8. In this version, log4j-api is packaged as a multi-release jar and supports the use of the StackWalker and Process APIs. + +As of version 2.4, Log4J requires Java 7. + +Log4j version 2.3 and older require Java 6. + +== log4j-api + +The Log4J xref:log4j-api.adoc[API] module has no external dependencies. + +== log4j-core + +The Log4J implementation has several optional dependencies. + +Optional Dependencies per Feature in Log4J Implementation: + +[options="header"] +|=== +| Feature | Requirements + +| XML configuration +| - + +| Properties configuration +| - + +| JSON configuration +| https://github.com/FasterXML/jackson[Jackson core and databind] + +| YAML configuration +| https://github.com/FasterXML/jackson[Jackson databind] and https://github.com/FasterXML/jackson-dataformat-yaml[YAML data format] + +| CSV Layout +| https://commons.apache.org/proper/commons-csv/[Apache Commons CSV] + +| JSON Layout +| https://github.com/FasterXML/jackson[Jackson core and databind] + +| XML Layout +| https://github.com/FasterXML/jackson[Jackson core, databind and dataformat XML] and `com.fasterxml.woodstox:woodstox-core:5.0.2` + +| YAML Layout +| https://github.com/FasterXML/jackson[Jackson core, databind] and https://github.com/FasterXML/jackson-dataformat-yaml[YAML data format] + +| Async Loggers +| https://lmax-exchange.github.io/disruptor/[LMAX Disruptor] + +| Kafka Appender +| https://kafka.apache.org/[Kafka client library]. Note that you need to use a version of the Kafka client library matching the Kafka server used. + +| SMTP Appender +| an implementation of `javax.mail` + +| JMS Appender +| a JMS broker like https://activemq.apache.org/[Apache ActiveMQ] + +| Windows console color support +| https://fusesource.github.io/jansi/[Jansi] + +| JDBC Appender +| a JDBC driver for the database you choose to write events to + +| JPA Appender +| the Java Persistence API classes, a JPA provider implementation, and a decorated entity that the user implements. It also requires an appropriate JDBC driver + +| NoSQL Appender with MongoDB provider +| MongoDB Java Client driver and Log4j MongoDB library + +| NoSQL Appender with Apache CouchDB provider +| LightCouch CouchDB client library and Log4j CouchDB library + +| Cassandra Appender +| Datastax Cassandra driver and Log4j Cassandra library + +| Bzip2, Deflate, Pack200, and XZ compression on rollover +| https://commons.apache.org/proper/commons-compress/[Apache Commons Compress]. In addition, XZ requires https://tukaani.org/xz/java.html[xz-java] and ZStandard requires https://github.com/luben/zstd-jni[zstd-jni] + +| ZeroMQ Appender +| The ZeroMQ appender uses the https://github.com/zeromq/jeromq[JeroMQ] library which is licensed under the terms of the Mozilla Public License Version 2.0 (MPLv2). For details see the file https://github.com/zeromq/jeromq/blob/master/LICENSE[LICENSE] included with the JeroMQ distribution. +|=== + +== log4j-docker + +xref:log4j-docker.adoc[Log4j Docker Support] requires https://github.com/FasterXML/jackson[Jackson annotations, core, and databind]. + +== log4j-1.2-api + +The xref:log4j-1.2-api.adoc[Log4j 1.2 Bridge] has no external dependencies. This only requires the Log4j API. Including Log4j Core provides optional, extra functionality. + +== log4j-slf4j-impl + +The Log4j 2 xref:log4j-slf4j-impl.adoc[SLF4J Binding] depends on the https://www.slf4j.org/[SLF4J] API. + +[WARNING] +.Do not use this with the log4j-to-slf4j module. +==== + +== log4j-jul + +The Log4j 2 xref:log4j-jul.adoc[Java Util Logging Adapter] has no external dependencies. It optionally depends on the xref:log4j-api.adoc[Log4j Core] library. The only required module is the Log4j API. + +== log4j-to-slf4j + +The xref:log4j-to-slf4j.adoc[Log4j 2 to SLF4J Adapter] requires the https://www.slf4j.org/[SLF4J] API and an SLF4J implementation. + +[WARNING] +.Do not use this with the log4j-slf4j-impl module. +==== + +== log4j-flume-ng + +The xref:log4j-flume-ng.adoc[Flume Appender] requires https://flume.apache.org/[Apache Flume] and https://avro.apache.org/[Apache Avro]. The persistent agent uses Berkeley DB. + +== log4j-spring-cloud-config-client + +xref:log4j-spring-cloud-config-client.adoc[Log4j Spring Cloud Config Client] requires https://spring.io/projects/spring-cloud-config[Spring Cloud Config]. https://spring.io/projects/spring-cloud-bus[Spring Cloud Bus] is required if notification of logging configuration changes is desired. https://spring.io/projects/spring-boot[Spring Boot] is required but applications do not have to be packaged as a Spring Boot application. + +== log4j-mongodb4 + +The Log4J xref:log4j-mongodb4.adoc[MongoDB 4] module depends on the https://docs.mongodb.org/ecosystem/drivers/java/[MongoDB Java Client driver]. + +== log4j-iostreams + +The Log4j xref:log4j-iostreams.adoc[IO Streams] module has no external dependencies. This only requires the Log4j API. + +== log4j-jakarta-smtp + +The Log4j Simple Mail Transfer Protocol (SMTP) Appender, version for Jakarta EE 9 module has 2 external runtime dependencies for the jakarta.activation-api and jakarta.mail-api. + +. org.eclipse.angus:angus-activation +. org.eclipse.angus:jakarta.mail diff --git a/src/site/asciidoc/security.adoc b/src/site/antora/modules/ROOT/pages/security.adoc similarity index 99% rename from src/site/asciidoc/security.adoc rename to src/site/antora/modules/ROOT/pages/security.adoc index 2bed215144a..6a5edfb9de0 100644 --- a/src/site/asciidoc/security.adoc +++ b/src/site/antora/modules/ROOT/pages/security.adoc @@ -66,7 +66,7 @@ Format strings should be compile-time constants, and under no circumstances shou When using an unstructured layout such as `PatternLayout`, no guarantees can be made about the output format. This layout is mainly useful for development purposes and should not be relied on in production applications. -For example, if a log message contains new lines, these are not escaped or encoded specially unless the configured pattern uses the `%encode{pattern}{CRLF}` wrapper pattern converter (which will encode a carriage return as the string `\r` and a line feed as the string `\n`) or some other `%encode` option. +For example, if a log message contains new lines, these are not escaped or encoded specially unless the configured pattern uses the `%encode\{pattern}\{CRLF}` wrapper pattern converter (which will encode a carriage return as the string `\r` and a line feed as the string `\n`) or some other `%encode` option. Note that `%xEx` is appended to the pattern unless already present. Similarly, other encoding options are available for other formats, but pattern layouts cannot make assumptions about the entire output. As such, when using unstructured layouts, no user-controlled input should be included in logs. diff --git a/src/site/asciidoc/support.adoc b/src/site/antora/modules/ROOT/pages/support.adoc similarity index 98% rename from src/site/asciidoc/support.adoc rename to src/site/antora/modules/ROOT/pages/support.adoc index 2207362a512..ee39ad914a4 100644 --- a/src/site/asciidoc/support.adoc +++ b/src/site/antora/modules/ROOT/pages/support.adoc @@ -29,7 +29,7 @@ If you have questions like: * _"My layout is not working as expected; what should I do?"_ * _"How can I migrate from Log4j 1 with this custom configuration?"_ -We urge you to first check our link:faq.html[FAQ] to see if it has already been answered. +We urge you to first check our xref:faq.adoc[FAQ] to see if it has already been answered. If not, you can ask your questions on one of our official user support channels: * https://github.com/apache/logging-log4j2/discussions[GitHub Discussions] (**experimental**) @@ -141,6 +141,5 @@ Consultancy services offered by PMC member https://www.linkedin.com/in/ppkarwasz https://grobmeier.solutions[Grobmeier Solutions]:: Consultancy services offered by PMC member https://www.linkedin.com/in/grobmeier/[Christian Grobmeier] -[#tidelift] https://tidelift.com[Tidelift]:: Some Log4j maintainers receive funding from Tidelift for their maintenance efforts. diff --git a/src/site/asciidoc/thanks.adoc b/src/site/antora/modules/ROOT/pages/thanks.adoc similarity index 93% rename from src/site/asciidoc/thanks.adoc rename to src/site/antora/modules/ROOT/pages/thanks.adoc index 64620accccd..d4d59566397 100644 --- a/src/site/asciidoc/thanks.adoc +++ b/src/site/antora/modules/ROOT/pages/thanks.adoc @@ -26,12 +26,12 @@ thanks to these communities/companies: |=== |Who |What -|image:images/YourKitLogo.png["YourKit", link="https://www.yourkit.com/features/"] +|image:YourKitLogo.png["YourKit", link="https://www.yourkit.com/features/"] |YourKit supports the Log4j 2 project with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. See https://www.yourkit.com/features/[YourKit's leading software products]. -|image:images/IntelliJ-IDEA-logo.png["IntelliJ IDEA", link="https://www.jetbrains.com/idea/"] +|image:IntelliJ-IDEA-logo.png["IntelliJ IDEA", link="https://www.jetbrains.com/idea/"] |JetBrains supports the Log4j 2 project with https://www.jetbrains.com/idea/[IntelliJ IDEA]. |image:https://www.jclarity.com/wp-content/uploads/2015/02/JClarity_logo_tagline3.png["jClarity", link="https://www.jclarity.com/"] diff --git a/src/site/asciidoc/articles.adoc b/src/site/asciidoc/articles.adoc deleted file mode 100644 index 9a91daed441..00000000000 --- a/src/site/asciidoc/articles.adoc +++ /dev/null @@ -1,250 +0,0 @@ -//// - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Articles and Tutorials - -A collection of external articles and tutorials about Log4j 2. The 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. - -== Chinese - -* http://www.infoq.com/cn/news/2016/06/log4j-garbage-free[Log4j 2.6免垃圾收集] -(June 12, 2016) -* http://blog.csdn.net/autfish/article/details/51203709[详解log4j2(上) - 从基础到实战] -(April 20, 2016) -* http://www.jianshu.com/p/7aec512a003c[Log4j2使用笔记] -(November 3, 2015) -* http://www.infoq.com/cn/news/2015/09/interview-log4j-pmc[过渡到全新Log4j:Log4j项目管理委员会访谈] -(September 14, 2015) -* http://www.infoq.com/cn/news/2015/09/log4j-version-1-reaches-eol[Log4j版本1生命周期终结] -(September 3, 2015) -* http://www.infoq.com/cn/news/2014/08/apache-log4j2[Apache Log4j 2.0值得升级吗] -(August 5, 2014) -* http://www.importnew.com/19467.html[Log4j2架构分析与实战] -(January 15, 2013) -* http://blog.csdn.net/lrenjun/article/details/8178875[log4j2 使用详解] -(November 13, 2012) -* https://my.oschina.net/xianggao/blog/523401[Log4j2配置文件详解] -(Undated) - -== English - -* http://makeseleniumeasy.com/2021/05/01/log4j2-tutorial-8-xml-configuration-for-default-rollover-strategy-with-sizebasedtriggeringpolicy/[Log4j2 Tutorial 8 – XML Configuration For Default Rollover Strategy With SizeBasedTriggeringPolicy] -(May 1, 2021) -* https://medium.com/codex/log4j2-create-custom-log-levels-and-how-to-use-them-48685e133fd1[Log4J2 | Create custom log levels and how to use them] -(April 29, 2021) -* http://makeseleniumeasy.com/2021/04/26/log4j2-tutorial-7-working-mechanism-of-default-rollover-strategy/[Log4j2 Tutorial 7 – Working Mechanism Of Default Rollover Strategy] -(April 26, 2021) -* http://makeseleniumeasy.com/2021/04/20/log4j2-tutorial-6-introduction-to-rollingfileappender-and-its-triggers-and-strategies/[Log4j2 Tutorial 6 – Introduction To RollingFileAppender And Its Triggers And Strategies] -(April 20, 2021) -* http://makeseleniumeasy.com/2021/04/13/log4j2-tutorial-5-xml-configuration-file-to-log-into-file-and-console-using-log4j2-together/[Log4j2 Tutorial 5 – XML Configuration File To Log Into File And Console Using Log4j2 Together] -(April, 13, 2021) -* http://makeseleniumeasy.com/2021/04/09/log4j2-tutorial-4-print-logs-in-external-file-using-xml-configuration-file-of-log4j2/[Log4j2 Tutorial 4 – Print Logs In External File Using XML Configuration File Of Log4J2] -(April 9, 2021) -* http://makeseleniumeasy.com/2021/03/24/log4j2-tutorial-3-setup-console-appender-using-xml-configuration-file/[Log4j2 Tutorial 3 – Setup Console Appender Using XML Configuration File] -(March 24, 2021) -* http://makeseleniumeasy.com/2021/03/17/log4j2-tutorial-2-creating-log4j2-maven-project-with-default-configuration-file/[Log4j2 Tutorial 2 – Creating Log4j2 Maven Project With Default Configuration File] -(March 17, 2021) -* http://makeseleniumeasy.com/2021/03/11/log4j2-tutorial-1-introduction-to-apache-log4j2/[Log4j2 Tutorial 1 – Introduction To Apache Log4j2] -(March 11, 2021) -* https://petrepopescu.tech/2021/03/how-to-make-a-custom-message-converter-for-log4j2/[How to make a custom message converter for Log4J2] -(March 4, 2021) -* http://www.mastertheboss.com/jboss-server/jboss-log/how-to-use-log4j2-in-your-wildfly-applications[How to configure Log4j2 in your WildFly applications] -(August 16, 2020) -* http://www.masterspringboot.com/configuration/logging/configuring-log4j2-in-spring-boot-applications[Configuring Log4j2 in a Spring Boot 2 application] -(August 16, 2020) -* https://www.ralphgoers.com/post/getting-the-most-out-of-the-log4j-2-api[Getting the most out of the Log4j 2 API] -(January 1, 2020) -* https://www.baeldung.com/log4j2-programmatic-config[Programmatic Configuration with Log4j 2] -(December 31, 2019) -* https://www.ralphgoers.com/post/log4j-1-compatibility-in-log4j-2[Log4j 1 Compatiblity in Log4j 2] -(December 22, 2019) -* https://www.ralphgoers.com/post/why-was-log4j-2-created[Why was Log4j 2 created] -(December 14, 2019) -* https://www.marcobehler.com/guides/a-guide-to-logging-in-java[A guide to logging in Java] -(June 23, 2019) -* https://www.alibabacloud.com/blog/exploring-the-secrets-of-java-logs-log4j-2-log-system_594821[Exploring the Secrets of Java Logs: Log4j 2 Log System] -(May 17, 2019) -* https://www.mkyong.com/logging/apache-log4j-2-tutorials/[Apache Log4j 2 Tutorials] -(March 27, 2019) -* https://stackify.com/compare-java-logging-frameworks/[Java Logging Frameworks: log4j vs logback vs log4j2] -(October 30, 2018) -* https://howtodoinjava.com/log4j2[Log4j2 Tutorial] -(June 3, 2018) -* https://crunchify.com/java-how-to-create-your-own-logging-level-in-log4j-configuring-log4j[In Java How to Create your own Logging Level using Log4j (Configuring Log4j 2)] -{May 30, 2018) -* https://www.javacodegeeks.com/2018/03/tales-from-the-field-migrating-from-log4j-to-log4j2.html[Tales from the Field: Migrating from Log4J to Log4J2] -(March 12th, 2018) -* https://www.youtube.com/watch?v=sdOiA1Xql0o[Log4J2 and Java configuration with properties file] -(February 18, 2018) -* https://www.youtube.com/watch?v=BbcSNOtEGWs[Apache Log4j 2 Configuration| Log4j2 with JDK 9.0] -(January 8, 2018) -* https://www.youtube.com/watch?v=KKO5wGi_vEc[Spring Boot - log4j 2 configuration example] -(December 30,2017) -* https://examples.javacodegeeks.com/enterprise-java/log4j/log4j-2-best-practices-example/[Log4j 2 Best Practices example] -(November 14, 2017) -* http://musigma.org/logging/2017/11/06/logging.html[Logging Fundamentals] -(November 6, 2017) -* http://www.rationaljava.com/2017/10/allocation-free-logging-with-log4j2.html[Allocation free logging with Log4j2] -(October 27, 2017) -* https://www.loggly.com/blog/benchmarking-java-logging-frameworks/[Benchmarking Java logging frameworks] -(October 25, 2017) -* http://www.baeldung.com/log4j-2-lazy-logging[Log4j 2 and Lambda Expressions] -(August 22, 2017) -* https://www.callicoder.com/spring-boot-log4j-2-example/[How to use Log4j 2 with Spring Boot] -(August 11, 2017) -* https://www.boraji.com/log4j-2-rollingfileappender-example[Log4j 2 - RollingFileAppender example] -(July 26, 2017) -* https://stackify.com/log4j2-java/[How Log4J2 Works: 10 Ways to Get the Most Out Of It] -(June 14, 2017) -* http://www.baeldung.com/log4j2-appenders-layouts-filters[Intro to Log4j2 – Appenders, Layouts and Filters] -(February 28, 2017) -* https://dzone.com/articles/getting-own-log4j2-file-for-mule-via-spring[Getting Your Own Log4j2 File for Mule via Spring] -(December 29, 2016) -* https://www.youtube.com/watch?v=-XNvCNHjIKw[Understanding and working with Log4j2 for logging in Selenium framework (Part B)] -(December 20, 2016) -* https://www.youtube.com/watch?v=RWZ0gsfkkc4[Understanding and working with Log4j2 for logging in Selenium framework (Part A)] -(December 18, 2016) -* https://garygregory.wordpress.com/2016/11/27/loading-a-log4j-configuration-for-a-specific-ejb/[Loading a Log4j Configuration for a specific EJB] -(November 27, 2016) -* https://medium.com/@anishekagarwal/log4j2-logging-a-primer-f10ed18e9de6#.ojlde7jib[Log4j2 Logging: A Primer] -(October 15, 2016) -* http://www.journaldev.com/7128/log4j2-example-tutorial-configuration-levels-appenders[Log4j2 Example Tutorial – Configuration, Levels, Appenders] -(July 6, 2016) -* http://howtodoinjava.com/log4j2/log4j2-htmllayout-configuration-example/[Log4j2 HTMLLayout Configuration Example] -(June 27, 2016) -* http://javaevangelist.blogspot.jp/2016/06/log4j2-javautillogging-jul-adapter.html[Log4j2 java.util.logging (JUL) Adapter Example] -(June 24, 2016) -* https://vimeo.com/169542136[Matt Sicker - Asynchronous Logging in Log4j 2.6 (CJUG Lightning Talk)] -(June 2, 2016) - * Errata: "ThresholdFilter" should be "BurstFilter" -* https://dzone.com/articles/log4j-2-configuration-using-properties-file[Log4J 2 Configuration: Using the Properties File] -(May 18, 2016) -* https://springframework.guru/using-log4j-2-spring-boot/[Using Log4j 2 with Sprint Boot] -(April 7, 2016) -* https://www.infoq.com/news/2016/05/log4j-garbage-free[Log4j 2.6 Goes Garbage-Free] -(May 30, 2016) -* http://musigma.org/java/log4j/2016/05/29/log4j-2.6.html[What's New in Log4j 2.6] -(May 29, 2016) -* https://springframework.guru/asynchronous-logging-with-log4j-2/[Asynchronous Logging With Log4j 2] -(March 31, 2016) -* https://springframework.guru/log4j-2-configuration-using-yaml/[Log4J 2 Configuration: Using YAML] -(March 26, 2016) -* https://springframework.guru/log4j-2-configuration-using-json/[Log4J 2 Configuration: Using JSON] -(March 23, 2016) -* https://qbox.io/blog/getting-logstash-2x-ready-for-log4j2[Getting Logstash 2.x Ready for Log4j2] -(March 10, 2016) -* https://springframework.guru/log4j-2-configuration-using-xml/[Log4J 2 Configuration: Using XML] -(March 10, 2016) -* https://springframework.guru/log4j-2-configuration-using-properties-file/[Log4J 2 Configuration: Using Properties File] -(March 8, 2016) -* https://springframework.guru/introducing-log4j-enterprise-class-logging/[Introducing Log4j 2 – Enterprise Class Logging] -(February 8, 2016) -* https://www.javacodegeeks.com/2015/10/better-performing-non-logging-logger-calls-in-log4j2.html[Better Performing Non-Logging Logger Calls in Log4j2] -(October 20, 2015) -* http://marxsoftware.blogspot.com/2015/10/log4j2-non-logging-performance.html[Better Performing Non-Logging Logger Calls in Log4j2] -(October 15, 2015) -* https://www.youtube.com/watch?v=Yv0n-4AsOiI[Nancy M Schorr - Log4j2 with Java and Maven for Logging] -(October 14, 2015) -* https://www.javacodegeeks.com/2015/10/easy-and-consistent-log4j2-logger-naming.html[Easy and Consistent Log4j2 Logger Naming] -(October 10, 2015) -* https://garygregory.wordpress.com/2015/09/16/a-gentle-introduction-to-the-log4j-api-and-lambda-basics/[Writing clean logging code using Java 8 lambdas] -(September 16, 2015) -* https://garygregory.wordpress.com/2015/09/10/the-art-of-test-driven-development-understanding-logging/[The Art of Test Driven Development: Understanding Logging] -(September 10, 2015) -* https://garygregory.wordpress.com/2015/09/08/the-art-of-test-driven-development-per-test-logging/[The Art of Test Driven Development: Per-Test Logging] -(September 8, 2015) -* http://www.infoq.com/news/2015/09/interview-log4j-pmc[The Transition to a New Log4j: a Q&A with Log4j's Project Management Committee] -(September 8, 2015) -* http://www.infoq.com/news/2015/08/log4j-version-1-reaches-eol[Log4j Version 1 Reaches End of Life] -(August 26, 2015) -* https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces[Apache Logging Services Project Announces Log4j 1 End-Of-Life; Recommends Upgrade to Log4j 2] -(August 6, 2015) -* https://www.innoq.com/en/blog/per-request-debugging-with-log4j2/[Per request debugging with Log4j 2 filters] -(May 8, 2015) -* https://blog.oio.de/2015/04/27/log4j-2-configuration-depending-environment/[Log4j 2 configuration depending on environment] -(April 27, 2015) -* https://www.youtube.com/watch?v=EWftNoRhS_M[Ramesh Rajaram - Log4j Key Features] -(April 10, 2015) -* http://www.journaldev.com/7128/apache-log4j-2-tutorial-configuration-levels-appenders-lookup-layouts-and-filters-example[Apache Log4j 2 Tutorial – Configuration, Levels, Appenders, Lookup, Layouts and Filters Example] -(March 16, 2015) -* http://blogs.mulesoft.com/dev/mule-dev/mule-3-6-asynchronous-logging/[Disrupting your Asynchronous Loggers] -(March 5, 2015) -* http://andrew-flower.com/blog/Create_Custom_Log4j_Plugins[Extending Log4j2 - Creating Custom Log4j2 Plugins] -(February 20, 2015) -* http://andrew-flower.com/blog/Basic_Log4j2_Configuration[Log4j2 - a crash course...] -(February 10, 2015) -* http://memorynotfound.com/log4j2-with-log4j2-xml-configuration-example/[Log4j2 with log4j2.xml Configuration Example] -(February 10, 2015) -* https://blog.logentries.com/2015/02/logging-from-your-java-application-using-log4j2/?utm_content=11878557&utm_medium=social&utm_source=facebook[Logging From Your Java Application Using Log4j2] -(February 5, 2015) -* http://blogs.mulesoft.com/dev/mule-dev/mule-3-6-asynchronous-logging/[Asynchronous Logging in Mule 3.6] -(January 20, 2015) -* http://www.infoq.com/news/2014/07/apache-log4j2[Apache Log4j 2.0 - Worth the Upgrade?] -(July 31, 2014) -* http://mycuteblog.com/log4j2-xml-configuration-example/[log4j2 xml configuration example] -(July 26, 2014) -* http://tech.finn.no/2014/07/01/log4j2-in-production-making-it-fly/[Log4j 2 in Production – Making it Fly] -(July 2, 2014) -* https://www.youtube.com/watch?v=ZzVSs_JEhgs[Matt Sicker - Introducing Log4j 2.0] -(May 6, 2014) -* https://www.youtube.com/watch?v=HB0r5DuxGPI[Nicholas Williams - Log4j 2 in Web Applications: A Deeper Look at Effective Java EE Logging] -(May 6, 2014) -* http://www.grobmeier.de/log4j-2-performance-close-to-insane-20072013.html[Log4j 2: Performance Close to Insane] -(July 20, 2013) -* https://news.ycombinator.com/item?id=5612035[Hacker News: Asynchronous Loggers for Low-Latency Logging] -(April 26, 2013) -* http://www.grobmeier.de/the-new-log4j-2-0-05122012.html[The New Log4j 2.0] -(December 5, 2012) - -== German - -* https://jaxenter.de/apache-log4j-2-6-laeuft-nun-auch-ohne-muell-41098[Apache Log4j 2.6 läuft nun auch ohne Müll] -(May 31, 2016) -* https://www.innoq.com/en/articles/2015/01/logging-konsolidieren-log4j2/[Logging konsolidieren und Performance gewinnen] -(January 23, 2015) - -== Japanese - -* http://tm-b.hatenablog.com/entry/2016/08/18/200715[中年プログラマーの息抜き] -(August 18, 2016) -* http://minor.hatenablog.com/entry/2016/05/22/193556[【log4j2】ThreadContextを利用してすべてのログに追加情報を出力する] -(May 22, 2016) -* http://qiita.com/kazurof/items/abbd42f11bfc125f3190[Log4j 2でログ出力をテストするサンプルソース] -(February 22, 2016) -* https://www.infoq.com/jp/news/2015/09/interview-log4j-pmc[新Log4jへの移行: Log4jプロジェクト管理グループとのQ&A] -(September 27, 2015) -* https://www.infoq.com/jp/news/2015/09/log4j-version-1-reaches-eol[Log4jバージョン1のサポートが終了] -(September 23, 2015) -* http://qiita.com/pica/items/f801c74848f748f76b58[log4j2の設定ファイル(XML)] -(July 27, 2015) -* http://japanengineers.seesaa.net/article/412195201.html[Apache log4j2によるロギング機能の基本サンプル] -(January 12, 2015) -* http://yamashiro0110.hatenadiary.jp/entry/2014/08/24/093336[Log4j2の使い方めも] -(August 24, 2014) -* https://www.infoq.com/jp/news/2014/08/apache-log4j2[Apache Log4j 2.0 - アップグレードする価値はあるか?] -(August 17, 2014) -* http://d.hatena.ne.jp/Kazuhira/20140628/1403959552[Log4j2を試してみる] -(June 28, 2014) -* http://nabedge.blogspot.jp/2013/10/log4j2.html[log4j2にログを集める] -(October 26, 2013) - -== Korean - -* http://dveamer.github.io/java/Log4j2.html[Log4j 2 설정하기] -(January 24, 2016) -* http://www.egovframe.go.kr/wiki/doku.php?id=egovframework:rte3:fdl:%EC%84%A4%EC%A0%95_%ED%8C%8C%EC%9D%BC%EC%9D%84_%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94_%EB%B0%A9%EB%B2%95[Log4j 2 환경설정 [설정 파일 사용 시]] -(May 14, 2014) diff --git a/src/site/asciidoc/components.adoc b/src/site/asciidoc/components.adoc deleted file mode 100644 index b199f567017..00000000000 --- a/src/site/asciidoc/components.adoc +++ /dev/null @@ -1,45 +0,0 @@ -//// - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Components of Apache Log4j - -== Internal Components - -* xref:/log4j-api.html[API] -* xref:/log4j-core.html[Implementation] -* xref:/log4j-1.2-api.html[Log4j 1.2 API] -* xref:/log4j-slf4j-impl.html[SLF4J Binding] -* xref:/log4j-jul.html[JUL Adapter] -* xref:/log4j-jpl.html[JDK Platform Logger] -* xref:/log4j-to-slf4j.html[Log4j 2 to SLF4J Adapter] -* xref:/log4j-jdbc-dbcp2.html[JDBC Appender] -* xref:/log4j-flume-ng.html[Apache Flume Appender] -* xref:/log4j-mongodb4.html[MongoDB 4 appender] -* xref:/log4j-iostreams.html[IO Streams] -* xref:/log4j-docker.html[Docker Support] -* xref:/log4j-kubernetes.html[Kubernetes Support] -* xref:/log4j-spring-cloud-config-client.html[Spring Cloud Config Client] -* xref:/log4j-transform[Log4j Transformation Tools] - -== External Components - -* xref:/log4j/jakarta[Log4j Jakarta EE] -* xref:/log4j/jmx-gui[Log4j JMX GUI] -* xref:/log4j/kotlin[Log4j Kotlin] -* xref:/log4j/scala[Log4j Scala] -* xref:/log4j/tools[Log4j Tools] -* xref:/log4j/transform[Log4j Transformation Tools] - diff --git a/src/site/asciidoc/faq.adoc b/src/site/asciidoc/faq.adoc deleted file mode 100644 index 868865b9922..00000000000 --- a/src/site/asciidoc/faq.adoc +++ /dev/null @@ -1,489 +0,0 @@ -//// - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Frequently Asked Questions - -[#missing_core] -== I'm seeing this error "Unable to locate a logging implementation, using SimpleLogger". What is wrong? - -You have the log4j-api-2.x jar file in your classpath but you still need -to add the log4j-core-2.x jar to the classpath. (Also, it looks like you -are using an old version of Log4j 2. You may want to upgrade.) - -[#which_jars] -== Which JAR files do I need? - -You need at least the log4j-api-2.x and the log4j-core-2.x jar files. - -The other jars are necessary if your application calls the API of -another logging framework and you want to route logging calls to the -Log4j 2 implementation. - -image:images/whichjar-2.x.png[Diagram showing which JARs correspond to -which systems] - -You can use the log4j-to-slf4j adapter jar when your application calls -the Log4j 2 API and you want to route logging calls to a SLF4J -implementation. - -image:images/whichjar-slf4j-2.x.png[Diagram showing the dependency flow -to use Log4j 2 API with SLF4J] - -Some of the Log4j components have features with optional dependencies. -The component page will have more detail. For example, the -link:log4j-core/index.html[log4j-core component page] has an outline of -which log4j-core features have external dependencies. - -[#exclusions] -== How do I exclude conflicting dependencies? - -There are several scenarios where you may end up with conflicting -dependencies, especially transitively included ones. The following table -shows for each Log4j dependency on the left (implicit groupId of -`org.apache.logging.log4j`), the following dependencies on the right can -be safely excluded (given in the format `groupId:artifactId`). - -[cols="4*m",options="header"] -|=== -|Log4j Dependency -3+|Dependencies to Exclude - -|log4j-1.2-api -|log4j:log4j -2+|org.slf4j:log4j-over-slf4j - -|log4j-core -|log4j:log4j -|ch.qos.logback:logback-core -|org.apache.logging.log4j:log4j-to-slf4j - -|log4j-jul -3+|org.slf4j:jul-to-slf4j - -|log4j-slf4j-impl -|org.apache.logging.log4j:log4j-to-slf4j -2+|ch.qos.logback:logback-core -|=== - -Using Apache Maven, dependencies can be globally excluded in your -project like so: - -[source,xml] ----- - - - log4j - log4j - 1.2.17 - provided - - ----- - -Dependencies can be explicitly excluded for specific dependencies as -well. For example, to use a project with Log4j 2 instead of Log4j 1.x: - -[source,xml,subs="attributes,specialchars"] ----- - - - com.example - example-project - 1.0 - - - log4j - log4j - - - org.slf4j - slf4j-log4j12 - - - - - org.apache.logging.log4j - log4j-core - {Log4jReleaseVersion} - - - org.apache.logging.log4j - log4j-slf4j-impl - {Log4jReleaseVersion} - - - org.apache.logging.log4j - log4j-1.2-api - {Log4jReleaseVersion} - - ----- - -Dependencies can be globally excluded in Gradle like so: - -[source,gradle] ----- -configurations { - all*.exclude group: 'log4j', module: 'log4j' -} ----- - -The equivalent Gradle config for the above Maven exclusion would look -like: - -[source,gradle,subs=attributes] ----- -dependencies { - compile('com.example:example-project:1.0') { - exclude group: 'log4j', module: 'log4j' - exclude group: 'org.slf4j', module: 'slf4j-log4j12' - } - compile('org.apache.logging.log4j:log4j-core:{Log4jReleaseVersion}') - compile('org.apache.logging.log4j:log4j-slf4j-impl:{Log4jReleaseVersion}') - compile('org.apache.logging.log4j:log4j-1.2-api:{Log4jReleaseVersion}') -} ----- - -[#config_location] -== How do I specify the configuration file location? - -By default, Log4j looks for a configuration file named *log4j2.xml* (not -log4j.xml) in the classpath. - -You can also specify the full path of the configuration file with this -system property: `-Dlog4j.configurationFile=path/to/log4j2.xml` - -That property can also be included in a classpath resource file named -`log4j2.component.properties`. - -Web applications can specify the Log4j configuration file location with -a servlet context parameter. See -http://logging.apache.org/log4j/jakarta[Log4j Jakarta EE] page for details. - -[#config_from_code] -== 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. - -[#reconfig_from_code] -== How do I reconfigure log4j2 in code with a specific configuration file? - -See the below example. Be aware that this LoggerContext class is not -part of the public API so your code may break with any minor release. - -[source,java] ----- -// import org.apache.logging.log4j.core.LoggerContext; - -LoggerContext context = (org.apache.logging.log4j.core.LoggerContext) LogManager.getContext(false); -File file = new File("path/to/a/different/log4j2.xml"); - -// this will force a reconfiguration -context.setConfigLocation(file.toURI()); ----- - -[#shutdown] -== How do I shut down log4j2 in code? - -Normally there is no need to do this manually. Each `LoggerContext` -registers a shutdown hook that takes care of releasing resources when -the JVM exits (unless system property `log4j.shutdownHookEnabled` is set -to `false`). See the https://logging.apache.org/log4j/jakarta[Log4j Jakarta EE] -project page on details of how this works for web applications. - -However, if you need to manually shut down Log4j, you can do so as in -the below example. Note that there is an optional parameter for -specifying which `LoggerContext` to shut down. - -[source,java] ----- -import org.apache.logging.log4j.LogManager; - -// ... - -LogManager.shutdown(); ----- - -[#config_sep_appender_level] -== How do I send log messages with different levels to different -appenders? You don’t need to declare separate loggers to achieve this. -You can set the logging level on the `AppenderRef` element. - -[source,xml] ----- - - - - - - %d %p %c{1.} [%t] %m %ex%n - - - - - - - - - - - - - ----- - -[#troubleshooting] -== How do I debug my configuration? - -First, make sure you have link:#which_jars[the right jar files] on your -classpath. 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.) - -From log4j-2.9 onward:: -From log4j-2.9 onward, log4j2 will print all internal logging to the -console if system property `log4j2.debug` is either defined empty or its value -equals to `true` (ignoring case). - -Prior to log4j-2.9:: -Prior to log4j-2.9, there are two places where internal logging can be -controlled: -+ -If the configuration file is found correctly, log4j2 internal status -logging can be controlled by setting `` in -the configuration file. This will display detailed log4j2-internal log -statements on the console about what happens during the configuration -process. This may be useful to trouble-shoot configuration issues. By -default the status logger level is WARN, so you only see notifications -when there is a problem. -+ -If the configuration file is not found correctly, you can still enable -log4j2 internal status logging by setting system property -`-Dorg.apache.logging.log4j.simplelog.StatusLogger.level=TRACE`. - -[#separate_log_files] -== How do I dynamically write to separate log files? - -Look at the -http://logging.apache.org/log4j/2.x/manual/appenders.html#RoutingAppender[RoutingAppender]. -You can define multiple routes in the configuration, and put values in -the `ThreadContext` map that determine which log file subsequent events -in this thread get logged to. - -You can use the `ThreadContext` map value to determine the log file -name. - -[source,xml] ----- - - - - - - - - %d{ISO8601} [%t] %p %c{3} - %m%n - - - - - - - - - - - - - %d{ISO8601} [%t] %p %c{3} - %m%n - - - - - - - - - - - - - %d{ISO8601} [%t] %p %c{3} - %m%n - - - - - - - - - ----- - -[#reconfig_level_from_code] -== How do I set a logger’s level programmatically? - -You can set a logger’s level with the class -link:log4j-core/apidocs/org/apache/logging/log4j/core/config/Configurator.html[`Configurator`] -from Log4j Core. Be aware that the `Configurator` class is not part of -the public API. - -[source,java] ----- -import org.apache.logging.log4j.core.config.Configurator; - -// ... - -Configurator.setLevel("com.example.Foo", Level.DEBUG); - -// You can also set the root logger: -Configurator.setRootLevel(Level.DEBUG); ----- - -[#retention] -== 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. - -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]. - -[#api-tradeoffs] -== What are the trade-offs of using the Log4j 2 API versus the SLF4J API? - -The Log4j 2 API and SLF4J have a lot in common. They both share the -objective of cleanly separating the logging API from the implementation. -We believe that the Log4j 2 API can help make your application more -performant while offering more functionality and more flexibility. - -There may be a concern that using the Log4j 2 API will tightly couple -your application to Log4j 2. This is not the case: applications coded to -the Log4j 2 API always have the option to use any SLF4J-compliant -library as their logging implementation with the log4j-to-slf4j adapter. -See the link:#which_jars_log4j-to-slf4j[which jars] FAQ entry for -details. - -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]. 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. - -[#gc-free-slf4j] -== Is Log4j 2 still garbage-free when I use the SLF4J API? - -Yes, the log4j-slf4j-impl binding (together with log4j-core) implements -the `org.slf4j.Logger` methods to be GC-free. However, bear in mind that -there are some limitations: - -The SLF4J API only offers up to two parameters for a parameterized -message. More than that uses varargs which creates a temporary object -for the parameter array. The Log4j 2.6 API has methods for up to ten -unrolled parameters. - -Another consideration is that the SLF4J API forces your application to -log Strings. Log4j 2 API lets you log any java.lang.CharSequence, and -even any Objects. Log4j can log any Object that implements -`java.lang.CharSequence` or -`org.apache.logging.log4j.util.StringBuilderFormattable` without -creating garbage. - -The -https://www.slf4j.org/api/org/slf4j/spi/LocationAwareLogger.html#log-org.slf4j.Marker-java.lang.String-int-java.lang.String-java.lang.Object:A-java.lang.Throwable-[`org.slf4j.spi.LocationAwareLogger::log`] -method is not yet implemented in a garbage-free manner in the -log4j-slf4j-impl binding. It creates a new message object for each call. - -[#gc-free-domain-object] -== How do I log my domain object without creating garbage? - -One option is to let the domain object implement java.lang.CharSequence. -However, for many domain objects it may not be trivial to implement this -without allocating temporary objects. - -An alternative is to implement the -`org.apache.logging.log4j.util.StringBuilderFormattable` interface. If -an object is logged that implements this interface, its `formatTo` -method is called instead of `toString()`. - -[source,java] ----- -package org.apache.logging.log4j.util; -public interface StringBuilderFormattable { - /** - * Writes a text representation of this object into the specified {@code StringBuilder}, - * ideally without allocating temporary objects. - * - * @param buffer the StringBuilder to write into - */ - void formatTo(StringBuilder buffer); -} ----- - -[#logger-wrapper] -== How do I create a custom logger wrapper that shows the correct class, method and line number? - -Log4j remembers the fully qualified class name (FQCN) of the logger and -uses this to walk the stack trace for every log event when configured to -print location. (Be aware that logging with location is slow and may -impact the performance of your application.) - -The problem with custom logger wrappers is that they have a different -FQCN than the actual logger, so Log4j can’t find the place where your -custom logger was called. - -The solution is to provide the correct FQCN. The easiest way to do this -is to let Log4j generate the logger wrapper for you. Log4j comes with a -Logger wrapper generator tool. This tool was originally meant to support -custom log levels and is documented -https://logging.apache.org/log4j/2.x/manual/customloglevels.html#CustomLoggers[here]. - -The generated logger code will take care of the FQCN. diff --git a/src/site/asciidoc/legacy-docs.adoc b/src/site/asciidoc/legacy-docs.adoc deleted file mode 100644 index c7320553e05..00000000000 --- a/src/site/asciidoc/legacy-docs.adoc +++ /dev/null @@ -1,230 +0,0 @@ -//// - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Documentation (legacy) - -This is the legacy documentation migrated from the older versions of Log4j. These documents will not be updated any longer, and are provided for historical reference only. - -* xref:/manual/index.html[Introduction] -* xref:/manual/architecture.html[Architecture] -* xref:/manual/migration.html[Log4j 1.x Migration] - -== Java API - -* xref:/manual/api.html[Java API] -* xref:/manual/logbuilder.html[Log Builder] -* xref:/manual/flowtracing.html[Flow Tracing] -* xref:/manual/markers.html[Markers] -* xref:/manual/eventlogging.html[Event Logging] -* xref:/manual/messages.html[Messages] -* xref:/manual/thread-context.html[ThreadContext] - -== Configuration - -* xref:/manual/configuration.html[Configuration] -* xref:/manual/configuration.html#Architecture[Configuration Architecture] -* xref:/manual/configuration.html#Arbiters[Arbiters] -* xref:/manual/configuration.html#AutomaticConfiguration[Automatic Configuration] -* xref:/manual/configuration.html#Additivity[Additivity] -* xref:/manual/configuration.html#AutomaticReconfiguration[Automatic Reconfiguration] -* xref:/manual/configuration.html#ChainsawSupport[Chainsaw Support] -* xref:/manual/configuration.html#ConfigurationSyntax"[Configuration Syntax] -* xref:/manual/configuration.html#XML[XML Syntax] -* xref:/manual/configuration.html#JSON[JSON Syntax] -* xref:/manual/configuration.html#YAML[YAML Syntax] -* xref:/manual/configuration.html#Properties[Properties Syntax] -* xref:/manual/configuration.html#Loggers[Configuring Loggers] -* xref:/manual/configuration.html#Appenders[Configuring Appenders] -* xref:/manual/configuration.html#Filters[Configuring Filters] -* xref:/manual/configuration.html#PropertySubstitution[Property Substitution] -* xref:/manual/configuration.html#RuntimeLookup[Lookup Variables] -* xref:/manual/configuration.html#Scripts[Scripts] -* xref:/manual/configuration.html#XInclude[XInclude] -* xref:/manual/configuration.html#CompositeConfiguration[Composite Configurations] -* xref:/manual/configuration.html#StatusMessages[Status Messages] -* xref:/manual/configuration.html#UnitTestingInMaven[Unit Testing] -* xref:/manual/systemProperties.html[System Properties] - -== Usage - -* xref:/manual/usage.html[Usage] -* xref:/manual/usage.html?#StaticVsNonStatic[Static vs non-Static Loggers] -* xref:/manual/usage.html?#LoggerVsClass[Logger Name vs Class Name] -* xref:/manual/cloud.html[Logging in the Cloud] - -== Performance - -* xref:/performance.html[Performance] -* xref:/performance.html#benchmarks[Benchmarks] -* xref:/performance.html#loglibComparison[Logging Library Comparison] -* xref:/performance.html#asyncLogging[Async Logging Comparison] -* xref:/performance.html#asyncLoggingResponseTime[Async Logging Latency] -* xref:/performance.html#asyncLoggingWithParams[Parameters] -* xref:/performance.html#asyncLoggingWithLocation[Location] -* xref:/performance.html#fileLoggingComparison[File Logging Comparison] -* xref:/performance.html#filtering[Filtering Comparison] -* xref:/performance.html#tradeoffs[Trade-offs] - -== Lookups - -* xref:/manual/lookups.html[Lookups] -* xref:/manual/lookups.html#ContextMapLookup[Context Map] -* xref:/manual/lookups.html#DateLookup[Date] -* xref:/manual/lookups.html#DockerLookup[Docker] -* xref:/manual/lookups.html#EnvironmentLookup[Environment] -* xref:/manual/lookups.html#EventLookup[Event] -* xref:/manual/lookups.html#JavaLookup[Java] -* xref:/manual/lookups.html#JndiLookup[JNDI] -* xref:/manual/lookups.html#JmxRuntimeInputArgumentsLookup[JVM Arguments] -* xref:/manual/lookups.html#KubernetesLookup[Kubernetes] -* xref:/manual/lookups.html#Log4jConfigLookup[Log4j Config] -* xref:/manual/lookups.html#LowerLookup[Lower] -* xref:/manual/lookups.html#AppMainArgsLookup[Main Arguments] -* xref:/manual/lookups.html#MapLookup[Map] -* xref:/manual/lookups.html#StructuredDataLookup[Structured Data] -* xref:/manual/lookups.html#SystemPropertiesLookup[System Properties] -* xref:/manual/lookups.html#UpperLookup[Upper] - -== Appender - -* xref:/manual/appenders.html[Appenders] -* xref:/manual/appenders.html#AsyncAppender[Async] -* xref:/manual/appenders.html#ConsoleAppender[Console] -* xref:/manual/appenders.html#FailoverAppender[Failover] -* xref:/manual/appenders.html#FileAppender[File] -* xref:/manual/appenders.html#FlumeAppender[Flume] -* xref:/manual/appenders.html#JDBCAppender[JDBC] -* xref:/manual/appenders.html#HttpAppender[HTTP] -* xref:/manual/appenders.html#MemoryMappedFileAppender[Memory Mapped File] -* xref:/manual/appenders.html#NoSQLAppender[NoSQL] -* xref:/manual/appenders.html#NoSQLAppenderMongoDB[NoSQL for MongoDB] -* xref:/manual/appenders.html#OutputStreamAppender[Output Stream] -* xref:/manual/appenders.html#RandomAccessFileAppender[Random Access File] -* xref:/manual/appenders.html#RewriteAppender[Rewrite] -* xref:/manual/appenders.html#RollingFileAppender[Rolling File] -* xref:/manual/appenders.html#RollingRandomAccessFileAppender[Rolling Random Access File] -* xref:/manual/appenders.html#RoutingAppender[Routing] -* xref:/manual/appenders.html#ScriptAppenderSelector[ScriptAppenderSelector] -* xref:/manual/appenders.html#SocketAppender[Socket] -* xref:/manual/appenders.html#SSL[SSL] -* xref:/manual/appenders.html#SyslogAppender[Syslog] - -== Layouts - -* xref:/manual/layouts.html[Layouts] -* xref:/manual/layouts.html#CSVLayouts[CSV] -* xref:/manual/layouts.html#HTMLLayout[HTML] -* xref:/manual/json-template-layout.html[JSON Template] -* xref:/manual/layouts.html#PatternLayout[Pattern] -* xref:/manual/layouts.html#RFC5424Layout[RFC-5424] -* xref:/manual/layouts.html#SerializedLayout[Serialized] -* xref:/manual/layouts.html#SyslogLayout[Syslog] -* xref:/manual/layouts.html#LocationInformation[Location Information] - -== Filters - -* xref:/manual/filters.html[Filters] -* xref:/manual/filters.html#BurstFilter[Burst] -* xref:/manual/filters.html#CompositeFilter[Composite Filter] -* xref:/manual/filters.html#DynamicThresholdFilter[Dynamic Threshold] -* xref:/manual/filters.html#MapFilter[Map] -* xref:/manual/filters.html#MarkerFilter[Marker] -* xref:/manual/filters.html#MutableThreadContextMapFilter[Mutable Thread Context Map] -* xref:/manual/filters.html#RegexFilter[Regex] -* xref:/manual/filters.html#Script[Script] -* xref:/manual/filters.html#StructuredDataFilter[Structured Data] -* xref:/manual/filters.html#ThreadContextMapFilter[Thread Context Map] -* xref:/manual/filters.html#ThresholdFilter[Threshold] -* xref:/manual/filters.html#TimeFilter[Time] - -== Async Loggers - -* xref:/manual/async.html[Async Loggers] -* xref:/manual/async.html#Trade-offs[Trade-offs] -* xref:/manual/async.html#AllAsync[All Loggers Async] -* xref:/manual/async.html#MixedSync-Async[Mixed Sync & Async] -* xref:/manual/async.html#WaitStrategy[WaitStrategy] -* xref:/manual/async.html#Location[Location] -* xref:/manual/async.html#Performance[Performance] -* xref:/manual/async.html#UnderTheHood[Under The Hood] - -== Garbage-free Logging - -* xref:/manual/garbagefree.html[Garbage-free Logging] -* xref:/manual/garbagefree.html#Config[Configuration] -* xref:/manual/garbagefree.html#Appenders[Supported Appenders] -* xref:/manual/garbagefree.html#Layouts[Supported Layouts] -* xref:/manual/garbagefree.html#Filters[Supported Filters] -* xref:/manual/garbagefree.html#api[API Changes] -* xref:/manual/garbagefree.html#codeImpact[Impact on Application Code] -* xref:/garbagefree.html#Performance[Performance] /manual -* xref:/manual/garbagefree.html#UnderTheHood[Under the Hood] - -== Extending Log4j - -* xref:/manual/extending.html[Extending Log4j] -* xref:/manual/extending.html#LoggerContextFactory[LoggerContextFactory ] -* xref:/manual/extending.html#ContextSelector[ContextSelector ] -* xref:/manual/extending.html#ConfigurationFactory[ConfigurationFactory ] -* xref:/manual/extending.html#LoggerConfig[LoggerConfig ] -* xref:/manual/extending.html#LogEventFactory[LogEventFactory ] -* xref:/manual/extending.html#MessageFactory[MessageFactory ] -* xref:/manual/extending.html#Lookups[Lookups ] -* xref:/manual/extending.html#Filters[Filters ] -* xref:/manual/extending.html#Appenders[Appenders ] -* xref:/manual/extending.html#Layouts[Layouts ] -* xref:/manual/extending.html#PatternConverters[PatternConverters ] -* xref:/manual/extending.html#Plugin_Builders[Plugin Builders] -* xref:/manual/extending.html#Custom_ContextDataInjector[Custom ContextDataInjector] -* xref:/manual/extending.html#Custom_Plugins[Custom Plugins] - -== Plugins - -* xref:/manual/plugins.html[Plugins] -* xref:/manual/plugins.html#Core[Core ] -* xref:/manual/plugins.html#Converters[Converters] -* xref:/manual/plugins.html#KeyProviders[Key Providers] -* xref:/manual/plugins.html#Lookups[Lookups ] -* xref:/manual/plugins.html#TypeConverters[Type Converters] -* xref:/manual/plugins.html#DeveloperNotes[Developer Notes] - - -== Programmatic Log4j Configuration - -* xref:/manual/customconfig.html[Programmatic Log4j Configuration] -* xref:/manual/customconfig.html#ConfigurationBuilder[ConfigurationBuilder API] -* xref:/manual/customconfig.html#ConfigurationFactory[Understanding ConfigurationFactory] -* xref:/manual/customconfig.html#Example[Example] -* xref:/manual/customconfig.html#Configurator[Using Configurator] -* xref:/manual/customconfig.html#Hybrid[Config File and Code] -* xref:/manual/customconfig.html#AddingToCurrent[After Initialization] -* xref:/manual/customconfig.html#AppendingToWritersAndOutputStreams[Appending to Writers & OutputStreams] - -== Custom Log Levels - -* xref:/manual/customloglevels.html[Custom Log Levels] -* xref:/manual/customloglevels.html#DefiningLevelsInCode[In Code] -* xref:/manual/customloglevels.html#DefiningLevelsInConfiguration[In Configuration] -* xref:/manual/customloglevels.html#AddingOrReplacingLevels[Adding or Replacing Levels] -* xref:/manual/customloglevels.html#CustomLoggers[Custom Loggers] -* xref:/manual/customloglevels.html#ExampleUsage[Custom Logger Example] -* xref:/manual/customloglevels.html#CodeGen[Code Generation Tool] - -== Others - -* xref:/manual/jmx.html[JMX] -* xref:/manual/logsep.html[Logging Separation] - diff --git a/src/site/asciidoc/log4j-core.adoc b/src/site/asciidoc/log4j-core.adoc deleted file mode 100644 index b511c641a2c..00000000000 --- a/src/site/asciidoc/log4j-core.adoc +++ /dev/null @@ -1,32 +0,0 @@ -// vim: set syn=markdown : - -//// -Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Log4j 2 Implementation - -The Log4j 2 implementation provides the functional components of the logging system. -Users are free to create their own plugins and include them in the logging configuration. - -== Requirements - -As of version 2.4, Log4j 2 requires Java 7. -Versions 2.3 and earlier require Java 6. -Some features may require optional link:../runtime-dependencies.html[dependencies]. -These dependencies are specified in the documentation for those features. - -Some Log4j features require external dependencies. -See the link:dependencies.html#Dependency_Tree[Dependency Tree] for the exact list of JAR files needed for these features. diff --git a/src/site/asciidoc/log4j-jdbc-dbcp2.adoc b/src/site/asciidoc/log4j-jdbc-dbcp2.adoc deleted file mode 100644 index 0cfc478f623..00000000000 --- a/src/site/asciidoc/log4j-jdbc-dbcp2.adoc +++ /dev/null @@ -1,32 +0,0 @@ -// vim: set syn=markdown : - -//// -Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Log4j 2 JDBC Connection Source with Apache Commons DBCP 2 - -This module adds a connection source for JDBC Appenders. -The PoolingDriverConnectionSource provides connection pooling through Apache Commons DBCP 2. - -== Requirements - -This module was introduced in Log4j 2.11.0 and requires Apache Commons DBCP 2 to provide connection pooling. - -Some features may require optional link:../runtime-dependencies.html[dependencies]. -These dependencies are specified in the documentation for those features. - -Some Log4j features require external dependencies. -See the link:dependencies.html#Dependency_Tree[Dependency Tree] for the exact list of JAR files needed for these features. diff --git a/src/site/asciidoc/log4j-script.adoc b/src/site/asciidoc/log4j-script.adoc deleted file mode 100644 index 2a19cad081b..00000000000 --- a/src/site/asciidoc/log4j-script.adoc +++ /dev/null @@ -1,124 +0,0 @@ -// vim: set syn=markdown : - -//// -Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -:doctype: book - -There are two possibilities: - -* Logging Adapter as complete replacement (preferred, but requires JVM start option) -* Bridge Handler, transfering JDK output to log4j, e.g. -useful for webapps - -= Log4j JDK Logging Adapter - -The JDK Logging Adapter is a custom implementation of http://docs.oracle.com/javase/6/docs/api/java/util/logging/LogManager.html[`java.util.logging.LogManager`] that uses link:../log4j-core/index.html[Log4j]. -This adapter can be used with either the Log4j API or Log4j Core. -When used with the API, there are a couple features of JUL that aren't supported. -However, this does allow any other Log4j Provider besides the Core provider to be used with JUL. - -== Requirements - -The JDK Logging Adapter is dependent on the Log4j API and optionally Log4j Core. -For more information, see link:../runtime-dependencies.html[Runtime Dependencies]. - -== Usage - -To use the JDK Logging Adapter, you must set the system property `java.util.logging.manager` to link:apidocs/org/apache/logging/log4j/jul/LogManager.html[`org.apache.logging.log4j.jul.LogManager`] - -This must be done either through the command line (i.e., using the `-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager` argument) or by using `System.setProperty()` before any calls are made to `LogManager` or `Logger`. - -== 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. - -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:../log4j-core/apidocs/org/apache/logging/log4j/core/Appender.html[`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. -Custom levels should be implemented as an implementation of link:apidocs/org/apache/logging/log4j/jul/LevelConverter.html[`LevelConverter`], and the Log4j property `log4j.jul.levelConverter` must be set to your custom class name. -Using the default `LevelConverter` implementation, custom logging levels are mapped to whatever the current level of the `Logger` being logged to is using. - -=== Default Level Conversions - -|=== -| Java Level | Log4j Level - -| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#OFF[`OFF`] -| `OFF` - -| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#SEVERE[`SEVERE`] -| `ERROR` - -| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#WARNING[`WARNING`] -| `WARN` - -| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#INFO[`INFO`] -| `INFO` - -| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#CONFIG[`CONFIG`] -| link:apidocs/org/apache/logging/log4j/jul/LevelTranslator.html#CONFIG[`CONFIG`] - -| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#FINE[`FINE`] -| `DEBUG` - -| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#FINER[`FINER`] -| `TRACE` - -| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#FINEST[`FINEST`] -| link:apidocs/org/apache/logging/log4j/jul/LevelTranslator.html#FINEST[`FINEST`] - -| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#ALL[`ALL`] -| `ALL` -|=== - -= Log4j JDK Logging Bridge Handler - -The LogManager is not always useable because you have to set a JVM wide effective system property - e.g. -in web servers this is not possible if you are not the administrator. - -The link:apidocs/org/apache/logging/log4j/jul/Log4jBridgeHandler.html[`Log4jBridgeHandler`] is an alternative that can be declaratively used via `logging.properties`. - -It is less performant than the LogManager but still okay to use: the LogManager replaces the JDK implementation, so your logging code (using JDK syntax) effectively directly uses log4j. -When using the BridgeHandler the original JDK implementation along with its configuration (e.g. -log levels) is still fully working but the log events are "written" via this handler to log4j as if you would have called log4j.Logger.debug() etc.; -it is like a FileHandler but instead of writing to a file, it "writes" to log4j Loggers - thus there is some overhead compared to using LogManager. - -== Usage - -The JUL configuration file `logging.properties` needs the line - -`handlers = org.apache.logging.log4j.jul.Log4jBridgeHandler` - -and JUL logs go to log4j2. -Additionally, you typically want to use to following: - -`org.apache.logging.log4j.jul.Log4jBridgeHandler.propagateLevels = true` - -In a webapp on Tomcat (and maybe other servers, too), you may simply create a `WEB-INF/classes/logging.properties` file with above content. -The bridge and the log levels defined in this file are only valid for your webapp and do _not_ have any impact on the other webapps on the same Tomcat instance. - -Alternatively you may call `Log4jBridgeHandler.install()` inside your webapp's initialization code, e.g. -inside `ServletContextListener` or a `ServletFilter` static-class-init. -or `contextInitialized()`. - -IMPORTANT: Log levels of JDK should match the ones of log4j. -You may do this manually or use the automatic level propagation via `Log4jBridgeHandler.propagateLevels = true`. - -Please, read the link:apidocs/org/apache/logging/log4j/jul/Log4jBridgeHandler.html[JavaDoc] for detailed configuration and limitation information! diff --git a/src/site/asciidoc/log4j-transform.adoc b/src/site/asciidoc/log4j-transform.adoc deleted file mode 100644 index 25b8f1d316b..00000000000 --- a/src/site/asciidoc/log4j-transform.adoc +++ /dev/null @@ -1,31 +0,0 @@ -//// - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Log4j Transformation Tools - -Log4j Transformation Tools is set of build utilities to transform source and binary artifacts that use Log4j 2.x libraries. -The full documentation is available on https://github.com/apache/logging-log4j-transform/blob/main/README.adoc[Github]. - -== Available Tools - -https://github.com/apache/logging-log4j-transform/blob/main/log4j-transform-maven-plugin/README.adoc[Log4j Transform Maven Plugin]:: -Apache Maven plugin that precomputes the location of logging statements to prevent expensive runtime lookup calls. - -https://github.com/apache/logging-log4j-transform/blob/main/log4j-transform-maven-shade-plugin-extensions/README.adoc[Log4j Plugin Cache Transformer]:: -resource transformer for the -https://maven.apache.org/plugins/maven-shade-plugin/[Apache Maven Shade Plugin] -that merges the plugin caches used by Log4j 2.x artifacts. - diff --git a/src/site/asciidoc/manual/migration.adoc b/src/site/asciidoc/manual/migration.adoc deleted file mode 100644 index 78ea31e8529..00000000000 --- a/src/site/asciidoc/manual/migration.adoc +++ /dev/null @@ -1,379 +0,0 @@ -//// - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Migrating from Log4j 1.x -Ralph Goers - -[#Log4j1.2Bridge] -== When to use this the Log4j 1.x bridge - -This bridge is useful as a dependency of an "application" which would like to use Log4j v2 as its main logging framework, if either that application itself hasn't been changed from using the Log4j 1.x API to the 1.x API, or if such an application depends on one or several (perhaps old) libraries that are "out of your control", and which themselves still contain code and thus a compile dependency on Log 1.x only. - -Once you have migrated all of your own application & library code under your control, you may not need this bridge. Note that when you use a library/framework that can be configured to use several logging frameworks, then you typically don't need this bridge either anymore, as you may be able to directly configure it to use Log4j v2 instead v1. Some libraries/frameworks even auto-detect the presence of certain logging framework implementations on their classpath, and automagically switch their internal logging delegation accordingly; try simple removing the Log4j v1 dependency instead of replacing it with this bridge, and test if logging from all of your depenencies still work. - -If you own or can contribute open source to the library you depend on, then you likely would prefer replacing its use of the Log4j v1 Logging API with the v2 API. (It typically does not make sense for libraries to depend on this bridge and support both the v1 and v2 Log4j API, because end-users of such a library would still have to replace their Log4j configuration v1 with a different v2 config anyway; see below.) - -== Using the Log4j 1.x bridge - -Perhaps the simplest way to convert to using Log4j 2 is to replace the -log4j 1.x jar file with Log4j 2's `log4j-1.2-api.jar`. However, to use -this successfully applications must meet the following requirements: - -1. They must not access methods and classes internal to the Log4j 1.x -implementation such as `Appender`s, `LoggerRepository` or `Category`'s -`callAppenders` method. -2. They must not programmatically configure Log4j. -3. They must not configure by calling the classes `DOMConfigurator` or -`PropertyConfigurator`. - -== Converting to the Log4j 2 API - -For the most part, converting from the Log4j 1.x API to Log4j 2 should -be fairly simple. Many of the log statements will require no -modification. However, where necessary the following changes must be -made. - -. The main package in version 1 is `org.apache.log4j`, in version 2 it -is `org.apache.logging.log4j` -. Calls to `org.apache.log4j.Logger.getLogger()` must be modified to -`org.apache.logging.log4j.LogManager.getLogger()`. -. Calls to `org.apache.log4j.Logger.getRootLogger()` or -`org.apache.log4j.LogManager.getRootLogger()` must be replaced with -`org.apache.logging.log4j.LogManager.getRootLogger()`. -. Calls to `org.apache.log4j.Logger.getLogger` that accept a -`LoggerFactory` must remove the `org.apache.log4j.spi.LoggerFactory` and -use one of Log4j 2's other extension mechanisms. -. Replace calls to `org.apache.log4j.Logger.getEffectiveLevel()` with -`org.apache.logging.log4j.Logger.getLevel()`. -. Remove calls to `org.apache.log4j.LogManager.shutdown()`, they are -not needed in version 2 because the Log4j Core now automatically adds a -JVM shutdown hook on start up to perform any Core clean ups. -.. Starting in Log4j 2.1, you can specify a custom -link:../log4j-core/apidocs/org/apache/logging/log4j/core/util/ShutdownCallbackRegistry.html[`ShutdownCallbackRegistry`] -to override the default JVM shutdown hook strategy. -.. Starting in Log4j 2.6, you can now use -`org.apache.logging.log4j.LogManager.shutdown()` to initiate shutdown -manually. -. Calls to `org.apache.log4j.Logger.setLevel()` or similar methods are -not supported in the API. Applications should remove these. Equivalent -functionality is provided in the Log4j 2 implementation classes, see -`org.apache.logging.log4j.core.config.Configurator.setLevel()`, but may -leave the application susceptible to changes in Log4j 2 internals. -. Where appropriate, applications should convert to use parameterized -messages instead of String concatenation. -. http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/MDC.html[`org.apache.log4j.MDC`] -and -http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/NDC.html[`org.apache.log4j.NDC`] -have been replaced by the link:thread-context.html[Thread Context]. - -== Configuring Log4j 2 - -Although the Log4j 2 configuration syntax is different than that of -Log4j 1.x, most, if not all, of the same functionality is available. - -Note that system property interpolation via the `${foo}` syntax has been -extended to allow property lookups from many different sources. See the -link:lookups.html[Lookups] documentation for more details. For example, -using a lookup for the system property named `catalina.base`, in Log4j -1.x, the syntax would be `${catalina.base}`. In Log4j 2, the syntax -would be `${sys:catalina.base}`. - -The Log4j 1 `XmlLayout` can be emulated using the `Log4j1XmlLayout` provided by the `log4j-1.2-api` module of Log4j 2. -The Log4j 1 `SimpleLayout` and `TTCCLayout` can be emulated using the Log4j 2 `PatternLayout` configured with `%level - %m%n` and `%r [%t] %p %c %notEmpty\{%ndc }- %m%n` patterns, respectively. - -Both `PatternLayout` and `EnhancedPatternLayout` in Log4j 1.x can be -replaced with `PatternLayout` in Log4j 2. The log4j-1.2-api module -contains two pattern conversions "%ndc" and "%properties" which can be -used to emulate "%x" and "%X" in Log4j 1.x PatternLayout ("%x" and %X" -in Log4j 2 have a slightly different format). - -Below are the example configurations for Log4j 1.x and their -counterparts in Log4j 2. - -=== Sample 1 - Simple configuration using a Console Appender - -Log4j 1.x XML configuration - -.log4j.xml -[source,xml] ----- - - - - - - - - - - - - - - - - ----- - -Log4j 2 XML configuration - -.log4j2.xml -[source,xml] ----- - - - - - - - - - - - - - - ----- - -=== Sample 2 - Simple configuration using a File Appender, XMLLayout and SimpleLayout - -Log4j 1.x XML configuration - -.log4j.xml -[source,xml] ----- - - - - - - - - - - - - - - - - - - - - ----- - -Log4j 2 XML configuration - -.log4j2.xml -[source,xml] ----- - - - - - - - - - - - - - - - - - - - ----- - -=== Sample 3 - SocketAppender - -Log4j 1.x XML configuration. This example from Log4j 1.x is misleading. -The SocketAppender does not actually use a Layout. Configuring one will -have no effect. - -.log4j.xml -[source,xml] ----- - - - - - - - - - - - - - - - - - - - - - - - - - ----- - -Log4j 2 XML configuration - -.log4j2.xml -[source,xml] ----- - - - - - - - - - - - - - - - - - - - ----- - -=== Sample 4 - AsyncAppender and TTCCLayout - -Log4j 1.x XML configuration using the AsyncAppender. - -.log4j.xml -[source,xml] ----- - - - - - - - - - - - - - - - - - - - ----- - -Log4j 2 XML configuration. - -.log4j2.xml -[source,xml] ----- - - - - - - - - - - - - - - - - ----- - -=== Sample 5 - AsyncAppender with Console and File - -Log4j 1.x XML configuration using the AsyncAppender. - -.log4j.xml -[source,xml] ----- - - - - - - - - - - - - - - - - - - - - - - - ----- - -Log4j 2 XML configuration. Note that the Async Appender should be -configured after the appenders it references. This will allow it to -shutdown properly. - -.log4j2.xml -[source,xml] ----- - - - - - - - - - - - - - - - - - - - - ----- diff --git a/src/site/asciidoc/manual/scala-api.adoc b/src/site/asciidoc/manual/scala-api.adoc deleted file mode 100644 index 685f3705436..00000000000 --- a/src/site/asciidoc/manual/scala-api.adoc +++ /dev/null @@ -1,81 +0,0 @@ -//// - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Log4j 2 Scala API -Mikael Ståldal - -Log4j 2 has a companion Log4j Scala project that contains a convenient -Scala wrapper for the -link:../log4j-api/apidocs/org/apache/logging/log4j/Logger.html[`Logger`] -API. - -== Requirements - -Log4j 2 Scala API is dependent on the Log4j 2 API, Scala runtime library -and reflection. It currently supports Scala 2.10, 2.11, 2.12 and 2.13. -Scala 3 support has been recently added. -See link:../maven-artifacts.html#Scala_API[instructions] on including this -in an SBT, Maven, Ivy, or Gradle project. - -== Example - -[source,scala] ----- -import org.apache.logging.log4j.scala.Logging -import org.apache.logging.log4j.Level - -class MyClass extends BaseClass with Logging { - def doStuff(): Unit = { - logger.info("Doing stuff") - } - def doStuffWithLevel(level: Level): Unit = { - logger(level, "Doing stuff with arbitrary level") - } -} ----- - -The output from the call to `logger.info()` will vary significantly -depending on the configuration used. See the -link:./configuration.html[Configuration] section for more details. - -== Substituting Parameters - -Frequently the purpose of logging is to provide information about what -is happening in the system, which requires including information about -the objects being manipulated. In Scala, you can use -http://docs.scala-lang.org/overviews/core/string-interpolation.html[string -interpolation] to achieve this: - -[source,scala] ----- -logger.debug(s"Logging in user ${user.getName} with birthday ${user.calcBirthday}") ----- - -Since the Scala Logger is implemented with macros, the String -construction and method invocations will only occur when debug logging -is enabled. - -== Logger Names - -Most logging implementations use a hierarchical scheme for matching -logger names with logging configuration. In this scheme the logger name -hierarchy is represented by '.' characters in the logger name, in a -fashion very similar to the hierarchy used for Java/Scala package names. -The Logging trait will automatically name the Logger accordingly to the -class it is being used in. - -Please see the http://logging.apache.org/log4j/scala/index.html[Log4j -Scala] project for more details. diff --git a/src/site/asciidoc/runtime-dependencies.adoc b/src/site/asciidoc/runtime-dependencies.adoc deleted file mode 100644 index 420f59cb8cc..00000000000 --- a/src/site/asciidoc/runtime-dependencies.adoc +++ /dev/null @@ -1,552 +0,0 @@ -//// - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -//// -= Runtime Dependencies - -Some Log4j features depend on external libraries. This page lists the -required and optional dependencies. - -The Log4j API is a Java module (with a module-info.java). Many of the other jars are also JPMS modules. The -characteristics of the modules are: - -[cols="3h,5m,12a"] -|=== -|Artifact Name |Module Name |Module Characteristics - -|log4j-api -|org.apache.logging.log4j -| -[cols="m,"] -!=== -!Module Directive !Notes - -!exports org.apache.logging.log4j -! - -!exports org.apache.logging.log4j.message -! - -!exports org.apache.logging.log4j.simple -! - -!exports org.apache.logging.log4j.spi -! - -!exports org.apache.logging.log4j.status -! - -!exports org.apache.logging.log4j.util -!Some classes in this package are used by the logging implementation and should be considered private. -The module info definition may be modified in the future to export these only to the logging implementation. - -!requires static java.sql -! -!requires static org.osgi.framework -! - -!uses org.apache.logging.log4j.spi.Provider -!Service that must be provided by the logging implementation. -!uses PropertySource -!Service that must be provided by the logging implementation. -!uses org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory -!Service that must be provided by the logging implementation. - -!provides PropertySource with EnvironmentPropertySource, SystemPropertiesPropertySource -! -!=== - -|log4j-core -|org.apache.logging.log4j.core -| -[cols="m,"] -!=== -!Module Directive !Notes - -!exports org.apache.logging.log4j.core -! -!exports org.apache.logging.log4j.core.appender -! -!exports org.apache.logging.log4j.core.appender.db -! -!exports org.apache.logging.log4j.core.appender.nosql -! -!exports org.apache.logging.log4j.core.appender.rewrite -! -!exports org.apache.logging.log4j.core.appender.rolling -! -!exports org.apache.logging.log4j.core.appender.rolling.action -! -!exports org.apache.logging.log4j.core.appender.routing -! -!exports org.apache.logging.log4j.core.async -! -!exports org.apache.logging.log4j.core.config -! -!exports org.apache.logging.log4j.core.config.arbiters -! -!exports org.apache.logging.log4j.core.config.builder.api -! -!exports org.apache.logging.log4j.core.config.builder.impl -! -!exports org.apache.logging.log4j.core.config.composite -! -!exports org.apache.logging.log4j.core.config.json -! -!exports org.apache.logging.log4j.core.config.plugins -! -!exports org.apache.logging.log4j.core.config.plugins.convert -! -!exports org.apache.logging.log4j.core.config.plugins.util -! -!exports org.apache.logging.log4j.core.config.plugins.visit -! -!exports org.apache.logging.log4j.core.config.properties -! -!exports org.apache.logging.log4j.core.config.status -! -!exports org.apache.logging.log4j.core.config.xml -! -!exports org.apache.logging.log4j.core.config.yaml -! -!exports org.apache.logging.log4j.core.filter -! -!exports org.apache.logging.log4j.core.impl -! -!exports org.apache.logging.log4j.core.jmx -! -!exports org.apache.logging.log4j.core.layout -! -!exports org.apache.logging.log4j.core.lookup -! -!exports org.apache.logging.log4j.core.message -! -!exports org.apache.logging.log4j.core.net -! -!exports org.apache.logging.log4j.core.net.ssl -! -!exports org.apache.logging.log4j.core.osgi -! -!exports org.apache.logging.log4j.core.parser -! -!exports org.apache.logging.log4j.core.pattern -! -!exports org.apache.logging.log4j.core.script -! -!exports org.apache.logging.log4j.core.selector -! -!exports org.apache.logging.log4j.core.time -! -!exports org.apache.logging.log4j.core.tools -! -!exports org.apache.logging.log4j.core.tools.picocli -! -!exports org.apache.logging.log4j.core.util -! -!exports org.apache.logging.log4j.core.util.datetime -! - -!// Required Dependencies -! -!requires transitive org.apache.logging.log4j -! -!requires transitive org.apache.logging.log4j.plugins -! -!// Optional Dependencies -! -!requires static java.desktop -! -!requires static java.management -! -!requires static java.sql -! -!requires static java.rmi -! -!requires static java.xml -! -!requires static com.lmax.disruptor -! -!requires static org.osgi.framework -! -!requires static com.conversantmedia.disruptor -! -!requires static com.fasterxml.jackson.core -! -!requires static com.fasterxml.jackson.databind -! -!requires static com.fasterxml.jackson.dataformat.xml -! -!requires static com.fasterxml.jackson.dataformat.yaml -! -!requires static org.apache.commons.compress -! -!requires static org.fusesource.jansi -! - -!requires static jdk.unsupported -! - -!uses ContextDataProvider -! -!uses WatchEventService -! -!uses ScriptManagerFactory -! -!provides ThreadInfoFactory with ExtendedThreadInfoFactory -! -!provides ContextDataProvider with ThreadContextDataProvider -! -!provides Provider with Log4jProvider -! -!provides PluginService with Log4jPlugins -! -!provides InjectorCallback with DefaultCallback -! -!=== - -|log4j-1.2-api -|org.apache.log4j -|Automatic Module - It is unlikely any application using JPMS would use Log4j 1.x. - -|log4j-docker -|org.apache.logging.log4j.docker -|Automatic Module - -|log4j-flume-ng -|org.apache.logging.log4j.flume -|Automatic Module - -|log4j-iostreams -|org.apache.logging.log4j.iostreams -|Automatic Module - -|log4j-jpl -|org.apache.logging.log4j.jpl -| -[cols="m,"] -!=== -!Module Directive !Notes - -!exports org.apache.logging.log4j.jpl to junit -! -!requires org.apache.logging.log4j -! -!requires transitive org.apache.logging.log4j.core -! -!provides java.lang.System.LoggerFinder with org.apache.logging.log4j.jpl.Log4jSystemLoggerFinder -! -!=== - -|log4j-jul -|org.apache.logging.log4j.jul -| -[cols="m,"] -!=== -!Module Directive !Notes - -!exports org.apache.logging.log4j.jul -! -!opens org.apache.logging.log4j.jul to org.apache.logging.log4j -! - -!requires org.apache.logging.log4j -! -!requires org.apache.logging.log4j.core -! -!requires java.desktop -! -!requires java.logging -! -!=== - -|log4j-layout-template-json -|org.apache.logging.log4j.layout.template.json -| -[cols="m,"] -!=== -!Module Directive !Notes - -!exports org.apache.logging.log4j.layout.template.json -! -!exports org.apache.logging.log4j.layout.template.json.resolver -! -!exports org.apache.logging.log4j.layout.template.json.util -! - -!opens org.apache.logging.log4j.layout.template.json -! -!opens org.apache.logging.log4j.layout.template.json.resolver -! -!opens org.apache.logging.log4j.layout.template.json.util -! - -!requires org.apache.logging.log4j -! -!requires org.apache.logging.log4j.plugins -! -!requires org.apache.logging.log4j.core -! -!=== - -|log4j-plugin-processor -|org.apache.logging.log4j.plugin.processor -| -[cols="m,"] -!=== -!Module Directive !Notes - -!exports org.apache.logging.log4j.plugin.processor -! - -!requires java.compiler -! -!requires org.apache.logging.log4j -! -!requires org.apache.logging.log4j.plugins -! -!requires transitive org.osgi.framework -! - -!provides javax.annotation.processing.Processor with org.apache.logging.log4j.plugin.processor.PluginProcessor -! -!=== - -|log4j-plugins -|org.apache.logging.log4j.plugins -| -[cols="m,"] -!=== -!Module Directive !Notes - -!exports org.apache.logging.log4j.plugins -! -!exports org.apache.logging.log4j.plugins.condition -! -!exports org.apache.logging.log4j.plugins.convert -! -!exports org.apache.logging.log4j.plugins.di -! -!exports org.apache.logging.log4j.plugins.model -! -!exports org.apache.logging.log4j.plugins.name -! -!exports org.apache.logging.log4j.plugins.util -! -!exports org.apache.logging.log4j.plugins.validation -! -!exports org.apache.logging.log4j.plugins.validation.constraints -! -!exports org.apache.logging.log4j.plugins.validation.validators -! -!exports org.apache.logging.log4j.plugins.visit -! - -!requires org.apache.logging.log4j -! -!requires static org.osgi.framework -! - -!uses PluginService -! -!uses InjectorCallback -! -!=== - -|log4j-script -|org.apache.logging.log4j.script -| -[cols="m,"] -!=== -!Module Directive !Notes - -!exports org.apache.logging.log4j.script -! -!exports org.apache.logging.log4j.script.appender -! -!opens org.apache.logging.log4j.script.appender to org.apache.logging.log4j.core -! -!exports org.apache.logging.log4j.script.appender.rolling.action -! -!exports org.apache.logging.log4j.script.config.arbiter -! -!opens org.apache.logging.log4j.script.config.arbiter to org.apache.logging.log4j.core -! -!exports org.apache.logging.log4j.script.filter -! -!exports org.apache.logging.log4j.script.layout -! -!opens org.apache.logging.log4j.script.layout to org.apache.logging.log4j.core -! -!exports org.apache.logging.log4j.script.plugins -! - -!requires org.apache.logging.log4j -! -!requires org.apache.logging.log4j.core -! -!requires org.apache.logging.log4j.plugins -! -!requires java.scripting -! - -!provides PluginService with Log4jPlugins -! -!provides ScriptManagerFactory with ScriptManagerFactoryImpl -! -!=== - -|log4j-slf4j-impl -|org.apache.logging.log4j.slf4j.impl -|Automatic Module. May require renaming should SLF4J ever require all implementations to have the same module name. - -|log4j-to-jul -|org.apache.logging.log4j.tojul -| -[cols="m,"] -!=== -!Module Directive !Notes - -!exports org.apache.logging.log4j.tojul to org.apache.logging.log4j, org.apache.logging.log4j.tojul.test -! - -!requires org.apache.logging.log4j -! -!requires java.logging -! - -!provides org.apache.logging.log4j.spi.Provider with org.apache.logging.log4j.tojul.JULProvider -! - -!=== - -|log4j-to-slf4j -|org.apache.logging.log4j.slf4j -|Automatic Module - -|=== - - -log4j-api[[log4j-api]]:: -The Log4j link:log4j-api/index.html[API] module has no required external dependencies. - -log4j-core[[log4j-core]]:: -The Log4j link:log4j-core/index.html[Implementation] has no required exterbak dependencies but has several -optional link:log4j-core/dependencies.html[dependencies]. See the -link:log4j-core/dependencies.html#Dependency_Tree[Dependency Tree] for -the exact list of JAR files needed for these features. - -.Optional Dependencies per Feature in Log4j Implementation -[cols="1,3"] -|=== -|Feature |Requirements - -|XML configuration -|- - -|Properties configuration -|- - -|JSON configuration -|https://github.com/FasterXML/jackson[Jackson core and databind] - -|YAML configuration -|https://github.com/FasterXML/jackson[Jackson databind] and https://github.com/FasterXML/jackson-dataformat-yaml[YAML data format] - -|CSV Layout -|https://commons.apache.org/proper/commons-csv/[Apache Commons CSV] - -|Async Loggers -|http://lmax-exchange.github.io/disruptor/[LMAX Disruptor] - -|Windows console color support -|http://jansi.fusesource.org/[Jansi] - -|JDBC Appender -|a JDBC driver for the database you choose to write events to - -|NoSQL Appender with MongoDB provider -|MongoDB Java Client driver and Log4j MongoDB library - -|Bzip2, Deflate, Pack200, and XZ compression on rollover -|http://commons.apache.org/proper/commons-compress/[Apache Commons Compress]. -In addition, XZ requires http://tukaani.org/xz/java.html[XZ for Java]. - -|log4j-1.2-api[[log4j-1.2-api]] -|The link:log4j-1.2-api/index.html[Log4j 1.2 Bridge] has no external -dependencies. This only requires the Log4j API. Including Log4j Core provides optional, extra functionality. - -|log4j-api-scala[[log4j-api-scala]] -|The Log4j link:manual/scala-api.html[Scala API] requires Scala runtime -library and reflection in addition to the Log4j API. - -|log4j-docker -|link:log4j-docker/index.html[Log4j Docker Support] requires -https://github.com/FasterXML/jackson[Jackson annotations, core, and databind]. See the -link:log4j-docker/dependencies.html#Dependency_Tree[Dependency Tree] for the exact list of -JAR files needed. - -|log4j-flume-ng[[log4j-flume-ng]] -|The link:log4j-flume-ng/index.html[Flume Appender] requires -http://flume.apache.org/[Apache Flume] and -http://avro.apache.org/[Apache Avro]. The persistent agent uses Berkeley DB. See the -link:log4j-flume-ng/dependencies.html#Dependency_Tree[Dependency Tree] -for the exact list of JAR files needed. - -|log4j-iostreams[[log4j-iostreams]] -|The Log4j link:log4j-iostreams/index.html[IO Streams] module has no -external dependencies. This only requires the Log4j API. - -|log4j-jmx-gui[[log4j-jmx-gui]] -|The Log4j link:log4j-jmx-gui/index.html[JMX GUI] requires the JConsole -jar when run as a JConsole plugin. Otherwise it has no external -dependencies. See the -link:log4j-jmx-gui/dependencies.html#Dependency_Tree[Dependency Tree] -for the exact list of JAR files needed. - -|log4j-jul[[log4j-jul]] -|The Log4j 2 link:log4j-jul/index.html[Java Util Logging Adapter] has no -external dependencies. It optionally depends on the -link:log4j-api/index.html[Log4j Core] library. The only required module -is the Log4j API. - -|log4j-mongodb4[[log4j-mongodb4]] -|The Log4j link:log4j-mongodb4/index.html[MongoDB] module depends on the -http://docs.mongodb.org/ecosystem/drivers/java/[MongoDB Java Client -driver]. - -|log4j-slf4j-impl[[log4j-slf4j-impl]] -|The Log4j 2 link:log4j-slf4j-impl/index.html[SLF4J Binding] depends on -the http://www.slf4j.org/[SLF4J] API. See the -link:log4j-slf4j-impl/dependencies.html#Dependency_Tree[Dependency Tree] -for the exact list of JAR files needed. - -WARNING: Do not use this with the link:#log4j-to-slf4j[log4j-to-slf4j] module. - -|log4j-spring-cloud-config-client[[log4j-spring-cloud-config-client]] -|link:log4j-spring-cloud-config-client.html[Log4j Spring Cloud Config Client] requires -https://spring.io/projects/spring-cloud-config[Spring Cloud Config]. -https://spring.io/projects/spring-cloud-bus[Spring Cloud Bus] is required if notification of logging -configuration changes is desired. https://spring.io/projects/spring-boot[Spring Boot] is required -but applications do not have to be packaged as a Spring Boot application. - -|log4j-to-slf4j[[log4j-to-slf4j]] -|The link:log4j-to-slf4j/index.html[Log4j 2 to SLF4J Adapter] requires -the http://www.slf4j.org/[SLF4J] API and an SLF4J implementation. See -the link:log4j-to-slf4j/dependencies.html#Dependency_Tree[Dependency -Tree] for the exact list of JAR files needed. - -WARNING: Do not use this with the link:#log4j-slf4j-impl[log4j-slf4j-impl] module. - -|=== diff --git a/format-code.sh b/src/site/resources/.htaccess similarity index 73% rename from format-code.sh rename to src/site/resources/.htaccess index d38d4a85700..1b4d70606cb 100755 --- a/format-code.sh +++ b/src/site/resources/.htaccess @@ -1,5 +1,4 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- +# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information @@ -8,7 +7,7 @@ # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an @@ -16,5 +15,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -# ---------------------------------------------------------------------------- -./mvnw spotless:apply -pl '!log4j-bom' -T2C +# +RewriteEngine On +RewriteRule "^(/log4j/[23].x)/manual/scala-api.html" "/log4j/scala" [R=permanent] +RewriteRule "^(/log4j/[23].x)/release-notes/index.html" "$1/release-notes.html" [R=permanent] diff --git a/src/site/resources/css/fonts.css b/src/site/resources/css/fonts.css deleted file mode 100644 index 040f2e5f555..00000000000 --- a/src/site/resources/css/fonts.css +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: normal; - font-weight: 300; - src: url('../fonts/open-sans-v40-latin-300.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: italic; - font-weight: 300; - src: url('../fonts/open-sans-v40-latin-300italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: normal; - font-weight: 400; - src: url('../fonts/open-sans-v40-latin-regular.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: italic; - font-weight: 400; - src: url('../fonts/open-sans-v40-latin-italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: normal; - font-weight: 500; - src: url('../fonts/open-sans-v40-latin-500.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: italic; - font-weight: 500; - src: url('../fonts/open-sans-v40-latin-500italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: normal; - font-weight: 600; - src: url('../fonts/open-sans-v40-latin-600.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: italic; - font-weight: 600; - src: url('../fonts/open-sans-v40-latin-600italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: normal; - font-weight: 700; - src: url('../fonts/open-sans-v40-latin-700.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: italic; - font-weight: 700; - src: url('../fonts/open-sans-v40-latin-700italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: normal; - font-weight: 800; - src: url('../fonts/open-sans-v40-latin-800.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Open Sans'; - font-style: italic; - font-weight: 800; - src: url('../fonts/open-sans-v40-latin-800italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 100; - src: url('../fonts/noto-serif-v23-latin-100.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 100; - src: url('../fonts/noto-serif-v23-latin-100italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 200; - src: url('../fonts/noto-serif-v23-latin-200.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 200; - src: url('../fonts/noto-serif-v23-latin-200italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 300; - src: url('../fonts/noto-serif-v23-latin-300.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 300; - src: url('../fonts/noto-serif-v23-latin-300italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 400; - src: url('../fonts/noto-serif-v23-latin-regular.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 400; - src: url('../fonts/noto-serif-v23-latin-italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 500; - src: url('../fonts/noto-serif-v23-latin-500.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 500; - src: url('../fonts/noto-serif-v23-latin-500italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 600; - src: url('../fonts/noto-serif-v23-latin-600.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 600; - src: url('../fonts/noto-serif-v23-latin-600italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 700; - src: url('../fonts/noto-serif-v23-latin-700.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 700; - src: url('../fonts/noto-serif-v23-latin-700italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 800; - src: url('../fonts/noto-serif-v23-latin-800.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 800; - src: url('../fonts/noto-serif-v23-latin-800italic.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 900; - src: url('../fonts/noto-serif-v23-latin-900.woff2') format('woff2'); -} - -@font-face { - font-display: swap; - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 900; - src: url('../fonts/noto-serif-v23-latin-900italic.woff2') format('woff2'); -} \ No newline at end of file diff --git a/src/site/resources/css/logging-custom.css b/src/site/resources/css/logging-custom.css deleted file mode 100644 index 89657149103..00000000000 --- a/src/site/resources/css/logging-custom.css +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -#header { - display: flex; - height: 10vh; - max-width: 100%; - align-items: center; - z-index: 10000; - background-color: #f9f8f8; - border-bottom: 1px solid lightgrey; - -} - -#header .logo { - margin-right: 1.5em; -} - -#header .logo img { - max-height: 6vh; -} - -#header .main-menu { - flex-grow: 1; -} - -#header .main-menu > ul, -#header .secondary-menu > ul { - display: flex; - list-style: none; - margin: 0; -} - -#header .main-menu > ul li a, -#header .secondary-menu > ul li a { - font-family: 'Open Sans', serif; - font-size: 1em; - font-weight: bold; - text-decoration: none; -} - -#header .main-menu ul li, -#header .secondary-menu ul li { - margin-right: 1.3em; -} - -#header .navs { - display: flex; - width: 100%; -} - -#header .navs nav ul { - list-style: none; - margin: 0; - padding: 0; - overflow: hidden; -} - -#header .navs nav ul li { - float: left; -} - -#header .navs nav ul li a { - display: block; - text-align: center; - padding: 14px 16px; - text-decoration: none; -} - -#header .menu-drop-down { - display: none; - position: absolute; - flex-direction: column; - min-width: 160px; - box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); - z-index: 1; - background-color: white; -} - -#header .menu-drop-down li { - width: 100%; -} - -#header .menu-drop-down a { - padding: 12px 16px; - text-decoration: none; - display: block; - text-align: left; -} - -#header .navs nav ul li:hover .menu-drop-down { - display: flex; -} - -#header .menu-drop-down a:hover { - background-color: #f1f1f1; -} - -/** Footer */ -#footer { - z-index: 1000; - background-color: #333333; -} - -#footer .footer-text { - width: 100%; -} - -#footer .footer-text div { - line-height: 1.4em; - font-family: 'Open Sans', serif; - font-size: 1em; - color: white; - padding: 1em; -} - -#footer .footer-text div a { - color: lightgray; -} - -.content-container { - display: flex; -} - - -#content { - width: 80vw; - overflow: auto; - height: 100%; - margin: 0; -} - -.table-of-content { - width: 20vw; - padding: 2em; - height: 100vh; - max-height: 100vh; - overflow: auto; -} - -.table-of-content.sticky { - position: sticky; - top: 0; -} - -.table-of-content.sticky-effect { - background-color: #ededed; - transition: background-color 1s linear; -} - -/** Small screens < 1400px */ -@media (max-width: 1400px) { - #content { - max-width: 56em; - } - - .table-of-content { - width: 25vw; - } - - .content-container .content { - width: 75vw; - } - - .menu-mobile { - display: block; - flex-grow: 1; - cursor: pointer; - text-align: right; - font-size: 2em; - } - - .menu-mobile-close { - display: block; - text-align: right; - cursor: pointer; - padding: 1em; - font-size: 2em; - } - - #header .navs { - position: fixed; - top: 0; - right: -100%; - width: 300px; - height: 100%; - background: white; - z-index: 1000; - display: block; - } - - .main-menu ul, .secondary-menu ul { - flex-direction: column; - } -} - -/* Ensure the menu icon is visible on larger screens */ -@media screen and (min-width: 1400px) { - .menu-mobile { - display: none; - } - - .menu-mobile-close { - display: none; - } -} - - -@media screen and (max-width: 1100px) { - .table-of-content { - display: none; - } - - #content { - width: 95vw; - max-width: 100%; - } -} - - - - - - diff --git a/src/site/resources/font-awesome-4.7.0/css/font-awesome.css b/src/site/resources/font-awesome-4.7.0/css/font-awesome.css deleted file mode 100644 index ee906a8196d..00000000000 --- a/src/site/resources/font-awesome-4.7.0/css/font-awesome.css +++ /dev/null @@ -1,2337 +0,0 @@ -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */ -/* FONT PATH - * -------------------------- */ -@font-face { - font-family: 'FontAwesome'; - src: url('../fonts/fontawesome-webfont.eot?v=4.7.0'); - src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); - font-weight: normal; - font-style: normal; -} -.fa { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -/* makes the font 33% larger relative to the icon container */ -.fa-lg { - font-size: 1.33333333em; - line-height: 0.75em; - vertical-align: -15%; -} -.fa-2x { - font-size: 2em; -} -.fa-3x { - font-size: 3em; -} -.fa-4x { - font-size: 4em; -} -.fa-5x { - font-size: 5em; -} -.fa-fw { - width: 1.28571429em; - text-align: center; -} -.fa-ul { - padding-left: 0; - margin-left: 2.14285714em; - list-style-type: none; -} -.fa-ul > li { - position: relative; -} -.fa-li { - position: absolute; - left: -2.14285714em; - width: 2.14285714em; - top: 0.14285714em; - text-align: center; -} -.fa-li.fa-lg { - left: -1.85714286em; -} -.fa-border { - padding: .2em .25em .15em; - border: solid 0.08em #eeeeee; - border-radius: .1em; -} -.fa-pull-left { - float: left; -} -.fa-pull-right { - float: right; -} -.fa.fa-pull-left { - margin-right: .3em; -} -.fa.fa-pull-right { - margin-left: .3em; -} -/* Deprecated as of 4.4.0 */ -.pull-right { - float: right; -} -.pull-left { - float: left; -} -.fa.pull-left { - margin-right: .3em; -} -.fa.pull-right { - margin-left: .3em; -} -.fa-spin { - -webkit-animation: fa-spin 2s infinite linear; - animation: fa-spin 2s infinite linear; -} -.fa-pulse { - -webkit-animation: fa-spin 1s infinite steps(8); - animation: fa-spin 1s infinite steps(8); -} -@-webkit-keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -.fa-rotate-90 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); -} -.fa-rotate-180 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} -.fa-rotate-270 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; - -webkit-transform: rotate(270deg); - -ms-transform: rotate(270deg); - transform: rotate(270deg); -} -.fa-flip-horizontal { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; - -webkit-transform: scale(-1, 1); - -ms-transform: scale(-1, 1); - transform: scale(-1, 1); -} -.fa-flip-vertical { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; - -webkit-transform: scale(1, -1); - -ms-transform: scale(1, -1); - transform: scale(1, -1); -} -:root .fa-rotate-90, -:root .fa-rotate-180, -:root .fa-rotate-270, -:root .fa-flip-horizontal, -:root .fa-flip-vertical { - filter: none; -} -.fa-stack { - position: relative; - display: inline-block; - width: 2em; - height: 2em; - line-height: 2em; - vertical-align: middle; -} -.fa-stack-1x, -.fa-stack-2x { - position: absolute; - left: 0; - width: 100%; - text-align: center; -} -.fa-stack-1x { - line-height: inherit; -} -.fa-stack-2x { - font-size: 2em; -} -.fa-inverse { - color: #ffffff; -} -/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen - readers do not read off random characters that represent icons */ -.fa-glass:before { - content: "\f000"; -} -.fa-music:before { - content: "\f001"; -} -.fa-search:before { - content: "\f002"; -} -.fa-envelope-o:before { - content: "\f003"; -} -.fa-heart:before { - content: "\f004"; -} -.fa-star:before { - content: "\f005"; -} -.fa-star-o:before { - content: "\f006"; -} -.fa-user:before { - content: "\f007"; -} -.fa-film:before { - content: "\f008"; -} -.fa-th-large:before { - content: "\f009"; -} -.fa-th:before { - content: "\f00a"; -} -.fa-th-list:before { - content: "\f00b"; -} -.fa-check:before { - content: "\f00c"; -} -.fa-remove:before, -.fa-close:before, -.fa-times:before { - content: "\f00d"; -} -.fa-search-plus:before { - content: "\f00e"; -} -.fa-search-minus:before { - content: "\f010"; -} -.fa-power-off:before { - content: "\f011"; -} -.fa-signal:before { - content: "\f012"; -} -.fa-gear:before, -.fa-cog:before { - content: "\f013"; -} -.fa-trash-o:before { - content: "\f014"; -} -.fa-home:before { - content: "\f015"; -} -.fa-file-o:before { - content: "\f016"; -} -.fa-clock-o:before { - content: "\f017"; -} -.fa-road:before { - content: "\f018"; -} -.fa-download:before { - content: "\f019"; -} -.fa-arrow-circle-o-down:before { - content: "\f01a"; -} -.fa-arrow-circle-o-up:before { - content: "\f01b"; -} -.fa-inbox:before { - content: "\f01c"; -} -.fa-play-circle-o:before { - content: "\f01d"; -} -.fa-rotate-right:before, -.fa-repeat:before { - content: "\f01e"; -} -.fa-refresh:before { - content: "\f021"; -} -.fa-list-alt:before { - content: "\f022"; -} -.fa-lock:before { - content: "\f023"; -} -.fa-flag:before { - content: "\f024"; -} -.fa-headphones:before { - content: "\f025"; -} -.fa-volume-off:before { - content: "\f026"; -} -.fa-volume-down:before { - content: "\f027"; -} -.fa-volume-up:before { - content: "\f028"; -} -.fa-qrcode:before { - content: "\f029"; -} -.fa-barcode:before { - content: "\f02a"; -} -.fa-tag:before { - content: "\f02b"; -} -.fa-tags:before { - content: "\f02c"; -} -.fa-book:before { - content: "\f02d"; -} -.fa-bookmark:before { - content: "\f02e"; -} -.fa-print:before { - content: "\f02f"; -} -.fa-camera:before { - content: "\f030"; -} -.fa-font:before { - content: "\f031"; -} -.fa-bold:before { - content: "\f032"; -} -.fa-italic:before { - content: "\f033"; -} -.fa-text-height:before { - content: "\f034"; -} -.fa-text-width:before { - content: "\f035"; -} -.fa-align-left:before { - content: "\f036"; -} -.fa-align-center:before { - content: "\f037"; -} -.fa-align-right:before { - content: "\f038"; -} -.fa-align-justify:before { - content: "\f039"; -} -.fa-list:before { - content: "\f03a"; -} -.fa-dedent:before, -.fa-outdent:before { - content: "\f03b"; -} -.fa-indent:before { - content: "\f03c"; -} -.fa-video-camera:before { - content: "\f03d"; -} -.fa-photo:before, -.fa-image:before, -.fa-picture-o:before { - content: "\f03e"; -} -.fa-pencil:before { - content: "\f040"; -} -.fa-map-marker:before { - content: "\f041"; -} -.fa-adjust:before { - content: "\f042"; -} -.fa-tint:before { - content: "\f043"; -} -.fa-edit:before, -.fa-pencil-square-o:before { - content: "\f044"; -} -.fa-share-square-o:before { - content: "\f045"; -} -.fa-check-square-o:before { - content: "\f046"; -} -.fa-arrows:before { - content: "\f047"; -} -.fa-step-backward:before { - content: "\f048"; -} -.fa-fast-backward:before { - content: "\f049"; -} -.fa-backward:before { - content: "\f04a"; -} -.fa-play:before { - content: "\f04b"; -} -.fa-pause:before { - content: "\f04c"; -} -.fa-stop:before { - content: "\f04d"; -} -.fa-forward:before { - content: "\f04e"; -} -.fa-fast-forward:before { - content: "\f050"; -} -.fa-step-forward:before { - content: "\f051"; -} -.fa-eject:before { - content: "\f052"; -} -.fa-chevron-left:before { - content: "\f053"; -} -.fa-chevron-right:before { - content: "\f054"; -} -.fa-plus-circle:before { - content: "\f055"; -} -.fa-minus-circle:before { - content: "\f056"; -} -.fa-times-circle:before { - content: "\f057"; -} -.fa-check-circle:before { - content: "\f058"; -} -.fa-question-circle:before { - content: "\f059"; -} -.fa-info-circle:before { - content: "\f05a"; -} -.fa-crosshairs:before { - content: "\f05b"; -} -.fa-times-circle-o:before { - content: "\f05c"; -} -.fa-check-circle-o:before { - content: "\f05d"; -} -.fa-ban:before { - content: "\f05e"; -} -.fa-arrow-left:before { - content: "\f060"; -} -.fa-arrow-right:before { - content: "\f061"; -} -.fa-arrow-up:before { - content: "\f062"; -} -.fa-arrow-down:before { - content: "\f063"; -} -.fa-mail-forward:before, -.fa-share:before { - content: "\f064"; -} -.fa-expand:before { - content: "\f065"; -} -.fa-compress:before { - content: "\f066"; -} -.fa-plus:before { - content: "\f067"; -} -.fa-minus:before { - content: "\f068"; -} -.fa-asterisk:before { - content: "\f069"; -} -.fa-exclamation-circle:before { - content: "\f06a"; -} -.fa-gift:before { - content: "\f06b"; -} -.fa-leaf:before { - content: "\f06c"; -} -.fa-fire:before { - content: "\f06d"; -} -.fa-eye:before { - content: "\f06e"; -} -.fa-eye-slash:before { - content: "\f070"; -} -.fa-warning:before, -.fa-exclamation-triangle:before { - content: "\f071"; -} -.fa-plane:before { - content: "\f072"; -} -.fa-calendar:before { - content: "\f073"; -} -.fa-random:before { - content: "\f074"; -} -.fa-comment:before { - content: "\f075"; -} -.fa-magnet:before { - content: "\f076"; -} -.fa-chevron-up:before { - content: "\f077"; -} -.fa-chevron-down:before { - content: "\f078"; -} -.fa-retweet:before { - content: "\f079"; -} -.fa-shopping-cart:before { - content: "\f07a"; -} -.fa-folder:before { - content: "\f07b"; -} -.fa-folder-open:before { - content: "\f07c"; -} -.fa-arrows-v:before { - content: "\f07d"; -} -.fa-arrows-h:before { - content: "\f07e"; -} -.fa-bar-chart-o:before, -.fa-bar-chart:before { - content: "\f080"; -} -.fa-twitter-square:before { - content: "\f081"; -} -.fa-facebook-square:before { - content: "\f082"; -} -.fa-camera-retro:before { - content: "\f083"; -} -.fa-key:before { - content: "\f084"; -} -.fa-gears:before, -.fa-cogs:before { - content: "\f085"; -} -.fa-comments:before { - content: "\f086"; -} -.fa-thumbs-o-up:before { - content: "\f087"; -} -.fa-thumbs-o-down:before { - content: "\f088"; -} -.fa-star-half:before { - content: "\f089"; -} -.fa-heart-o:before { - content: "\f08a"; -} -.fa-sign-out:before { - content: "\f08b"; -} -.fa-linkedin-square:before { - content: "\f08c"; -} -.fa-thumb-tack:before { - content: "\f08d"; -} -.fa-external-link:before { - content: "\f08e"; -} -.fa-sign-in:before { - content: "\f090"; -} -.fa-trophy:before { - content: "\f091"; -} -.fa-github-square:before { - content: "\f092"; -} -.fa-upload:before { - content: "\f093"; -} -.fa-lemon-o:before { - content: "\f094"; -} -.fa-phone:before { - content: "\f095"; -} -.fa-square-o:before { - content: "\f096"; -} -.fa-bookmark-o:before { - content: "\f097"; -} -.fa-phone-square:before { - content: "\f098"; -} -.fa-twitter:before { - content: "\f099"; -} -.fa-facebook-f:before, -.fa-facebook:before { - content: "\f09a"; -} -.fa-github:before { - content: "\f09b"; -} -.fa-unlock:before { - content: "\f09c"; -} -.fa-credit-card:before { - content: "\f09d"; -} -.fa-feed:before, -.fa-rss:before { - content: "\f09e"; -} -.fa-hdd-o:before { - content: "\f0a0"; -} -.fa-bullhorn:before { - content: "\f0a1"; -} -.fa-bell:before { - content: "\f0f3"; -} -.fa-certificate:before { - content: "\f0a3"; -} -.fa-hand-o-right:before { - content: "\f0a4"; -} -.fa-hand-o-left:before { - content: "\f0a5"; -} -.fa-hand-o-up:before { - content: "\f0a6"; -} -.fa-hand-o-down:before { - content: "\f0a7"; -} -.fa-arrow-circle-left:before { - content: "\f0a8"; -} -.fa-arrow-circle-right:before { - content: "\f0a9"; -} -.fa-arrow-circle-up:before { - content: "\f0aa"; -} -.fa-arrow-circle-down:before { - content: "\f0ab"; -} -.fa-globe:before { - content: "\f0ac"; -} -.fa-wrench:before { - content: "\f0ad"; -} -.fa-tasks:before { - content: "\f0ae"; -} -.fa-filter:before { - content: "\f0b0"; -} -.fa-briefcase:before { - content: "\f0b1"; -} -.fa-arrows-alt:before { - content: "\f0b2"; -} -.fa-group:before, -.fa-users:before { - content: "\f0c0"; -} -.fa-chain:before, -.fa-link:before { - content: "\f0c1"; -} -.fa-cloud:before { - content: "\f0c2"; -} -.fa-flask:before { - content: "\f0c3"; -} -.fa-cut:before, -.fa-scissors:before { - content: "\f0c4"; -} -.fa-copy:before, -.fa-files-o:before { - content: "\f0c5"; -} -.fa-paperclip:before { - content: "\f0c6"; -} -.fa-save:before, -.fa-floppy-o:before { - content: "\f0c7"; -} -.fa-square:before { - content: "\f0c8"; -} -.fa-navicon:before, -.fa-reorder:before, -.fa-bars:before { - content: "\f0c9"; -} -.fa-list-ul:before { - content: "\f0ca"; -} -.fa-list-ol:before { - content: "\f0cb"; -} -.fa-strikethrough:before { - content: "\f0cc"; -} -.fa-underline:before { - content: "\f0cd"; -} -.fa-table:before { - content: "\f0ce"; -} -.fa-magic:before { - content: "\f0d0"; -} -.fa-truck:before { - content: "\f0d1"; -} -.fa-pinterest:before { - content: "\f0d2"; -} -.fa-pinterest-square:before { - content: "\f0d3"; -} -.fa-google-plus-square:before { - content: "\f0d4"; -} -.fa-google-plus:before { - content: "\f0d5"; -} -.fa-money:before { - content: "\f0d6"; -} -.fa-caret-down:before { - content: "\f0d7"; -} -.fa-caret-up:before { - content: "\f0d8"; -} -.fa-caret-left:before { - content: "\f0d9"; -} -.fa-caret-right:before { - content: "\f0da"; -} -.fa-columns:before { - content: "\f0db"; -} -.fa-unsorted:before, -.fa-sort:before { - content: "\f0dc"; -} -.fa-sort-down:before, -.fa-sort-desc:before { - content: "\f0dd"; -} -.fa-sort-up:before, -.fa-sort-asc:before { - content: "\f0de"; -} -.fa-envelope:before { - content: "\f0e0"; -} -.fa-linkedin:before { - content: "\f0e1"; -} -.fa-rotate-left:before, -.fa-undo:before { - content: "\f0e2"; -} -.fa-legal:before, -.fa-gavel:before { - content: "\f0e3"; -} -.fa-dashboard:before, -.fa-tachometer:before { - content: "\f0e4"; -} -.fa-comment-o:before { - content: "\f0e5"; -} -.fa-comments-o:before { - content: "\f0e6"; -} -.fa-flash:before, -.fa-bolt:before { - content: "\f0e7"; -} -.fa-sitemap:before { - content: "\f0e8"; -} -.fa-umbrella:before { - content: "\f0e9"; -} -.fa-paste:before, -.fa-clipboard:before { - content: "\f0ea"; -} -.fa-lightbulb-o:before { - content: "\f0eb"; -} -.fa-exchange:before { - content: "\f0ec"; -} -.fa-cloud-download:before { - content: "\f0ed"; -} -.fa-cloud-upload:before { - content: "\f0ee"; -} -.fa-user-md:before { - content: "\f0f0"; -} -.fa-stethoscope:before { - content: "\f0f1"; -} -.fa-suitcase:before { - content: "\f0f2"; -} -.fa-bell-o:before { - content: "\f0a2"; -} -.fa-coffee:before { - content: "\f0f4"; -} -.fa-cutlery:before { - content: "\f0f5"; -} -.fa-file-text-o:before { - content: "\f0f6"; -} -.fa-building-o:before { - content: "\f0f7"; -} -.fa-hospital-o:before { - content: "\f0f8"; -} -.fa-ambulance:before { - content: "\f0f9"; -} -.fa-medkit:before { - content: "\f0fa"; -} -.fa-fighter-jet:before { - content: "\f0fb"; -} -.fa-beer:before { - content: "\f0fc"; -} -.fa-h-square:before { - content: "\f0fd"; -} -.fa-plus-square:before { - content: "\f0fe"; -} -.fa-angle-double-left:before { - content: "\f100"; -} -.fa-angle-double-right:before { - content: "\f101"; -} -.fa-angle-double-up:before { - content: "\f102"; -} -.fa-angle-double-down:before { - content: "\f103"; -} -.fa-angle-left:before { - content: "\f104"; -} -.fa-angle-right:before { - content: "\f105"; -} -.fa-angle-up:before { - content: "\f106"; -} -.fa-angle-down:before { - content: "\f107"; -} -.fa-desktop:before { - content: "\f108"; -} -.fa-laptop:before { - content: "\f109"; -} -.fa-tablet:before { - content: "\f10a"; -} -.fa-mobile-phone:before, -.fa-mobile:before { - content: "\f10b"; -} -.fa-circle-o:before { - content: "\f10c"; -} -.fa-quote-left:before { - content: "\f10d"; -} -.fa-quote-right:before { - content: "\f10e"; -} -.fa-spinner:before { - content: "\f110"; -} -.fa-circle:before { - content: "\f111"; -} -.fa-mail-reply:before, -.fa-reply:before { - content: "\f112"; -} -.fa-github-alt:before { - content: "\f113"; -} -.fa-folder-o:before { - content: "\f114"; -} -.fa-folder-open-o:before { - content: "\f115"; -} -.fa-smile-o:before { - content: "\f118"; -} -.fa-frown-o:before { - content: "\f119"; -} -.fa-meh-o:before { - content: "\f11a"; -} -.fa-gamepad:before { - content: "\f11b"; -} -.fa-keyboard-o:before { - content: "\f11c"; -} -.fa-flag-o:before { - content: "\f11d"; -} -.fa-flag-checkered:before { - content: "\f11e"; -} -.fa-terminal:before { - content: "\f120"; -} -.fa-code:before { - content: "\f121"; -} -.fa-mail-reply-all:before, -.fa-reply-all:before { - content: "\f122"; -} -.fa-star-half-empty:before, -.fa-star-half-full:before, -.fa-star-half-o:before { - content: "\f123"; -} -.fa-location-arrow:before { - content: "\f124"; -} -.fa-crop:before { - content: "\f125"; -} -.fa-code-fork:before { - content: "\f126"; -} -.fa-unlink:before, -.fa-chain-broken:before { - content: "\f127"; -} -.fa-question:before { - content: "\f128"; -} -.fa-info:before { - content: "\f129"; -} -.fa-exclamation:before { - content: "\f12a"; -} -.fa-superscript:before { - content: "\f12b"; -} -.fa-subscript:before { - content: "\f12c"; -} -.fa-eraser:before { - content: "\f12d"; -} -.fa-puzzle-piece:before { - content: "\f12e"; -} -.fa-microphone:before { - content: "\f130"; -} -.fa-microphone-slash:before { - content: "\f131"; -} -.fa-shield:before { - content: "\f132"; -} -.fa-calendar-o:before { - content: "\f133"; -} -.fa-fire-extinguisher:before { - content: "\f134"; -} -.fa-rocket:before { - content: "\f135"; -} -.fa-maxcdn:before { - content: "\f136"; -} -.fa-chevron-circle-left:before { - content: "\f137"; -} -.fa-chevron-circle-right:before { - content: "\f138"; -} -.fa-chevron-circle-up:before { - content: "\f139"; -} -.fa-chevron-circle-down:before { - content: "\f13a"; -} -.fa-html5:before { - content: "\f13b"; -} -.fa-css3:before { - content: "\f13c"; -} -.fa-anchor:before { - content: "\f13d"; -} -.fa-unlock-alt:before { - content: "\f13e"; -} -.fa-bullseye:before { - content: "\f140"; -} -.fa-ellipsis-h:before { - content: "\f141"; -} -.fa-ellipsis-v:before { - content: "\f142"; -} -.fa-rss-square:before { - content: "\f143"; -} -.fa-play-circle:before { - content: "\f144"; -} -.fa-ticket:before { - content: "\f145"; -} -.fa-minus-square:before { - content: "\f146"; -} -.fa-minus-square-o:before { - content: "\f147"; -} -.fa-level-up:before { - content: "\f148"; -} -.fa-level-down:before { - content: "\f149"; -} -.fa-check-square:before { - content: "\f14a"; -} -.fa-pencil-square:before { - content: "\f14b"; -} -.fa-external-link-square:before { - content: "\f14c"; -} -.fa-share-square:before { - content: "\f14d"; -} -.fa-compass:before { - content: "\f14e"; -} -.fa-toggle-down:before, -.fa-caret-square-o-down:before { - content: "\f150"; -} -.fa-toggle-up:before, -.fa-caret-square-o-up:before { - content: "\f151"; -} -.fa-toggle-right:before, -.fa-caret-square-o-right:before { - content: "\f152"; -} -.fa-euro:before, -.fa-eur:before { - content: "\f153"; -} -.fa-gbp:before { - content: "\f154"; -} -.fa-dollar:before, -.fa-usd:before { - content: "\f155"; -} -.fa-rupee:before, -.fa-inr:before { - content: "\f156"; -} -.fa-cny:before, -.fa-rmb:before, -.fa-yen:before, -.fa-jpy:before { - content: "\f157"; -} -.fa-ruble:before, -.fa-rouble:before, -.fa-rub:before { - content: "\f158"; -} -.fa-won:before, -.fa-krw:before { - content: "\f159"; -} -.fa-bitcoin:before, -.fa-btc:before { - content: "\f15a"; -} -.fa-file:before { - content: "\f15b"; -} -.fa-file-text:before { - content: "\f15c"; -} -.fa-sort-alpha-asc:before { - content: "\f15d"; -} -.fa-sort-alpha-desc:before { - content: "\f15e"; -} -.fa-sort-amount-asc:before { - content: "\f160"; -} -.fa-sort-amount-desc:before { - content: "\f161"; -} -.fa-sort-numeric-asc:before { - content: "\f162"; -} -.fa-sort-numeric-desc:before { - content: "\f163"; -} -.fa-thumbs-up:before { - content: "\f164"; -} -.fa-thumbs-down:before { - content: "\f165"; -} -.fa-youtube-square:before { - content: "\f166"; -} -.fa-youtube:before { - content: "\f167"; -} -.fa-xing:before { - content: "\f168"; -} -.fa-xing-square:before { - content: "\f169"; -} -.fa-youtube-play:before { - content: "\f16a"; -} -.fa-dropbox:before { - content: "\f16b"; -} -.fa-stack-overflow:before { - content: "\f16c"; -} -.fa-instagram:before { - content: "\f16d"; -} -.fa-flickr:before { - content: "\f16e"; -} -.fa-adn:before { - content: "\f170"; -} -.fa-bitbucket:before { - content: "\f171"; -} -.fa-bitbucket-square:before { - content: "\f172"; -} -.fa-tumblr:before { - content: "\f173"; -} -.fa-tumblr-square:before { - content: "\f174"; -} -.fa-long-arrow-down:before { - content: "\f175"; -} -.fa-long-arrow-up:before { - content: "\f176"; -} -.fa-long-arrow-left:before { - content: "\f177"; -} -.fa-long-arrow-right:before { - content: "\f178"; -} -.fa-apple:before { - content: "\f179"; -} -.fa-windows:before { - content: "\f17a"; -} -.fa-android:before { - content: "\f17b"; -} -.fa-linux:before { - content: "\f17c"; -} -.fa-dribbble:before { - content: "\f17d"; -} -.fa-skype:before { - content: "\f17e"; -} -.fa-foursquare:before { - content: "\f180"; -} -.fa-trello:before { - content: "\f181"; -} -.fa-female:before { - content: "\f182"; -} -.fa-male:before { - content: "\f183"; -} -.fa-gittip:before, -.fa-gratipay:before { - content: "\f184"; -} -.fa-sun-o:before { - content: "\f185"; -} -.fa-moon-o:before { - content: "\f186"; -} -.fa-archive:before { - content: "\f187"; -} -.fa-bug:before { - content: "\f188"; -} -.fa-vk:before { - content: "\f189"; -} -.fa-weibo:before { - content: "\f18a"; -} -.fa-renren:before { - content: "\f18b"; -} -.fa-pagelines:before { - content: "\f18c"; -} -.fa-stack-exchange:before { - content: "\f18d"; -} -.fa-arrow-circle-o-right:before { - content: "\f18e"; -} -.fa-arrow-circle-o-left:before { - content: "\f190"; -} -.fa-toggle-left:before, -.fa-caret-square-o-left:before { - content: "\f191"; -} -.fa-dot-circle-o:before { - content: "\f192"; -} -.fa-wheelchair:before { - content: "\f193"; -} -.fa-vimeo-square:before { - content: "\f194"; -} -.fa-turkish-lira:before, -.fa-try:before { - content: "\f195"; -} -.fa-plus-square-o:before { - content: "\f196"; -} -.fa-space-shuttle:before { - content: "\f197"; -} -.fa-slack:before { - content: "\f198"; -} -.fa-envelope-square:before { - content: "\f199"; -} -.fa-wordpress:before { - content: "\f19a"; -} -.fa-openid:before { - content: "\f19b"; -} -.fa-institution:before, -.fa-bank:before, -.fa-university:before { - content: "\f19c"; -} -.fa-mortar-board:before, -.fa-graduation-cap:before { - content: "\f19d"; -} -.fa-yahoo:before { - content: "\f19e"; -} -.fa-google:before { - content: "\f1a0"; -} -.fa-reddit:before { - content: "\f1a1"; -} -.fa-reddit-square:before { - content: "\f1a2"; -} -.fa-stumbleupon-circle:before { - content: "\f1a3"; -} -.fa-stumbleupon:before { - content: "\f1a4"; -} -.fa-delicious:before { - content: "\f1a5"; -} -.fa-digg:before { - content: "\f1a6"; -} -.fa-pied-piper-pp:before { - content: "\f1a7"; -} -.fa-pied-piper-alt:before { - content: "\f1a8"; -} -.fa-drupal:before { - content: "\f1a9"; -} -.fa-joomla:before { - content: "\f1aa"; -} -.fa-language:before { - content: "\f1ab"; -} -.fa-fax:before { - content: "\f1ac"; -} -.fa-building:before { - content: "\f1ad"; -} -.fa-child:before { - content: "\f1ae"; -} -.fa-paw:before { - content: "\f1b0"; -} -.fa-spoon:before { - content: "\f1b1"; -} -.fa-cube:before { - content: "\f1b2"; -} -.fa-cubes:before { - content: "\f1b3"; -} -.fa-behance:before { - content: "\f1b4"; -} -.fa-behance-square:before { - content: "\f1b5"; -} -.fa-steam:before { - content: "\f1b6"; -} -.fa-steam-square:before { - content: "\f1b7"; -} -.fa-recycle:before { - content: "\f1b8"; -} -.fa-automobile:before, -.fa-car:before { - content: "\f1b9"; -} -.fa-cab:before, -.fa-taxi:before { - content: "\f1ba"; -} -.fa-tree:before { - content: "\f1bb"; -} -.fa-spotify:before { - content: "\f1bc"; -} -.fa-deviantart:before { - content: "\f1bd"; -} -.fa-soundcloud:before { - content: "\f1be"; -} -.fa-database:before { - content: "\f1c0"; -} -.fa-file-pdf-o:before { - content: "\f1c1"; -} -.fa-file-word-o:before { - content: "\f1c2"; -} -.fa-file-excel-o:before { - content: "\f1c3"; -} -.fa-file-powerpoint-o:before { - content: "\f1c4"; -} -.fa-file-photo-o:before, -.fa-file-picture-o:before, -.fa-file-image-o:before { - content: "\f1c5"; -} -.fa-file-zip-o:before, -.fa-file-archive-o:before { - content: "\f1c6"; -} -.fa-file-sound-o:before, -.fa-file-audio-o:before { - content: "\f1c7"; -} -.fa-file-movie-o:before, -.fa-file-video-o:before { - content: "\f1c8"; -} -.fa-file-code-o:before { - content: "\f1c9"; -} -.fa-vine:before { - content: "\f1ca"; -} -.fa-codepen:before { - content: "\f1cb"; -} -.fa-jsfiddle:before { - content: "\f1cc"; -} -.fa-life-bouy:before, -.fa-life-buoy:before, -.fa-life-saver:before, -.fa-support:before, -.fa-life-ring:before { - content: "\f1cd"; -} -.fa-circle-o-notch:before { - content: "\f1ce"; -} -.fa-ra:before, -.fa-resistance:before, -.fa-rebel:before { - content: "\f1d0"; -} -.fa-ge:before, -.fa-empire:before { - content: "\f1d1"; -} -.fa-git-square:before { - content: "\f1d2"; -} -.fa-git:before { - content: "\f1d3"; -} -.fa-y-combinator-square:before, -.fa-yc-square:before, -.fa-hacker-news:before { - content: "\f1d4"; -} -.fa-tencent-weibo:before { - content: "\f1d5"; -} -.fa-qq:before { - content: "\f1d6"; -} -.fa-wechat:before, -.fa-weixin:before { - content: "\f1d7"; -} -.fa-send:before, -.fa-paper-plane:before { - content: "\f1d8"; -} -.fa-send-o:before, -.fa-paper-plane-o:before { - content: "\f1d9"; -} -.fa-history:before { - content: "\f1da"; -} -.fa-circle-thin:before { - content: "\f1db"; -} -.fa-header:before { - content: "\f1dc"; -} -.fa-paragraph:before { - content: "\f1dd"; -} -.fa-sliders:before { - content: "\f1de"; -} -.fa-share-alt:before { - content: "\f1e0"; -} -.fa-share-alt-square:before { - content: "\f1e1"; -} -.fa-bomb:before { - content: "\f1e2"; -} -.fa-soccer-ball-o:before, -.fa-futbol-o:before { - content: "\f1e3"; -} -.fa-tty:before { - content: "\f1e4"; -} -.fa-binoculars:before { - content: "\f1e5"; -} -.fa-plug:before { - content: "\f1e6"; -} -.fa-slideshare:before { - content: "\f1e7"; -} -.fa-twitch:before { - content: "\f1e8"; -} -.fa-yelp:before { - content: "\f1e9"; -} -.fa-newspaper-o:before { - content: "\f1ea"; -} -.fa-wifi:before { - content: "\f1eb"; -} -.fa-calculator:before { - content: "\f1ec"; -} -.fa-paypal:before { - content: "\f1ed"; -} -.fa-google-wallet:before { - content: "\f1ee"; -} -.fa-cc-visa:before { - content: "\f1f0"; -} -.fa-cc-mastercard:before { - content: "\f1f1"; -} -.fa-cc-discover:before { - content: "\f1f2"; -} -.fa-cc-amex:before { - content: "\f1f3"; -} -.fa-cc-paypal:before { - content: "\f1f4"; -} -.fa-cc-stripe:before { - content: "\f1f5"; -} -.fa-bell-slash:before { - content: "\f1f6"; -} -.fa-bell-slash-o:before { - content: "\f1f7"; -} -.fa-trash:before { - content: "\f1f8"; -} -.fa-copyright:before { - content: "\f1f9"; -} -.fa-at:before { - content: "\f1fa"; -} -.fa-eyedropper:before { - content: "\f1fb"; -} -.fa-paint-brush:before { - content: "\f1fc"; -} -.fa-birthday-cake:before { - content: "\f1fd"; -} -.fa-area-chart:before { - content: "\f1fe"; -} -.fa-pie-chart:before { - content: "\f200"; -} -.fa-line-chart:before { - content: "\f201"; -} -.fa-lastfm:before { - content: "\f202"; -} -.fa-lastfm-square:before { - content: "\f203"; -} -.fa-toggle-off:before { - content: "\f204"; -} -.fa-toggle-on:before { - content: "\f205"; -} -.fa-bicycle:before { - content: "\f206"; -} -.fa-bus:before { - content: "\f207"; -} -.fa-ioxhost:before { - content: "\f208"; -} -.fa-angellist:before { - content: "\f209"; -} -.fa-cc:before { - content: "\f20a"; -} -.fa-shekel:before, -.fa-sheqel:before, -.fa-ils:before { - content: "\f20b"; -} -.fa-meanpath:before { - content: "\f20c"; -} -.fa-buysellads:before { - content: "\f20d"; -} -.fa-connectdevelop:before { - content: "\f20e"; -} -.fa-dashcube:before { - content: "\f210"; -} -.fa-forumbee:before { - content: "\f211"; -} -.fa-leanpub:before { - content: "\f212"; -} -.fa-sellsy:before { - content: "\f213"; -} -.fa-shirtsinbulk:before { - content: "\f214"; -} -.fa-simplybuilt:before { - content: "\f215"; -} -.fa-skyatlas:before { - content: "\f216"; -} -.fa-cart-plus:before { - content: "\f217"; -} -.fa-cart-arrow-down:before { - content: "\f218"; -} -.fa-diamond:before { - content: "\f219"; -} -.fa-ship:before { - content: "\f21a"; -} -.fa-user-secret:before { - content: "\f21b"; -} -.fa-motorcycle:before { - content: "\f21c"; -} -.fa-street-view:before { - content: "\f21d"; -} -.fa-heartbeat:before { - content: "\f21e"; -} -.fa-venus:before { - content: "\f221"; -} -.fa-mars:before { - content: "\f222"; -} -.fa-mercury:before { - content: "\f223"; -} -.fa-intersex:before, -.fa-transgender:before { - content: "\f224"; -} -.fa-transgender-alt:before { - content: "\f225"; -} -.fa-venus-double:before { - content: "\f226"; -} -.fa-mars-double:before { - content: "\f227"; -} -.fa-venus-mars:before { - content: "\f228"; -} -.fa-mars-stroke:before { - content: "\f229"; -} -.fa-mars-stroke-v:before { - content: "\f22a"; -} -.fa-mars-stroke-h:before { - content: "\f22b"; -} -.fa-neuter:before { - content: "\f22c"; -} -.fa-genderless:before { - content: "\f22d"; -} -.fa-facebook-official:before { - content: "\f230"; -} -.fa-pinterest-p:before { - content: "\f231"; -} -.fa-whatsapp:before { - content: "\f232"; -} -.fa-server:before { - content: "\f233"; -} -.fa-user-plus:before { - content: "\f234"; -} -.fa-user-times:before { - content: "\f235"; -} -.fa-hotel:before, -.fa-bed:before { - content: "\f236"; -} -.fa-viacoin:before { - content: "\f237"; -} -.fa-train:before { - content: "\f238"; -} -.fa-subway:before { - content: "\f239"; -} -.fa-medium:before { - content: "\f23a"; -} -.fa-yc:before, -.fa-y-combinator:before { - content: "\f23b"; -} -.fa-optin-monster:before { - content: "\f23c"; -} -.fa-opencart:before { - content: "\f23d"; -} -.fa-expeditedssl:before { - content: "\f23e"; -} -.fa-battery-4:before, -.fa-battery:before, -.fa-battery-full:before { - content: "\f240"; -} -.fa-battery-3:before, -.fa-battery-three-quarters:before { - content: "\f241"; -} -.fa-battery-2:before, -.fa-battery-half:before { - content: "\f242"; -} -.fa-battery-1:before, -.fa-battery-quarter:before { - content: "\f243"; -} -.fa-battery-0:before, -.fa-battery-empty:before { - content: "\f244"; -} -.fa-mouse-pointer:before { - content: "\f245"; -} -.fa-i-cursor:before { - content: "\f246"; -} -.fa-object-group:before { - content: "\f247"; -} -.fa-object-ungroup:before { - content: "\f248"; -} -.fa-sticky-note:before { - content: "\f249"; -} -.fa-sticky-note-o:before { - content: "\f24a"; -} -.fa-cc-jcb:before { - content: "\f24b"; -} -.fa-cc-diners-club:before { - content: "\f24c"; -} -.fa-clone:before { - content: "\f24d"; -} -.fa-balance-scale:before { - content: "\f24e"; -} -.fa-hourglass-o:before { - content: "\f250"; -} -.fa-hourglass-1:before, -.fa-hourglass-start:before { - content: "\f251"; -} -.fa-hourglass-2:before, -.fa-hourglass-half:before { - content: "\f252"; -} -.fa-hourglass-3:before, -.fa-hourglass-end:before { - content: "\f253"; -} -.fa-hourglass:before { - content: "\f254"; -} -.fa-hand-grab-o:before, -.fa-hand-rock-o:before { - content: "\f255"; -} -.fa-hand-stop-o:before, -.fa-hand-paper-o:before { - content: "\f256"; -} -.fa-hand-scissors-o:before { - content: "\f257"; -} -.fa-hand-lizard-o:before { - content: "\f258"; -} -.fa-hand-spock-o:before { - content: "\f259"; -} -.fa-hand-pointer-o:before { - content: "\f25a"; -} -.fa-hand-peace-o:before { - content: "\f25b"; -} -.fa-trademark:before { - content: "\f25c"; -} -.fa-registered:before { - content: "\f25d"; -} -.fa-creative-commons:before { - content: "\f25e"; -} -.fa-gg:before { - content: "\f260"; -} -.fa-gg-circle:before { - content: "\f261"; -} -.fa-tripadvisor:before { - content: "\f262"; -} -.fa-odnoklassniki:before { - content: "\f263"; -} -.fa-odnoklassniki-square:before { - content: "\f264"; -} -.fa-get-pocket:before { - content: "\f265"; -} -.fa-wikipedia-w:before { - content: "\f266"; -} -.fa-safari:before { - content: "\f267"; -} -.fa-chrome:before { - content: "\f268"; -} -.fa-firefox:before { - content: "\f269"; -} -.fa-opera:before { - content: "\f26a"; -} -.fa-internet-explorer:before { - content: "\f26b"; -} -.fa-tv:before, -.fa-television:before { - content: "\f26c"; -} -.fa-contao:before { - content: "\f26d"; -} -.fa-500px:before { - content: "\f26e"; -} -.fa-amazon:before { - content: "\f270"; -} -.fa-calendar-plus-o:before { - content: "\f271"; -} -.fa-calendar-minus-o:before { - content: "\f272"; -} -.fa-calendar-times-o:before { - content: "\f273"; -} -.fa-calendar-check-o:before { - content: "\f274"; -} -.fa-industry:before { - content: "\f275"; -} -.fa-map-pin:before { - content: "\f276"; -} -.fa-map-signs:before { - content: "\f277"; -} -.fa-map-o:before { - content: "\f278"; -} -.fa-map:before { - content: "\f279"; -} -.fa-commenting:before { - content: "\f27a"; -} -.fa-commenting-o:before { - content: "\f27b"; -} -.fa-houzz:before { - content: "\f27c"; -} -.fa-vimeo:before { - content: "\f27d"; -} -.fa-black-tie:before { - content: "\f27e"; -} -.fa-fonticons:before { - content: "\f280"; -} -.fa-reddit-alien:before { - content: "\f281"; -} -.fa-edge:before { - content: "\f282"; -} -.fa-credit-card-alt:before { - content: "\f283"; -} -.fa-codiepie:before { - content: "\f284"; -} -.fa-modx:before { - content: "\f285"; -} -.fa-fort-awesome:before { - content: "\f286"; -} -.fa-usb:before { - content: "\f287"; -} -.fa-product-hunt:before { - content: "\f288"; -} -.fa-mixcloud:before { - content: "\f289"; -} -.fa-scribd:before { - content: "\f28a"; -} -.fa-pause-circle:before { - content: "\f28b"; -} -.fa-pause-circle-o:before { - content: "\f28c"; -} -.fa-stop-circle:before { - content: "\f28d"; -} -.fa-stop-circle-o:before { - content: "\f28e"; -} -.fa-shopping-bag:before { - content: "\f290"; -} -.fa-shopping-basket:before { - content: "\f291"; -} -.fa-hashtag:before { - content: "\f292"; -} -.fa-bluetooth:before { - content: "\f293"; -} -.fa-bluetooth-b:before { - content: "\f294"; -} -.fa-percent:before { - content: "\f295"; -} -.fa-gitlab:before { - content: "\f296"; -} -.fa-wpbeginner:before { - content: "\f297"; -} -.fa-wpforms:before { - content: "\f298"; -} -.fa-envira:before { - content: "\f299"; -} -.fa-universal-access:before { - content: "\f29a"; -} -.fa-wheelchair-alt:before { - content: "\f29b"; -} -.fa-question-circle-o:before { - content: "\f29c"; -} -.fa-blind:before { - content: "\f29d"; -} -.fa-audio-description:before { - content: "\f29e"; -} -.fa-volume-control-phone:before { - content: "\f2a0"; -} -.fa-braille:before { - content: "\f2a1"; -} -.fa-assistive-listening-systems:before { - content: "\f2a2"; -} -.fa-asl-interpreting:before, -.fa-american-sign-language-interpreting:before { - content: "\f2a3"; -} -.fa-deafness:before, -.fa-hard-of-hearing:before, -.fa-deaf:before { - content: "\f2a4"; -} -.fa-glide:before { - content: "\f2a5"; -} -.fa-glide-g:before { - content: "\f2a6"; -} -.fa-signing:before, -.fa-sign-language:before { - content: "\f2a7"; -} -.fa-low-vision:before { - content: "\f2a8"; -} -.fa-viadeo:before { - content: "\f2a9"; -} -.fa-viadeo-square:before { - content: "\f2aa"; -} -.fa-snapchat:before { - content: "\f2ab"; -} -.fa-snapchat-ghost:before { - content: "\f2ac"; -} -.fa-snapchat-square:before { - content: "\f2ad"; -} -.fa-pied-piper:before { - content: "\f2ae"; -} -.fa-first-order:before { - content: "\f2b0"; -} -.fa-yoast:before { - content: "\f2b1"; -} -.fa-themeisle:before { - content: "\f2b2"; -} -.fa-google-plus-circle:before, -.fa-google-plus-official:before { - content: "\f2b3"; -} -.fa-fa:before, -.fa-font-awesome:before { - content: "\f2b4"; -} -.fa-handshake-o:before { - content: "\f2b5"; -} -.fa-envelope-open:before { - content: "\f2b6"; -} -.fa-envelope-open-o:before { - content: "\f2b7"; -} -.fa-linode:before { - content: "\f2b8"; -} -.fa-address-book:before { - content: "\f2b9"; -} -.fa-address-book-o:before { - content: "\f2ba"; -} -.fa-vcard:before, -.fa-address-card:before { - content: "\f2bb"; -} -.fa-vcard-o:before, -.fa-address-card-o:before { - content: "\f2bc"; -} -.fa-user-circle:before { - content: "\f2bd"; -} -.fa-user-circle-o:before { - content: "\f2be"; -} -.fa-user-o:before { - content: "\f2c0"; -} -.fa-id-badge:before { - content: "\f2c1"; -} -.fa-drivers-license:before, -.fa-id-card:before { - content: "\f2c2"; -} -.fa-drivers-license-o:before, -.fa-id-card-o:before { - content: "\f2c3"; -} -.fa-quora:before { - content: "\f2c4"; -} -.fa-free-code-camp:before { - content: "\f2c5"; -} -.fa-telegram:before { - content: "\f2c6"; -} -.fa-thermometer-4:before, -.fa-thermometer:before, -.fa-thermometer-full:before { - content: "\f2c7"; -} -.fa-thermometer-3:before, -.fa-thermometer-three-quarters:before { - content: "\f2c8"; -} -.fa-thermometer-2:before, -.fa-thermometer-half:before { - content: "\f2c9"; -} -.fa-thermometer-1:before, -.fa-thermometer-quarter:before { - content: "\f2ca"; -} -.fa-thermometer-0:before, -.fa-thermometer-empty:before { - content: "\f2cb"; -} -.fa-shower:before { - content: "\f2cc"; -} -.fa-bathtub:before, -.fa-s15:before, -.fa-bath:before { - content: "\f2cd"; -} -.fa-podcast:before { - content: "\f2ce"; -} -.fa-window-maximize:before { - content: "\f2d0"; -} -.fa-window-minimize:before { - content: "\f2d1"; -} -.fa-window-restore:before { - content: "\f2d2"; -} -.fa-times-rectangle:before, -.fa-window-close:before { - content: "\f2d3"; -} -.fa-times-rectangle-o:before, -.fa-window-close-o:before { - content: "\f2d4"; -} -.fa-bandcamp:before { - content: "\f2d5"; -} -.fa-grav:before { - content: "\f2d6"; -} -.fa-etsy:before { - content: "\f2d7"; -} -.fa-imdb:before { - content: "\f2d8"; -} -.fa-ravelry:before { - content: "\f2d9"; -} -.fa-eercast:before { - content: "\f2da"; -} -.fa-microchip:before { - content: "\f2db"; -} -.fa-snowflake-o:before { - content: "\f2dc"; -} -.fa-superpowers:before { - content: "\f2dd"; -} -.fa-wpexplorer:before { - content: "\f2de"; -} -.fa-meetup:before { - content: "\f2e0"; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} -.sr-only-focusable:active, -.sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; -} diff --git a/src/site/resources/font-awesome-4.7.0/css/font-awesome.min.css b/src/site/resources/font-awesome-4.7.0/css/font-awesome.min.css deleted file mode 100644 index 75821343ebf..00000000000 --- a/src/site/resources/font-awesome-4.7.0/css/font-awesome.min.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2') format('woff2'),url('../fonts/fontawesome-webfont.woff') format('woff'),url('../fonts/fontawesome-webfont.ttf') format('truetype'),url('../fonts/fontawesome-webfont.svg?#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/src/site/resources/font-awesome-4.7.0/fonts/FontAwesome.otf b/src/site/resources/font-awesome-4.7.0/fonts/FontAwesome.otf deleted file mode 100644 index 401ec0f36e4..00000000000 Binary files a/src/site/resources/font-awesome-4.7.0/fonts/FontAwesome.otf and /dev/null differ diff --git a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.eot b/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.eot deleted file mode 100644 index e9f60ca953f..00000000000 Binary files a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.svg b/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.svg deleted file mode 100644 index 855c845e538..00000000000 --- a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,2671 +0,0 @@ - - - - -Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 - By ,,, -Copyright Dave Gandy 2016. All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf b/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 35acda2fa11..00000000000 Binary files a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff b/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff deleted file mode 100644 index 400014a4b06..00000000000 Binary files a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 b/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 deleted file mode 100644 index 4d13fc60404..00000000000 Binary files a/src/site/resources/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-OFL.txt b/src/site/resources/fonts/noto-OFL.txt deleted file mode 100644 index 0373e14e137..00000000000 --- a/src/site/resources/fonts/noto-OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -https://openfontlicense.org - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/src/site/resources/fonts/noto-serif-v23-latin-100.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-100.woff2 deleted file mode 100644 index 9c1d44b8b15..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-100.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-100italic.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-100italic.woff2 deleted file mode 100644 index 20cd0bf98c8..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-100italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-200.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-200.woff2 deleted file mode 100644 index 5bc0e7a4da7..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-200.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-200italic.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-200italic.woff2 deleted file mode 100644 index bca887e410a..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-200italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-300.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-300.woff2 deleted file mode 100644 index fb3e036a7b8..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-300.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-300italic.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-300italic.woff2 deleted file mode 100644 index 2ef975d1458..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-300italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-500.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-500.woff2 deleted file mode 100644 index 4c08c8cbfea..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-500.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-500italic.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-500italic.woff2 deleted file mode 100644 index 65b43137aa6..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-500italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-600.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-600.woff2 deleted file mode 100644 index ca4f3708bb8..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-600.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-600italic.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-600italic.woff2 deleted file mode 100644 index 9eaba295eae..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-600italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-700.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-700.woff2 deleted file mode 100644 index bedb0e6a965..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-700.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-700italic.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-700italic.woff2 deleted file mode 100644 index 55bc121a7a4..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-700italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-800.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-800.woff2 deleted file mode 100644 index 3f1f0703c2b..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-800.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-800italic.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-800italic.woff2 deleted file mode 100644 index ce36621f3ca..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-800italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-900.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-900.woff2 deleted file mode 100644 index 8f87ffd8a0d..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-900.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-900italic.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-900italic.woff2 deleted file mode 100644 index e5686d60527..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-900italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-italic.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-italic.woff2 deleted file mode 100644 index dab23675b9d..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin-regular.woff2 b/src/site/resources/fonts/noto-serif-v23-latin-regular.woff2 deleted file mode 100644 index 1907e2c7fa9..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin-regular.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/noto-serif-v23-latin.zip b/src/site/resources/fonts/noto-serif-v23-latin.zip deleted file mode 100644 index dd69a4a5f22..00000000000 Binary files a/src/site/resources/fonts/noto-serif-v23-latin.zip and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-OFL.txt b/src/site/resources/fonts/open-sans-OFL.txt deleted file mode 100644 index cb7002a864a..00000000000 --- a/src/site/resources/fonts/open-sans-OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2020 The Open Sans Project Authors (https://github.com/googlefonts/opensans) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -https://openfontlicense.org - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/src/site/resources/fonts/open-sans-v40-latin-300.woff2 b/src/site/resources/fonts/open-sans-v40-latin-300.woff2 deleted file mode 100644 index e000fcb88e5..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-300.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-300italic.woff2 b/src/site/resources/fonts/open-sans-v40-latin-300italic.woff2 deleted file mode 100644 index 5167821bce5..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-300italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-500.woff2 b/src/site/resources/fonts/open-sans-v40-latin-500.woff2 deleted file mode 100644 index a35be30df89..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-500.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-500italic.woff2 b/src/site/resources/fonts/open-sans-v40-latin-500italic.woff2 deleted file mode 100644 index 039e72f3c42..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-500italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-600.woff2 b/src/site/resources/fonts/open-sans-v40-latin-600.woff2 deleted file mode 100644 index f67ef002a62..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-600.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-600italic.woff2 b/src/site/resources/fonts/open-sans-v40-latin-600italic.woff2 deleted file mode 100644 index bd6a4d19d2c..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-600italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-700.woff2 b/src/site/resources/fonts/open-sans-v40-latin-700.woff2 deleted file mode 100644 index 7e3b8b0da79..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-700.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-700italic.woff2 b/src/site/resources/fonts/open-sans-v40-latin-700italic.woff2 deleted file mode 100644 index 2c96334c4cd..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-700italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-800.woff2 b/src/site/resources/fonts/open-sans-v40-latin-800.woff2 deleted file mode 100644 index cf651145951..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-800.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-800italic.woff2 b/src/site/resources/fonts/open-sans-v40-latin-800italic.woff2 deleted file mode 100644 index 17bc073467b..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-800italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-italic.woff2 b/src/site/resources/fonts/open-sans-v40-latin-italic.woff2 deleted file mode 100644 index 84ee1979dcb..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-italic.woff2 and /dev/null differ diff --git a/src/site/resources/fonts/open-sans-v40-latin-regular.woff2 b/src/site/resources/fonts/open-sans-v40-latin-regular.woff2 deleted file mode 100644 index eaae94217be..00000000000 Binary files a/src/site/resources/fonts/open-sans-v40-latin-regular.woff2 and /dev/null differ diff --git a/src/site/resources/images/AsyncWithLocationThrpt1T.png b/src/site/resources/images/AsyncWithLocationThrpt1T.png deleted file mode 100644 index 06853853831..00000000000 Binary files a/src/site/resources/images/AsyncWithLocationThrpt1T.png and /dev/null differ diff --git a/src/site/resources/images/ResponseTimeAsyncLogging1Thread@128k.png b/src/site/resources/images/ResponseTimeAsyncLogging1Thread@128k.png deleted file mode 100644 index e1170d4f8e4..00000000000 Binary files a/src/site/resources/images/ResponseTimeAsyncLogging1Thread@128k.png and /dev/null differ diff --git a/src/site/resources/images/kibana.png b/src/site/resources/images/kibana.png deleted file mode 100644 index 3b1569365b0..00000000000 Binary files a/src/site/resources/images/kibana.png and /dev/null differ diff --git a/src/site/resources/images/log4j-logo.png b/src/site/resources/images/log4j-logo.png deleted file mode 100644 index b6d34ceca3f..00000000000 Binary files a/src/site/resources/images/log4j-logo.png and /dev/null differ diff --git a/src/site/resources/images/logo.jpg b/src/site/resources/images/logo.jpg deleted file mode 100644 index ca9b019aada..00000000000 Binary files a/src/site/resources/images/logo.jpg and /dev/null differ diff --git a/src/site/resources/images/logo.png b/src/site/resources/images/logo.png deleted file mode 100644 index d84126b86bb..00000000000 Binary files a/src/site/resources/images/logo.png and /dev/null differ diff --git a/src/site/resources/images/ls-logo.jpg b/src/site/resources/images/ls-logo.jpg deleted file mode 100755 index 35f2f4738b2..00000000000 Binary files a/src/site/resources/images/ls-logo.jpg and /dev/null differ diff --git a/src/template/asciidoctor/document.html.erb b/src/template/asciidoctor/document.html.erb deleted file mode 100644 index 3f0e34d84d4..00000000000 --- a/src/template/asciidoctor/document.html.erb +++ /dev/null @@ -1,233 +0,0 @@ -<%# - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -%> -<%# - Code is based on an example found in this repository: - https://github.com/asciidoctor/asciidoctor-backends/blob/master/erb/html5/document.html.erb -%> - - - - - - - <% - [:description, :keywords, :author, :copyright].each do |key| - if attr? key %> - <% - end - end - %> - <%= doctitle(:sanitize => true) || (attr 'untitled-label') %> - - - - <%= Asciidoctor::Stylesheets.instance.embed_primary_stylesheet %> - - - - <%= syntax_highlighter&.docinfo :head, self, {} %> - <%= (docinfo_content = docinfo).empty? ? nil : %(#{docinfo_content}) %> - - - - - - -
- <% - if (attr? :toc) && (attr? 'toc-placement', 'auto') %> -
- -
<%= attr 'toc-title' %>
- <%= converter.convert self, 'outline' %> -
<% - end - %> - -
-

<%= doctitle %>

- <%= content %> -
<% - unless !footnotes? || attr?(:nofootnotes) %> -
-
<% - footnotes.each do |fn| %> -
- <%= fn.index %>. <%= fn.text %> -
<% - end %> -
<% - end %> -
-<% unless nofooter %> - <% - end %> - - - - - - \ No newline at end of file