(logging-log4j2) branch doc/2.x/layouts deleted (was 9caa533dff)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git was 9caa533dff Cosmetic changes The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(logging-log4j2) branch doc/2.x/layouts updated (8950932be4 -> 9caa533dff)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 8950932be4 Add section on style expressions add 9caa533dff Cosmetic changes No new revisions were added by this update. Summary of changes: .../modules/ROOT/pages/manual/pattern-layout.adoc | 53 ++ 1 file changed, 15 insertions(+), 38 deletions(-)
(logging-log4j2) branch doc/2.x/layouts updated (c5f012682d -> 0cf6c346e7)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from c5f012682d Fix garbage-free notes about lookups for PL and JTL add 0cf6c346e7 Add plugin ref links No new revisions were added by this update. Summary of changes: .../ROOT/pages/manual/json-template-layout.adoc| 4 +- .../antora/modules/ROOT/pages/manual/layouts.adoc | 68 -- .../modules/ROOT/pages/manual/pattern-layout.adoc | 4 +- 3 files changed, 57 insertions(+), 19 deletions(-)
(logging-log4j2) branch doc/2.x/layouts updated (f77b5c0fce -> c5f012682d)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from f77b5c0fce Fix Pattern Layout gc-free lookups docs add c5f012682d Fix garbage-free notes about lookups for PL and JTL No new revisions were added by this update. Summary of changes: .../antora/modules/ROOT/pages/manual/json-template-layout.adoc | 9 - src/site/antora/modules/ROOT/pages/manual/pattern-layout.adoc| 6 ++ .../modules/ROOT/partials/manual/layouts-gcfree-lookup.adoc | 5 - 3 files changed, 14 insertions(+), 6 deletions(-) copy CODE_OF_CONDUCT.adoc => src/site/antora/modules/ROOT/partials/manual/layouts-gcfree-lookup.adoc (61%)
(logging-log4j2) branch doc/2.x/layouts updated (76f77b59ed -> f77b5c0fce)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 76f77b59ed Remove incorrectly documented `%m{lookups}` add f77b5c0fce Fix Pattern Layout gc-free lookups docs No new revisions were added by this update. Summary of changes: src/site/antora/modules/ROOT/pages/manual/pattern-layout.adoc | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)
(logging-log4j2) branch doc/2.x/layouts updated (b95d668f7e -> 76f77b59ed)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from b95d668f7e Explain `PatternLayout` documentation notation add 76f77b59ed Remove incorrectly documented `%m{lookups}` No new revisions were added by this update. Summary of changes: src/site/antora/modules/ROOT/pages/manual/pattern-layout.adoc | 11 --- 1 file changed, 11 deletions(-)
(logging-log4j2) branch doc/2.x/layouts updated (78330f010f -> b95d668f7e)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 78330f010f Apply suggestions from code review add 74a6ae462b Improve wording on UTF-8 default add d6517540e4 Merge remote-tracking branch 'origin/doc/2.x/layouts' into doc/2.x/layouts add b95d668f7e Explain `PatternLayout` documentation notation No new revisions were added by this update. Summary of changes: src/site/antora/modules/ROOT/pages/manual/layouts.adoc | 4 ++-- .../modules/ROOT/pages/manual/pattern-layout.adoc | 18 +- 2 files changed, 19 insertions(+), 3 deletions(-)
(logging-log4j2) branch doc/2.x/layouts updated (f67176a39a -> 78330f010f)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from f67176a39a Improve wording add 78330f010f Apply suggestions from code review No new revisions were added by this update. Summary of changes: .../antora/modules/ROOT/pages/manual/json-template-layout.adoc | 4 ++-- src/site/antora/modules/ROOT/pages/manual/layouts.adoc | 4 +++- src/site/antora/modules/ROOT/pages/manual/pattern-layout.adoc | 10 -- 3 files changed, 13 insertions(+), 5 deletions(-)
(logging-log4j2) branch doc/2.x/layouts updated (631dbe483b -> f67176a39a)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 631dbe483b Small adjustments add f67176a39a Improve wording No new revisions were added by this update. Summary of changes: src/site/antora/modules/ROOT/pages/manual/layouts.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(logging-log4j2) branch 2.x updated: Rework messages page
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 6812a07425 Rework messages page 6812a07425 is described below commit 6812a07425f0a4091a215e571de8f40a789e63cf Author: Volkan Yazıcı AuthorDate: Mon Jun 10 20:05:36 2024 +0200 Rework messages page --- ...tableExample.java => CustomMessageExample.java} | 11 +- src/site/antora/modules/ROOT/pages/manual/api.adoc | 2 + .../antora/modules/ROOT/pages/manual/messages.adoc | 292 ++--- .../modules/ROOT/partials/manual/log-event.adoc| 61 + 4 files changed, 204 insertions(+), 162 deletions(-) diff --git a/src/site/antora/modules/ROOT/examples/manual/messages/StringBuilderFormattableExample.java b/src/site/antora/modules/ROOT/examples/manual/messages/CustomMessageExample.java similarity index 93% rename from src/site/antora/modules/ROOT/examples/manual/messages/StringBuilderFormattableExample.java rename to src/site/antora/modules/ROOT/examples/manual/messages/CustomMessageExample.java index da83ada7f2..1668481ec5 100644 --- a/src/site/antora/modules/ROOT/examples/manual/messages/StringBuilderFormattableExample.java +++ b/src/site/antora/modules/ROOT/examples/manual/messages/CustomMessageExample.java @@ -22,22 +22,20 @@ import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.Message; import org.apache.logging.log4j.util.StringBuilderFormattable; -public class StringBuilderFormattableExample { +public class CustomMessageExample { + private static final Logger LOGGER = LogManager.getLogger(); public static void main(String[] args) { InetSocketAddress socketAddress = InetSocketAddress.createUnresolved("192.0.2.17", 1234); LoginFailureEvent event = new LoginFailureEvent("root", socketAddress); -failedLogin(event); -} - -private static void failedLogin(LoginFailureEvent event) { LOGGER.info(event); } // tag::loginFailure[] record LoginFailureEvent(String userName, InetSocketAddress remoteAddress) implements Message, StringBuilderFormattable { // <1> + @Override public void formatTo(StringBuilder buffer) { // <2> buffer.append("Connection closed by authenticating user ") @@ -55,8 +53,8 @@ public class StringBuilderFormattableExample { formatTo(buffer); return buffer.toString(); } -// Other methods // end::loginFailure[] + @Override public String getFormat() { return ""; @@ -72,6 +70,7 @@ public class StringBuilderFormattableExample { return null; } // tag::loginFailure[] + } // end::loginFailure[] } diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc index fb20768ee7..1d7116a331 100644 --- a/src/site/antora/modules/ROOT/pages/manual/api.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc @@ -50,6 +50,8 @@ Check out {logging-services-url}/log4j/kotlin[Log4j Kotlin] and {logging-service include::partial$manual/api-intro.adoc[leveloffset=+1] +include::partial$manual/log-event.adoc[] + [#best-practice] == Best practices diff --git a/src/site/antora/modules/ROOT/pages/manual/messages.adoc b/src/site/antora/modules/ROOT/pages/manual/messages.adoc index 7327330755..8928438ab2 100644 --- a/src/site/antora/modules/ROOT/pages/manual/messages.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/messages.adoc @@ -14,59 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. -= Messages - -Unlike other logging APIs, which either restrict the description of log events to (possibly interpolated) Java -https://docs.oracle.com/javase/{java-target-version}/docs/api/java/lang/String.html[`String`]s -or allow generic Java -https://docs.oracle.com/javase/{java-target-version}/docs/api/java/lang/Object.html[`Object`]s, -the Log4j API encapsulates every log message into the logging-specific -link:../javadoc/log4j-api/org/apache/logging/log4j/message/Message.html[`Message`] -interface, before passing it to the logging backend. Such an approach opens to developers a wide range of customization possibilities. - -[#anatomy-log-event] -== Anatomy of a logging event - -Logging events are complex objects that contain many fields that can be classified into three categories: - -. Some fields are provided explicitly, in a -link:../javadoc/log4j-api/org/apache/logging/log4j/Logger.html[`Logger`] -method call. -The most important are the log level and the **log message**, which is a description of what happened addressed to humans. -Log4j API provides a rich set of methods to specify
(logging-log4j2) 02/06: Revamp JTL page
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 439d20641fdfb733c435117ee1175e8c61c1b7b9 Author: Volkan Yazıcı AuthorDate: Sun Jun 2 22:23:01 2024 +0200 Revamp JTL page --- .../antora/modules/ROOT/pages/manual/json-template-layout.adoc| 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc b/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc index 97096be97b..3327645cb9 100644 --- a/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/json-template-layout.adoc @@ -364,12 +364,12 @@ Suffix to append to strings truncated due to exceeding xref:#plugin-attr-maxStri Name of the xref:#recycling-strategy[] employed -[#layout-elements] +[#plugin-elements] === Plugin elements JSON Template Layout plugin configuration accepts the following elements: -[#layout-element-EventTemplateAdditionalField] +[#plugin-element-EventTemplateAdditionalField] [[additional-event-template-fields]] `EventTemplateAdditionalField` Additional event template fields are convenient shortcuts to add custom fields to a template or override existing ones. @@ -442,7 +442,7 @@ Templates are configured by means of the following JSON Template Layout plugin a - xref:#plugin-attr-eventTemplate[] and xref:#plugin-attr-eventTemplateUri[] (for encoding ``LogEvent``s) - xref:#plugin-attr-stackTraceElementTemplate[] and xref:#plugin-attr-stackTraceElementTemplateUri[] (for encoding ``StackStraceElement``s) -- xref:#layout-element-EventTemplateAdditionalField[] (for extending the event template) +- xref:#plugin-element-EventTemplateAdditionalField[] (for extending the event template) [#event-templates] === Event templates @@ -1854,7 +1854,7 @@ It is a fairly rich resource for inspiration while implementing new resolvers. === Intercepting the template resolver compiler JSON Template Layout allows interception of the template resolver compilation, which is the process converting a template into a Java function performing the JSON encoding. -This interception mechanism is internally used to implement xref:#plugin-attr-eventTemplateRootObjectKey[] and xref:#layout-element-EventTemplateAdditionalField[] features. +This interception mechanism is internally used to implement xref:#plugin-attr-eventTemplateRootObjectKey[] and xref:#plugin-element-EventTemplateAdditionalField[] features. In a nutshell, one needs to create a `@Plugin`-annotated class extending from the `EventResolverInterceptor` interface. To see the interception in action, check out the `EventRootObjectKeyInterceptor` class which is responsible for implementing the `eventTemplateRootObjectKey` feature:
(logging-log4j2) branch doc/2.x/layouts created (now 631dbe483b)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git at 631dbe483b Small adjustments This branch includes the following new commits: new ee07dc3463 Revamp JTL page new 439d20641f Revamp JTL page new 454c42177a Move Pattern Layout to a separate page new f3879ab0c7 Rewrite layouts in `layouts.adoc` new 3150d81a25 Merge remote-tracking branch 'origin/2.x' into doc/2.x/layouts new 631dbe483b Small adjustments The 6 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(logging-log4j2) 06/06: Small adjustments
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 631dbe483b2de8a9b5ccdf949c6dfc2919863ead Author: Volkan Yazıcı AuthorDate: Thu Jun 6 13:55:27 2024 +0200 Small adjustments --- .../modules/ROOT/pages/manual/appenders.adoc | 2 +- .../modules/ROOT/pages/manual/extending.adoc | 39 -- .../modules/ROOT/pages/manual/getting-started.adoc | 2 +- .../antora/modules/ROOT/pages/manual/layouts.adoc | 15 +++-- .../antora/modules/ROOT/pages/manual/plugins.adoc | 9 - src/site/resources/.htaccess | 2 ++ 6 files changed, 16 insertions(+), 53 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc index 1811478a78..aad5a661a3 100644 --- a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc @@ -237,7 +237,7 @@ maximum capacity. The CassandraAppender writes its output to an https://cassandra.apache.org/[Apache Cassandra] database. A keyspace and table must be configured ahead of time, and the columns of that table are mapped in a configuration file. -Each column can specify either a https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout[StringLayout] (e.g., a PatternLayout) along with an optional conversion type, or only a conversion type for `org.apache.logging.log4j.spi.ThreadContextMap` or +Each column can specify either a xref:manual/pattern-layout.adoc[]https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout[StringLayout] (e.g., a PatternLayout) along with an optional conversion type, or only a conversion type for `org.apache.logging.log4j.spi.ThreadContextMap` or `org.apache.logging.log4j.spi.ThreadContextStack` to store the MDC or NDC in a map or list column respectively. A conversion type compatible with `java.util.Date` will use the log event timestamp converted to that type (e.g., use `java.util.Date` to fill a `timestamp` column type in Cassandra). diff --git a/src/site/antora/modules/ROOT/pages/manual/extending.adoc b/src/site/antora/modules/ROOT/pages/manual/extending.adoc index f36ad67531..b8d6395681 100644 --- a/src/site/antora/modules/ROOT/pages/manual/extending.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/extending.adoc @@ -378,45 +378,6 @@ public final class StubAppender extends AbstractOutputStreamAppender -<1> xref:manual/layouts.adoc#pattern-layout[Pattern Layout] is used for encoding the log event in a human-readable way. +<1> xref:manual/pattern-layout.adoc[] is used for encoding the log event in a human-readable way. <2> Increased logging verbosity for the `com.mycompany` package. [#next] diff --git a/src/site/antora/modules/ROOT/pages/manual/layouts.adoc b/src/site/antora/modules/ROOT/pages/manual/layouts.adoc index 5dffde3add..25d1139b02 100644 --- a/src/site/antora/modules/ROOT/pages/manual/layouts.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/layouts.adoc @@ -210,9 +210,10 @@ GELF Layout encodes log events in https://go2docs.graylog.org/current/getting_in It can compress the output when it exceeds a certain threshold. This layout does not implement chunking. -[TIP] +[WARNING] -Unless compression is needed, we advise you to use xref:manual/json-template-layout.adoc[JSON Template Layout] instead, which provides GELF layout support out of the box and offers a far richer set of features. +*This layout is planned to be removed in the next major release!* +Unless compression is needed, we advise you to use xref:manual/json-template-layout.adoc[JSON Template Layout] instead, which provides GELF Layout support out of the box and offers more capabilities and performance. GELF Layout is configured with the following parameters: @@ -861,6 +862,12 @@ It defaults to `LOCAL0`. XML Layout encodes a log event into XML. +[WARNING] + +*This layout is planned to be removed in the next major release!* +XML Layout users are strongly advised to migrate to another layout! + + .Click for an example output [%collapsible] @@ -950,8 +957,10 @@ runtimeOnly 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:{jackson-ve YAML Layout encodes a log event into YAML. -[IMPORTANT] +[WARNING] +This layout is planned to be removed in the next major release! + YAML is a superset of JSON. *We strongly advise existing YAML Layout users to migrate to xref:#JSONTemplateLayout[]* providing more capabilities and efficiency. diff --git a/src/site/antora/modules/ROOT/pages/manual/plugins.adoc b/src/site/antora/modules/ROOT/pages/manual/plugins.adoc index 5d9a613673..c793d404c4 100644 --- a/src/site/antora/modules/ROOT/pages/manual/plugins.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/plugins.ad
(logging-log4j2) 01/06: Revamp JTL page
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit ee07dc34633b9f64e3e816222974b8c489d527cd Author: Volkan Yazıcı AuthorDate: Sun Jun 2 21:10:08 2024 +0200 Revamp JTL page --- .../modules/ROOT/examples/hibernate/log4j2.json|8 +- .../eventTemplateAdditionalField/log4j2.json | 41 + .../eventTemplateAdditionalField/log4j2.properties | 38 + .../eventTemplateAdditionalField/log4j2.xml| 52 + .../eventTemplateAdditionalField/log4j2.yaml | 41 + .../manual/json-template-layout/usage/log4j2.json | 20 + .../json-template-layout/usage/log4j2.properties | 23 + .../manual/json-template-layout/usage/log4j2.xml | 36 + .../manual/json-template-layout/usage/log4j2.yaml | 29 + .../ROOT/pages/manual/json-template-layout.adoc| 1371 ++-- .../antora/modules/ROOT/pages/manual/layouts.adoc | 132 +- 11 files changed, 1045 insertions(+), 746 deletions(-) diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json index 593aa3c048..4859561c8c 100644 --- a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json @@ -36,10 +36,10 @@ ], "Root": { -"level": "WARN" - }, - "AppenderRef": { -"ref": "CONSOLE" +"level": "WARN", +"AppenderRef": { + "ref": "CONSOLE" +} } } } diff --git a/src/site/antora/modules/ROOT/examples/manual/json-template-layout/eventTemplateAdditionalField/log4j2.json b/src/site/antora/modules/ROOT/examples/manual/json-template-layout/eventTemplateAdditionalField/log4j2.json new file mode 100644 index 00..b900cdf8dc --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/manual/json-template-layout/eventTemplateAdditionalField/log4j2.json @@ -0,0 +1,41 @@ +{ + "Configuration": { +"Appenders": { + "Console": { +"name": "CONSOLE", +"JsonTemplateLayout": { + "eventTemplateUri": "classpath:GelfLayout.json", + "eventTemplateAdditionalField": [ +{ + "key": "aString", + "value": "foo" //<1> +}, +{ + "key": "marker", + "value": "{\"$resolver\": \"marker\", \"field\": \"name\"}", + "format": "JSON" +}, +{ + "key": "aNumber", + "value": "1", + "format": "JSON" +}, +{ + "key": "aList", + "value": "[1, 2, \"three\"]", + "format": "JSON" +} + ] +} + } +}, +"Loggers": { + "Root": { +"level": "WARN", +"AppenderRef": { + "ref": "CONSOLE" +} + } +} + } +} diff --git a/src/site/antora/modules/ROOT/examples/manual/json-template-layout/eventTemplateAdditionalField/log4j2.properties b/src/site/antora/modules/ROOT/examples/manual/json-template-layout/eventTemplateAdditionalField/log4j2.properties new file mode 100644 index 00..ec1c15aea0 --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/manual/json-template-layout/eventTemplateAdditionalField/log4j2.properties @@ -0,0 +1,38 @@ +# +# 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. +# +appender.0.type = Console +appender.0.name = CONSOLE +appender.0.layout.type = JsonTemplateLayout +appender.0.layout.eventTemplateUri = classpath:
(logging-log4j2) 05/06: Merge remote-tracking branch 'origin/2.x' into doc/2.x/layouts
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 3150d81a25a863f7f5067cdba17a6f4f94785c93 Merge: f3879ab0c7 7864477034 Author: Volkan Yazıcı AuthorDate: Thu Jun 6 13:41:49 2024 +0200 Merge remote-tracking branch 'origin/2.x' into doc/2.x/layouts .github/workflows/build.yaml | 15 - .github/workflows/deploy-site.yaml | 3 +++ .github/workflows/merge-dependabot.yaml| 7 +++--- .gitignore | 1 + .mvn/develocity.xml| 25 ++ .mvn/extensions.xml| 13 +++ log4j-parent/pom.xml | 4 ++-- .../.2.x.x/update_com_google_guava_guava.xml | 4 ++-- .../.2.x.x/update_org_jctools_jctools_core.xml | 4 ++-- 9 files changed, 56 insertions(+), 20 deletions(-)
(logging-log4j2) 04/06: Rewrite layouts in `layouts.adoc`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/layouts in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit f3879ab0c75464069feea98f88fe314725e0ca2a Author: Volkan Yazıcı AuthorDate: Thu Jun 6 13:41:34 2024 +0200 Rewrite layouts in `layouts.adoc` --- .../ROOT/examples/manual/gelf-layout/log4j2.json | 68 ++ .../examples/manual/gelf-layout/log4j2.properties | 53 ++ .../ROOT/examples/manual/gelf-layout/log4j2.xml| 53 ++ .../ROOT/examples/manual/gelf-layout/log4j2.yaml | 61 ++ .../ROOT/pages/manual/json-template-layout.adoc| 21 +- .../antora/modules/ROOT/pages/manual/layouts.adoc | 924 - .../modules/ROOT/pages/manual/pattern-layout.adoc | 20 +- .../partials/manual/dependencies-log4j-csv.adoc| 38 - .../manual/dependencies-log4j-layout-json.adoc | 38 - .../dependencies-log4j-layout-template-json.adoc | 38 - .../manual/dependencies-log4j-layout-xml.adoc | 38 - .../manual/dependencies-log4j-layout-yaml.adoc | 38 - .../manual/layouts-location-information.adoc | 2 +- ...ension-intro.adoc => plugin-preliminaries.adoc} | 20 +- 14 files changed, 823 insertions(+), 589 deletions(-) diff --git a/src/site/antora/modules/ROOT/examples/manual/gelf-layout/log4j2.json b/src/site/antora/modules/ROOT/examples/manual/gelf-layout/log4j2.json new file mode 100644 index 00..06f037f77a --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/manual/gelf-layout/log4j2.json @@ -0,0 +1,68 @@ +{ + "Configuration": { +"Appenders": { + + "Console": { +"name": "CONSOLE", +"GelfLayout": { //<1> + "messagePattern": "%d %5p [%t] %c{1} %X{loginId, requestId} - %m%n", + "includeThreadContext": "true", + "threadContextIncludes": "loginId,requestId", + "KeyValuePair": [ +{ + "key": "additionalField1", + "value": "constant value" +}, +{ + "key": "additionalField2", + "value": "$${ctx:key}" +} + ] +} + }, + + "SocketTcp": { //<2> +"type": "Socket", +"name": "GRAYLOG_TCP", +"protocol": "TCP", +"host": "graylog.domain.com", +"port": 12201, +"GelfLayout": { + "host": "someserver", + "compressionType": "OFF", + "includeNullDelimiter": "true" +} + }, + + "SocketUdp": { //<3> +"type": "Socket", +"name": "GRAYLOG_UDP", +"protocol": "UDP", +"host": "graylog.domain.com", +"port": 12201, +"GelfLayout": { + "host": "someserver", + "compressionType": "ZLIB", + "compressionThreshold": 1024 +} + } + +}, +"Loggers": { + "Root": { +"level": "WARN", +"AppenderRef": [ + { +"ref": "CONSOLE" + }, + { +"ref": "GRAYLOG_TCP" + }, + { +"ref": "GRAYLOG_UDP" + } +] + } +} + } +} diff --git a/src/site/antora/modules/ROOT/examples/manual/gelf-layout/log4j2.properties b/src/site/antora/modules/ROOT/examples/manual/gelf-layout/log4j2.properties new file mode 100644 index 00..42ea05fd01 --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/manual/gelf-layout/log4j2.properties @@ -0,0 +1,53 @@ +# +# 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. +# +appender.0.type = C
(logging-log4j2) branch 2.x updated: Improve FAQ section title
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 3ff55882b9 Improve FAQ section title 3ff55882b9 is described below commit 3ff55882b9603c6bc9687cfc0d53e43fe44c0461 Author: Volkan Yazıcı AuthorDate: Fri May 31 09:03:45 2024 +0200 Improve FAQ section title --- src/site/antora/modules/ROOT/pages/faq.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/antora/modules/ROOT/pages/faq.adoc b/src/site/antora/modules/ROOT/pages/faq.adoc index c7df6c65dd..8499c57a4d 100644 --- a/src/site/antora/modules/ROOT/pages/faq.adoc +++ b/src/site/antora/modules/ROOT/pages/faq.adoc @@ -117,7 +117,7 @@ You can set the logging level on the `AppenderRef` element. [#troubleshooting] -== How do I debug my configuration? +== How do I troubleshoot my setup? . Make sure you have xref:manual/installation.adoc[the right JAR files] on your classpath.
(logging-log4j2) branch main updated: Fix handling of `Message#getFormat()` in `MessageResolver`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/main by this push: new f81f1fd982 Fix handling of `Message#getFormat()` in `MessageResolver` f81f1fd982 is described below commit f81f1fd982e9eda13569c5c6b6f915d75b641a76 Author: Volkan Yazıcı AuthorDate: Thu May 30 16:03:24 2024 +0200 Fix handling of `Message#getFormat()` in `MessageResolver` --- .../json/resolver/MessageResolverTest.java | 48 +- .../template/json/resolver/MessageResolver.java| 25 +-- 2 files changed, 69 insertions(+), 4 deletions(-) diff --git a/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/resolver/MessageResolverTest.java b/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/resolver/MessageResolverTest.java index 1ac9497e05..db15ab228f 100644 --- a/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/resolver/MessageResolverTest.java +++ b/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/resolver/MessageResolverTest.java @@ -133,7 +133,7 @@ class MessageResolverTest { } @Test -void test_MapMessage_serialization() { +void test_MapMessage() { // Create the event template. final String eventTemplate = writeJson(asMap("message", asMap("$resolver", "message"))); @@ -162,4 +162,50 @@ class MessageResolverTest { .isEqualTo("val3.1"); }); } + +@Test +void test_custom_Message() { + +// Create the event template +final String eventTemplate = writeJson(asMap("$resolver", "message")); + +// Create the layout +final JsonTemplateLayout layout = JsonTemplateLayout.newBuilder() +.setConfiguration(CONFIGURATION) +.setEventTemplate(eventTemplate) +.build(); + +// Create the log event with a `TestMessage` +final LogEvent logEvent = Log4jLogEvent.newBuilder() +.setMessage(new TestMessage()) +.setTimeMillis(System.currentTimeMillis()) +.build(); + +// Check the serialized event +usingSerializedLogEventAccessor(layout, logEvent, accessor -> assertThat(accessor.getString("foo")) +.isEqualTo("bar")); +} + +private static final class TestMessage implements Message { + +@Override +public String getFormattedMessage() { +return "{\"foo\": \"bar\"}"; +} + +@Override +public String getFormat() { +return "JSON"; +} + +@Override +public Object[] getParameters() { +return new Object[0]; +} + +@Override +public Throwable getThrowable() { +return null; +} +} } diff --git a/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/MessageResolver.java b/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/MessageResolver.java index 143cfe4183..a9d8618c5d 100644 --- a/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/MessageResolver.java +++ b/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/MessageResolver.java @@ -137,17 +137,22 @@ public final class MessageResolver implements EventResolver { private static EventResolver createObjectResolver(final String fallbackKey) { return (final LogEvent logEvent, final JsonWriter jsonWriter) -> { -// Skip custom serializers for SimpleMessage. +// Skip custom serializers for `SimpleMessage` final Message message = logEvent.getMessage(); final boolean simple = message instanceof SimpleMessage; if (!simple) { -// Try MultiformatMessage serializer. +// Try `Message` serializer +if (writeMessage(jsonWriter, message)) { +return; +} + +// Try `MultiformatMessage` serializer if (writeMultiformatMessage(jsonWriter, message)) { return; } -// Try ObjectMessage serializer. +// Try `ObjectMessage` serializer if (writeObjectMessage(jsonWriter, message)) { return; } @@ -158,6 +163,20 @@ public final class MessageResolver implements EventResolver { }; } +private static boolean writeMessage(final Js
(logging-log4j2) 01/03: Add migrating from Logback/SLF4J pages (#2625)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit d130aa1611f91a803ce24cb604dfcf3453ff3e12 Author: Volkan Yazıcı AuthorDate: Thu May 30 12:55:48 2024 +0200 Add migrating from Logback/SLF4J pages (#2625) Co-authored-by: Piotr P. Karwasz --- src/site/antora/modules/ROOT/nav.adoc | 16 +- src/site/antora/modules/ROOT/pages/index.adoc | 2 +- src/site/antora/modules/ROOT/pages/manual/api.adoc | 18 +- .../ROOT/pages/{ => manual}/getting-started.adoc | 342 +++-- .../antora/modules/ROOT/pages/manual/index.adoc| 4 +- .../modules/ROOT/pages/manual/installation.adoc| 122 +--- .../modules/ROOT/pages/migrate-from-logback.adoc | 111 +++ .../modules/ROOT/pages/migrate-from-slf4j.adoc | 84 + .../antora/modules/ROOT/partials/concepts.adoc | 133 .../modules/ROOT/partials/manual/api-intro.adoc| 40 ++- 10 files changed, 581 insertions(+), 291 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index f44851d5cc..0f893a52b9 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -21,14 +21,8 @@ ** link:{logging-services-url}/security.html[Security] ** xref:thanks.adoc[Thanks] -.Resources -* xref:faq.adoc[F.A.Q.] -* xref:getting-started.adoc[] -* xref:manual/migration.adoc[] -* xref:manual/cloud.adoc[] -* xref:development.adoc[] - .xref:manual/index.adoc[] +* xref:manual/getting-started.adoc[] * xref:manual/installation.adoc[] * xref:manual/architecture.adoc[] * xref:manual/api.adoc[API] @@ -53,6 +47,14 @@ * xref:plugin-reference.adoc[Plugin reference] * xref:javadoc.adoc[Java API reference] +.Resources +* xref:faq.adoc[F.A.Q.] +* xref:manual/migration.adoc[] +* xref:migrate-from-logback.adoc[] +* xref:migrate-from-slf4j.adoc[] +* xref:manual/cloud.adoc[] +* xref:development.adoc[] + .Components * xref:log4j-flume-ng.adoc[] * xref:log4j-iostreams.adoc[] diff --git a/src/site/antora/modules/ROOT/pages/index.adoc b/src/site/antora/modules/ROOT/pages/index.adoc index 128c273469..9f32cf9dfc 100644 --- a/src/site/antora/modules/ROOT/pages/index.adoc +++ b/src/site/antora/modules/ROOT/pages/index.adoc @@ -23,7 +23,7 @@ The project is actively maintained by a {logging-services-url}/team-list.html[te [#shortcuts] == Shortcuts -- xref:getting-started.adoc[] +- xref:manual/getting-started.adoc[] - xref:manual/installation.adoc[How can I install Log4j? Which dependencies are needed?] - xref:manual/configuration.adoc[How can I configure my `log4j2.xml`?] - xref:release-notes.adoc[Where are the release notes?] diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc index 8adac0d449..edefd3412f 100644 --- a/src/site/antora/modules/ROOT/pages/manual/api.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc @@ -15,13 +15,6 @@ limitations under the License. -:jboss-logging-link: https://github.com/jboss-logging/jboss-logging[JBoss Logging] -:jcl-link: https://commons.apache.org/proper/commons-logging/[JCL (Apache Commons Logging)] -:jpl-link: https://openjdk.org/jeps/264[JPL (Java Platform Logging)] -:jul-link: https://docs.oracle.com/en/java/javase/{java-target-version}/core/java-logging-overview.html[JUL (Java Logging)] -:logback-link: https://logback.qos.ch/[Logback] -:slf4j-link: https://www.slf4j.org/[SLF4J] - = Log4j API Log4j is essentially composed of a logging API called *Log4j API*, and its reference implementation called *Log4j Core*. @@ -29,20 +22,13 @@ Log4j is essentially composed of a logging API called *Log4j API*, and its refer .What is a logging API and a logging implementation? [%collapsible] -Logging APIs:: -A logging API is an interface your code or your dependencies directly logs against. -It is implementation agnostic. -Log4j API, {slf4j-link}, {jul-link}, {jcl-link}, {jpl-link} and {jboss-logging-link} are major logging APIs. - -Logging implementation:: -A logging implementation is only required at runtime and can be changed without the need to recompile your software. -Log4j Core, {jul-link}, {logback-link} are the most well-known logging implementations. +include::partial$concepts.adoc[tags=inc;api;impl] [TIP] Are you looking for a crash course on how to use Log4j in your application or library? -See xref:getting-started.adoc[]. +See xref:manual/getting-started.adoc[]. You can also check out xref:manual/installation.adoc[] for the complete installation instructions. diff --git a/src/site/antora/modules/ROOT/pages/getting-started.adoc b/src/site/antora/modules/ROOT/pages/manual/getting-started.adoc similarity index 53% rename from src/site/antora/modules/ROOT/pages/getting-started.adoc rename to src/site/antora/modules/ROOT/pa
(logging-log4j2) 02/03: Add Hibernate integration page (#2626)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit a504bca850fcb4c340cdd0ceb3ca8fb48160d50d Author: Volkan Yazıcı AuthorDate: Thu May 30 13:18:24 2024 +0200 Add Hibernate integration page (#2626) --- .../modules/ROOT/examples/hibernate/log4j2.json| 46 .../ROOT/examples/hibernate/log4j2.properties | 38 ++ .../modules/ROOT/examples/hibernate/log4j2.xml | 53 ++ .../modules/ROOT/examples/hibernate/log4j2.yaml| 48 + src/site/antora/modules/ROOT/nav.adoc | 1 + src/site/antora/modules/ROOT/pages/hibernate.adoc | 84 ++ .../modules/ROOT/pages/manual/installation.adoc| 4 +- 7 files changed, 272 insertions(+), 2 deletions(-) diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json new file mode 100644 index 00..593aa3c048 --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json @@ -0,0 +1,46 @@ +{ + "Configuration": { +"Appenders": { + "Console": { +"name": "CONSOLE", +"PatternLayout": {} + } +}, +"Loggers": { + "Logger": [ + +// Log just the SQL +{ + "name": "org.hibernate.SQL", + "level": "DEBUG" +}, + +// Log JDBC bind parameters and extracted values +// +// Warning! <1> +// JDBC bind parameters can contain sensitive data: +// Passwords, credit card numbers, etc. +// Use these logger configurations with care! +//{ +// "name": "org.hibernate.type", +// "level": "TRACE" +//}, +//{ +// "name": "org.hibernate.orm.jdbc.bind", +// "level": "TRACE" +//}, +//{ +// "name": "org.hibernate.orm.jdbc.extract", +// "level": "TRACE" +//} + + ], + "Root": { +"level": "WARN" + }, + "AppenderRef": { +"ref": "CONSOLE" + } +} + } +} diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.properties b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.properties new file mode 100644 index 00..f4d702f401 --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.properties @@ -0,0 +1,38 @@ +# +# 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. +# +Appenders.Console.name = CONSOLE +Appenders.Console.PatternLayout.type = PatternLayout + +# Log just the SQL +Loggers.1.name = org.hibernate.SQL +Loggers.1.level = DEBUG + +# Log JDBC bind parameters and extracted values +# +# Warning! <1> +# JDBC bind parameters can contain sensitive data! +# Passwords, credit card numbers, etc. +# Use these logger configurations with great care! +#Loggers.2.name = org.hibernate.type +#Loggers.2.level = TRACE +#Loggers.3.name = org.hibernate.orm.jdbc.bind +#Loggers.3.level = TRACE +#Loggers.4.name = org.hibernate.orm.jdbc.bind +#Loggers.4.level = TRACE + +Loggers.Root.level = WARN +Loggers.Root.AppenderRef.ref = CONSOLE diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.xml b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.xml new file mode 100644 index 00..869b5c1001 --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.xml @@ -0,0 +1,53 @@ + + +https://logging.apache.org/xml/ns; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=" + https://logging.apache.org/xml/ns + https://logging.apache.org/xml/ns/log4j-config-2.xsd;> + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/site/antora/modules/ROOT/examples/hibernate/
(logging-log4j2) 03/03: Replace `Java properties` with `Properties` in tabs
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit ffb9bb06ab2ab27c6084f894c852e54f02eb93ae Author: Volkan Yazıcı AuthorDate: Thu May 30 15:04:09 2024 +0200 Replace `Java properties` with `Properties` in tabs This is how Spring Boot calls these files in their tabbed views too. --- src/site/antora/modules/ROOT/pages/hibernate.adoc| 2 +- src/site/antora/modules/ROOT/pages/manual/async.adoc | 4 ++-- .../modules/ROOT/pages/manual/configuration.adoc | 20 ++-- .../antora/modules/ROOT/pages/manual/filters.adoc| 2 +- .../antora/modules/ROOT/pages/manual/scripts.adoc| 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/hibernate.adoc b/src/site/antora/modules/ROOT/pages/hibernate.adoc index dc9531d293..10fd7cec9d 100644 --- a/src/site/antora/modules/ROOT/pages/hibernate.adoc +++ b/src/site/antora/modules/ROOT/pages/hibernate.adoc @@ -61,7 +61,7 @@ YAML:: include::example$hibernate/log4j2.yaml[lines=24..44,indent=0] -Java properties:: +Properties:: + .Snippet from an example {antora-examples-url}/hibernate/log4j2.properties[`log4j2.properties`] configuring Hibernate-specific loggers [source,xml] diff --git a/src/site/antora/modules/ROOT/pages/manual/async.adoc b/src/site/antora/modules/ROOT/pages/manual/async.adoc index a0f4b25ccd..5bdf2e2f7d 100644 --- a/src/site/antora/modules/ROOT/pages/manual/async.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/async.adoc @@ -119,7 +119,7 @@ YAML:: include::example$manual/configuration/mixed-async.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -184,7 +184,7 @@ YAML:: include::example$manual/configuration/custom-wait-strategy.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] diff --git a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc index be60dfe0ec..5def76ec06 100644 --- a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc @@ -222,7 +222,7 @@ File: -Java properties:: +Properties:: + WARNING: The Java properties configuration format used in Log4j 2 and Log4j 3 are not compatible. + @@ -301,7 +301,7 @@ YAML:: include::example$manual/configuration/main-elements.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -493,7 +493,7 @@ YAML:: include::example$manual/configuration/loggers.yaml[tag=loggers] -Java properties:: +Properties:: + [source,properties] @@ -677,7 +677,7 @@ YAML:: include::example$manual/configuration/logger-properties.yaml[tag=loggers] -Java properties:: +Properties:: + [source,properties] @@ -756,7 +756,7 @@ YAML:: include::example$manual/configuration/properties.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -856,7 +856,7 @@ YAML:: include::example$manual/configuration/properties-example.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -913,7 +913,7 @@ YAML:: include::example$manual/configuration/properties-recursion.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -975,7 +975,7 @@ YAML:: include::example$manual/configuration/routing.yaml[tag=appender] -Java properties:: +Properties:: + [source,properties] @@ -1031,7 +1031,7 @@ YAML:: include::example$manual/configuration/arbiters.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -1071,7 +1071,7 @@ YAML:: include::example$manual/configuration/arbiters-select.yaml[tag=select] -Java properties:: +Properties:: + [source,properties] diff --git a/src/site/antora/modules/ROOT/pages/manual/filters.adoc b/src/site/antora/modules/ROOT/pages/manual/filters.adoc index 1913771c83..baea1d507b 100644 --- a/src/site/antora/modules/ROOT/pages/manual/filters.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/filters.adoc @@ -55,7 +55,7 @@ YAML:: include::example$manual/filters/filters.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] diff --git a/src/site/antora/modules/ROOT/pages/manual/scripts.adoc b/src/site/antora/modules/ROOT/pages/manual/scripts.adoc index d705da347b..3a7aaca7a0 100644 --- a/src/site/antora/modules/ROOT/pages/manual/scripts.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/scripts.adoc @@ -97,7 +97,7 @@ YAML:: include::example$manual/configuration/scripts.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties]
(logging-log4j2) branch main updated (7b4b24256d -> ffb9bb06ab)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 7b4b24256d Fail on Antora failures new d130aa1611 Add migrating from Logback/SLF4J pages (#2625) new a504bca850 Add Hibernate integration page (#2626) new ffb9bb06ab Replace `Java properties` with `Properties` in tabs The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../modules/ROOT/examples/hibernate/log4j2.json| 46 +++ .../log4j2.properties} | 29 +- .../filters/filters.xml => hibernate/log4j2.xml} | 35 ++- .../filters/filters.yaml => hibernate/log4j2.yaml} | 41 ++- src/site/antora/modules/ROOT/nav.adoc | 17 +- src/site/antora/modules/ROOT/pages/hibernate.adoc | 84 + src/site/antora/modules/ROOT/pages/index.adoc | 2 +- src/site/antora/modules/ROOT/pages/manual/api.adoc | 18 +- .../antora/modules/ROOT/pages/manual/async.adoc| 4 +- .../modules/ROOT/pages/manual/configuration.adoc | 20 +- .../antora/modules/ROOT/pages/manual/filters.adoc | 2 +- .../ROOT/pages/{ => manual}/getting-started.adoc | 342 +++-- .../antora/modules/ROOT/pages/manual/index.adoc| 4 +- .../modules/ROOT/pages/manual/installation.adoc| 122 +--- .../antora/modules/ROOT/pages/manual/scripts.adoc | 2 +- .../modules/ROOT/pages/migrate-from-logback.adoc | 111 +++ .../modules/ROOT/pages/migrate-from-slf4j.adoc | 84 + .../antora/modules/ROOT/partials/concepts.adoc | 133 .../modules/ROOT/partials/manual/api-intro.adoc| 40 ++- 19 files changed, 792 insertions(+), 344 deletions(-) create mode 100644 src/site/antora/modules/ROOT/examples/hibernate/log4j2.json copy src/site/antora/modules/ROOT/examples/{manual/configuration/arbiters.properties => hibernate/log4j2.properties} (55%) copy src/site/antora/modules/ROOT/examples/{manual/filters/filters.xml => hibernate/log4j2.xml} (67%) copy src/site/antora/modules/ROOT/examples/{manual/filters/filters.yaml => hibernate/log4j2.yaml} (62%) create mode 100644 src/site/antora/modules/ROOT/pages/hibernate.adoc rename src/site/antora/modules/ROOT/pages/{ => manual}/getting-started.adoc (53%) create mode 100644 src/site/antora/modules/ROOT/pages/migrate-from-logback.adoc create mode 100644 src/site/antora/modules/ROOT/pages/migrate-from-slf4j.adoc create mode 100644 src/site/antora/modules/ROOT/partials/concepts.adoc
(logging-log4j2) branch main updated: Fail on Antora failures
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/main by this push: new 7b4b24256d Fail on Antora failures 7b4b24256d is described below commit 7b4b24256dc83d08e1b476a7154e2763b71d281b Author: Volkan Yazıcı AuthorDate: Thu May 30 14:36:35 2024 +0200 Fail on Antora failures --- antora-playbook.yaml | 4 .../antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index e0eb4cb0cd..d566700af7 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -28,6 +28,10 @@ content: - target/generated-site/antora edit_url: +runtime: + log: +failure_level: error + asciidoc: attributes: # JSON Template Layout manual page has a deep sectioning, support it. diff --git a/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc b/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc index 832bb19ad1..8720369b4b 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc @@ -128,9 +128,7 @@ If more extensive authentication is required an `AuthorizationProvider` can be i xref:manual/systemproperties.adoc#log4j.auth.provider[`log4j.auth.provider`] system property, in log4j2.component.properties or in Spring's `bootstrap.yml` using either the `log4j2.authorizationProvider` or `logging.auth.authorizationProvider` key. -For the properties required by TLS configuration see -xref:manual/systemproperties -.adoc#properties-transport-security[the Transport Security configuration]. +For the properties required by TLS configuration see xref:manual/systemproperties.adoc#properties-transport-security[the Transport Security configuration]. == Requirements
(logging-log4j-jakarta) branch main updated: Fix section leveling
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-jakarta.git The following commit(s) were added to refs/heads/main by this push: new e90143b Fix section leveling e90143b is described below commit e90143bdc27c4f3ec9f3b99694ee4d6d4d1ebdca Author: Volkan Yazıcı AuthorDate: Thu May 30 14:29:42 2024 +0200 Fix section leveling --- src/site/antora/modules/ROOT/pages/index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/antora/modules/ROOT/pages/index.adoc b/src/site/antora/modules/ROOT/pages/index.adoc index 28a8067..4e41d22 100644 --- a/src/site/antora/modules/ROOT/pages/index.adoc +++ b/src/site/antora/modules/ROOT/pages/index.adoc @@ -22,7 +22,7 @@ limitations under the License. This project provides various https://jakarta.ee/[Jakarta]-specific {logging-services-url}/log4j[Log4j] components. [#maven-bom] -=== Maven Bill of Materials (BOM) +== Maven Bill of Materials (BOM) To keep your {project-name} module versions aligned, a https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms[Maven Bill of Materials (BOM) POM] is provided for your convenience.
(logging-log4j-transform) branch main updated: Fix link
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git The following commit(s) were added to refs/heads/main by this push: new 2dc5b30 Fix link 2dc5b30 is described below commit 2dc5b304e165f641a2f74657f35ed69f885a4d19 Author: Volkan Yazıcı AuthorDate: Thu May 30 14:28:18 2024 +0200 Fix link --- src/site/antora/modules/ROOT/pages/log4j-transform-maven-plugin.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/antora/modules/ROOT/pages/log4j-transform-maven-plugin.adoc b/src/site/antora/modules/ROOT/pages/log4j-transform-maven-plugin.adoc index ad49a72..3ec718b 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-transform-maven-plugin.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-transform-maven-plugin.adoc @@ -25,7 +25,7 @@ This allows you to use location information in your logs without incurring in th Finding the location of a logging call is a very expensive operation (a couple of microseconds). -Running xref:../log4j-transform-perf/src/main/java/org/apache/logging/log4j/transform/perf/LocationBenchmark.java[`LocationBenchmark`] on a Ryzen 7 2700U laptop with Java 17 gives the following results: +Running {project-github-url}/tree/main/log4j-transform-perf/src/main/java/org/apache/logging/log4j/transform/perf/LocationBenchmark.java[`LocationBenchmark`] on a Ryzen 7 2700U laptop with Java 17 gives the following results: [cols="1,1,1,1,1,1,1"] |===
(logging-log4j-transform) branch main updated: Fix `h6` style
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git The following commit(s) were added to refs/heads/main by this push: new 58f8157 Fix `h6` style 58f8157 is described below commit 58f8157c256ee0d92b99288b36750303be3bfd7e Author: Volkan Yazıcı AuthorDate: Thu May 30 13:55:13 2024 +0200 Fix `h6` style --- antora-playbook.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 535ca45..dcd165f 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -72,12 +72,13 @@ ui:
(logging-log4j-jakarta) branch main updated: Fix `h6` style
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-jakarta.git The following commit(s) were added to refs/heads/main by this push: new 1d10184 Fix `h6` style 1d10184 is described below commit 1d10184d810d5ca55e2ff9121ae771d8f84d5123 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:54:36 2024 +0200 Fix `h6` style --- antora-playbook.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 0a7c01a..0ac66be 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -72,12 +72,13 @@ ui:
(logging-log4j-jmx-gui) branch main updated: Fix `h6` style
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-jmx-gui.git The following commit(s) were added to refs/heads/main by this push: new c83aa5d Fix `h6` style c83aa5d is described below commit c83aa5d4108e3e23392476e7adaecc5ccc64b593 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:54:17 2024 +0200 Fix `h6` style --- antora-playbook.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index c6b0c10..c7c6837 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -72,12 +72,13 @@ ui:
(logging-log4j-kotlin) branch main updated: Fix `h6` style
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-kotlin.git The following commit(s) were added to refs/heads/main by this push: new b4cc7a6 Fix `h6` style b4cc7a6 is described below commit b4cc7a65d02549fc5d9a57199ad7c3065c97a2f7 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:53:50 2024 +0200 Fix `h6` style --- antora-playbook.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 23d7153..08518b2 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -72,12 +72,13 @@ ui:
(logging-log4j-scala) branch main updated: Fix `h6` style
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-scala.git The following commit(s) were added to refs/heads/main by this push: new e35c431 Fix `h6` style e35c431 is described below commit e35c43133cc4636584aeaa140b5556a5ababdc87 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:53:31 2024 +0200 Fix `h6` style --- antora-playbook.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index d733f54..ba41067 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -72,12 +72,13 @@ ui:
(logging-log4j-tools) branch main updated: Fix `h6` style
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git The following commit(s) were added to refs/heads/main by this push: new 066fec0 Fix `h6` style 066fec0 is described below commit 066fec09a4e91f0078cb560d565c768938abf79e Author: Volkan Yazıcı AuthorDate: Thu May 30 13:53:06 2024 +0200 Fix `h6` style --- antora-playbook.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index f1564d0..b5d9a0a 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -72,12 +72,13 @@ ui:
(logging-parent) branch main updated: Fix `h6` style
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-parent.git The following commit(s) were added to refs/heads/main by this push: new e21a0b4 Fix `h6` style e21a0b4 is described below commit e21a0b4385c88e0b63e2a9fddcc15085eba56b67 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:52:42 2024 +0200 Fix `h6` style --- antora-playbook.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 3b63eb0..3960b4c 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -72,12 +72,13 @@ ui:
(logging-log4j2) branch main updated: Fix `h6` style
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/main by this push: new 0faf9713c6 Fix `h6` style 0faf9713c6 is described below commit 0faf9713c69f2df79aee40ad2882c962c6be851b Author: Volkan Yazıcı AuthorDate: Thu May 30 13:52:08 2024 +0200 Fix `h6` style --- antora-playbook.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 5e14719aac..e0eb4cb0cd 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -81,12 +81,13 @@ ui:
(logging-log4j2) branch 2.x updated: Fix `h6` style
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new e7690b5246 Fix `h6` style e7690b5246 is described below commit e7690b52461452db92e1557e83c2a4252cca87ad Author: Volkan Yazıcı AuthorDate: Thu May 30 13:51:36 2024 +0200 Fix `h6` style --- antora-playbook.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index d794802699..53b77c1c9c 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -86,12 +86,13 @@ ui:
(logging-log4j2) branch 2.x updated: Fix header
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 82565699b4 Fix header 82565699b4 is described below commit 82565699b453fde0636a325eba3ecad8d1b01300 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:38:37 2024 +0200 Fix header --- src/site/antora/modules/ROOT/pages/manual/getting-started.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/antora/modules/ROOT/pages/manual/getting-started.adoc b/src/site/antora/modules/ROOT/pages/manual/getting-started.adoc index 0309ef23fd..7735ffce89 100644 --- a/src/site/antora/modules/ROOT/pages/manual/getting-started.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/getting-started.adoc @@ -269,7 +269,7 @@ To complete the installation, Log4j needs to be configured. Please continue with xref:#config-app[] [#config-app] -== How do I configure Log4j Core to run my application? +== How do I configure Log4j Core to run my **application**? This section explains configuring Log4j on how log events should be processed.
(logging-parent) branch main updated: Fail on Antora warnings
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-parent.git The following commit(s) were added to refs/heads/main by this push: new 6a04a27 Fail on Antora warnings 6a04a27 is described below commit 6a04a27f739065ffadf79fc0d58dc6b962779d82 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:34:49 2024 +0200 Fail on Antora warnings --- antora-playbook.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 463cfc5..3b63eb0 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -28,6 +28,11 @@ content: - target/generated-site/antora edit_url: +runtime: + log: +# Fail on warnings +failure_level: warn + asciidoc: extensions: - "@asciidoctor/tabs"
(logging-log4j-tools) branch main updated: Fail on Antora warnings
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git The following commit(s) were added to refs/heads/main by this push: new 425623f Fail on Antora warnings 425623f is described below commit 425623f921bd20c623bf0358927cabceca5011ea Author: Volkan Yazıcı AuthorDate: Thu May 30 13:34:25 2024 +0200 Fail on Antora warnings --- antora-playbook.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 4704a5f..f1564d0 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -28,6 +28,11 @@ content: - target/generated-site/antora edit_url: +runtime: + log: +# Fail on warnings +failure_level: warn + asciidoc: extensions: - "@asciidoctor/tabs"
(logging-log4j-scala) branch main updated: Fail on Antora warnings
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-scala.git The following commit(s) were added to refs/heads/main by this push: new 25f7248 Fail on Antora warnings 25f7248 is described below commit 25f7248e62663c9a673f6dd8eef8f79b841a9787 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:33:56 2024 +0200 Fail on Antora warnings --- antora-playbook.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 660b911..d733f54 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -28,6 +28,11 @@ content: - target/generated-site/antora edit_url: +runtime: + log: +# Fail on warnings +failure_level: warn + asciidoc: extensions: - "@asciidoctor/tabs"
(logging-log4j-kotlin) branch main updated: Fail on Antora warnings
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-kotlin.git The following commit(s) were added to refs/heads/main by this push: new fad75fe Fail on Antora warnings fad75fe is described below commit fad75fe1f83fe3acdfd628a3014448bfaf05db81 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:33:26 2024 +0200 Fail on Antora warnings --- antora-playbook.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 4f8d956..23d7153 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -28,6 +28,11 @@ content: - target/generated-site/antora edit_url: +runtime: + log: +# Fail on warnings +failure_level: warn + asciidoc: extensions: - "@asciidoctor/tabs"
(logging-log4j-jmx-gui) branch main updated: Fail on Antora warnings
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-jmx-gui.git The following commit(s) were added to refs/heads/main by this push: new 6c84707 Fail on Antora warnings 6c84707 is described below commit 6c84707b17a4ddece70512ea981526f387399654 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:32:58 2024 +0200 Fail on Antora warnings --- antora-playbook.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 228b495..c6b0c10 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -28,6 +28,11 @@ content: - target/generated-site/antora edit_url: +runtime: + log: +# Fail on warnings +failure_level: warn + asciidoc: extensions: - "@asciidoctor/tabs"
(logging-log4j-transform) branch main updated: Fail on Antora warnings
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git The following commit(s) were added to refs/heads/main by this push: new b2463cd Fail on Antora warnings b2463cd is described below commit b2463cd941cb468dc7df321d709790c27ec058be Author: Volkan Yazıcı AuthorDate: Thu May 30 13:32:08 2024 +0200 Fail on Antora warnings --- antora-playbook.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 3448486..535ca45 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -28,6 +28,11 @@ content: - target/generated-site/antora edit_url: +runtime: + log: +# Fail on warnings +failure_level: warn + asciidoc: extensions: - "@asciidoctor/tabs"
(logging-log4j-jakarta) branch main updated: Fail on Antora warnings
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-jakarta.git The following commit(s) were added to refs/heads/main by this push: new c0fcb9a Fail on Antora warnings c0fcb9a is described below commit c0fcb9ae8b8140f32ae8e2639cd85c421bc9ccfc Author: Volkan Yazıcı AuthorDate: Thu May 30 13:32:31 2024 +0200 Fail on Antora warnings --- antora-playbook.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 29eed2c..0a7c01a 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -28,6 +28,11 @@ content: - target/generated-site/antora edit_url: +runtime: + log: +# Fail on warnings +failure_level: warn + asciidoc: extensions: - "@asciidoctor/tabs"
(logging-log4j2) 02/02: Fail on Antora warnings
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 4e1495b263e5faebf3ff477f200c03b17dff9f61 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:30:47 2024 +0200 Fail on Antora warnings --- antora-playbook.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 59c2c3c8e9..d794802699 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -28,6 +28,11 @@ content: - target/generated-site/antora edit_url: +runtime: + log: +# Fail on warnings +failure_level: warn + asciidoc: attributes: # JSON Template Layout manual page has a deep sectioning, support it.
(logging-log4j2) branch 2.x updated (9f29bd6404 -> 4e1495b263)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 9f29bd6404 Add Hibernate integration page (#2626) new 416888d966 Replace `Java properties` with `Properties` in tabs new 4e1495b263 Fail on Antora warnings The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: antora-playbook.yaml | 5 + src/site/antora/modules/ROOT/pages/hibernate.adoc| 2 +- src/site/antora/modules/ROOT/pages/manual/async.adoc | 4 ++-- .../modules/ROOT/pages/manual/configuration.adoc | 20 ++-- .../antora/modules/ROOT/pages/manual/filters.adoc| 2 +- .../antora/modules/ROOT/pages/manual/markers.adoc| 2 +- .../antora/modules/ROOT/pages/manual/scripts.adoc| 2 +- 7 files changed, 21 insertions(+), 16 deletions(-)
(logging-log4j2) 01/02: Replace `Java properties` with `Properties` in tabs
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 416888d966e3d90315df477bc8aae63ccbb28571 Author: Volkan Yazıcı AuthorDate: Thu May 30 13:26:01 2024 +0200 Replace `Java properties` with `Properties` in tabs This is how Spring Boot calls these files in their tabbed views too. --- src/site/antora/modules/ROOT/pages/hibernate.adoc| 2 +- src/site/antora/modules/ROOT/pages/manual/async.adoc | 4 ++-- .../modules/ROOT/pages/manual/configuration.adoc | 20 ++-- .../antora/modules/ROOT/pages/manual/filters.adoc| 2 +- .../antora/modules/ROOT/pages/manual/markers.adoc| 2 +- .../antora/modules/ROOT/pages/manual/scripts.adoc| 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/hibernate.adoc b/src/site/antora/modules/ROOT/pages/hibernate.adoc index dc9531d293..10fd7cec9d 100644 --- a/src/site/antora/modules/ROOT/pages/hibernate.adoc +++ b/src/site/antora/modules/ROOT/pages/hibernate.adoc @@ -61,7 +61,7 @@ YAML:: include::example$hibernate/log4j2.yaml[lines=24..44,indent=0] -Java properties:: +Properties:: + .Snippet from an example {antora-examples-url}/hibernate/log4j2.properties[`log4j2.properties`] configuring Hibernate-specific loggers [source,xml] diff --git a/src/site/antora/modules/ROOT/pages/manual/async.adoc b/src/site/antora/modules/ROOT/pages/manual/async.adoc index d8122d2534..8408808c04 100644 --- a/src/site/antora/modules/ROOT/pages/manual/async.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/async.adoc @@ -142,7 +142,7 @@ YAML:: include::example$manual/configuration/mixed-async.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -214,7 +214,7 @@ YAML:: include::example$manual/configuration/custom-wait-strategy.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] diff --git a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc index 4a47f2e499..3651893ca8 100644 --- a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc @@ -228,7 +228,7 @@ File: -Java properties:: +Properties:: + In the Java properties configuration format: + @@ -306,7 +306,7 @@ YAML:: include::example$manual/configuration/main-elements.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -494,7 +494,7 @@ YAML:: include::example$manual/configuration/loggers.yaml[tag=loggers] -Java properties:: +Properties:: + [source,properties] @@ -677,7 +677,7 @@ YAML:: include::example$manual/configuration/logger-properties.yaml[tag=loggers] -Java properties:: +Properties:: + [source,properties] @@ -755,7 +755,7 @@ YAML:: include::example$manual/configuration/properties.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -854,7 +854,7 @@ YAML:: include::example$manual/configuration/properties-example.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -911,7 +911,7 @@ YAML:: include::example$manual/configuration/properties-recursion.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -973,7 +973,7 @@ YAML:: include::example$manual/configuration/routing.yaml[tag=appender] -Java properties:: +Properties:: + [source,properties] @@ -1029,7 +1029,7 @@ YAML:: include::example$manual/configuration/arbiters.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] @@ -1069,7 +1069,7 @@ YAML:: include::example$manual/configuration/arbiters-select.yaml[tag=select] -Java properties:: +Properties:: + [source,properties] diff --git a/src/site/antora/modules/ROOT/pages/manual/filters.adoc b/src/site/antora/modules/ROOT/pages/manual/filters.adoc index 1913771c83..baea1d507b 100644 --- a/src/site/antora/modules/ROOT/pages/manual/filters.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/filters.adoc @@ -55,7 +55,7 @@ YAML:: include::example$manual/filters/filters.yaml[lines=17..-1] -Java properties:: +Properties:: + [source,properties] diff --git a/src/site/antora/modules/ROOT/pages/manual/markers.adoc b/src/site/antora/modules/ROOT/pages/manual/markers.adoc index ae863186eb..aebabaee00 100644 --- a/src/site/antora/modules/ROOT/pages/manual/markers.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/markers.adoc @@ -119,7 +119,7 @@ YAML:: include::example$manual/markers/log4j2.yaml[tag=logger] -Java properties:: +Properties:: + [source, properties] diff --git a/src/site/antora/modules/ROOT/pages/manual/scripts.adoc b/src/site/antora/modules/ROOT/pages/manual
(logging-log4j2) branch doc/2.x/hibernate deleted (was 2d86aa07c5)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/hibernate in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git was 2d86aa07c5 Comment out unsafe configuration The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(logging-log4j2) branch 2.x updated: Add Hibernate integration page (#2626)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 9f29bd6404 Add Hibernate integration page (#2626) 9f29bd6404 is described below commit 9f29bd64040d071f1376e4de6d627090febb400d Author: Volkan Yazıcı AuthorDate: Thu May 30 13:18:24 2024 +0200 Add Hibernate integration page (#2626) --- .../modules/ROOT/examples/hibernate/log4j2.json| 46 .../ROOT/examples/hibernate/log4j2.properties | 39 ++ .../modules/ROOT/examples/hibernate/log4j2.xml | 53 ++ .../modules/ROOT/examples/hibernate/log4j2.yaml| 48 + src/site/antora/modules/ROOT/nav.adoc | 1 + src/site/antora/modules/ROOT/pages/hibernate.adoc | 84 ++ .../modules/ROOT/pages/manual/installation.adoc| 4 +- 7 files changed, 273 insertions(+), 2 deletions(-) diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json new file mode 100644 index 00..593aa3c048 --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json @@ -0,0 +1,46 @@ +{ + "Configuration": { +"Appenders": { + "Console": { +"name": "CONSOLE", +"PatternLayout": {} + } +}, +"Loggers": { + "Logger": [ + +// Log just the SQL +{ + "name": "org.hibernate.SQL", + "level": "DEBUG" +}, + +// Log JDBC bind parameters and extracted values +// +// Warning! <1> +// JDBC bind parameters can contain sensitive data: +// Passwords, credit card numbers, etc. +// Use these logger configurations with care! +//{ +// "name": "org.hibernate.type", +// "level": "TRACE" +//}, +//{ +// "name": "org.hibernate.orm.jdbc.bind", +// "level": "TRACE" +//}, +//{ +// "name": "org.hibernate.orm.jdbc.extract", +// "level": "TRACE" +//} + + ], + "Root": { +"level": "WARN" + }, + "AppenderRef": { +"ref": "CONSOLE" + } +} + } +} diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.properties b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.properties new file mode 100644 index 00..c03ce0ac6f --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.properties @@ -0,0 +1,39 @@ +# +# 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. +# +appender.0.type = Console +appender.0.name = CONSOLE +appender.0.layout.type = PatternLayout + +# Log just the SQL +logger.0.name = org.hibernate.SQL +logger.0.level = DEBUG + +# Log JDBC bind parameters and extracted values +# +# Warning! <1> +# JDBC bind parameters can contain sensitive data! +# Passwords, credit card numbers, etc. +# Use these logger configurations with great care! +#logger.1.name = org.hibernate.type +#logger.1.level = TRACE +#logger.2.name = org.hibernate.orm.jdbc.bind +#logger.2.level = TRACE +#logger.3.name = org.hibernate.orm.jdbc.bind +#logger.3.level = TRACE + +rootLogger.level = WARN +rootLogger.appenderRef.0.ref = CONSOLE diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.xml b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.xml new file mode 100644 index 00..869b5c1001 --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.xml @@ -0,0 +1,53 @@ + + +https://logging.apache.org/xml/ns; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=" + https://logging.apache.org/xml/ns + https://logging.apache.org/xml/ns/log4j-config-2.xsd;> + +
(logging-log4j2) branch doc/2.x/hibernate updated (c4e5c75715 -> 2d86aa07c5)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/hibernate in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from c4e5c75715 Remove redundant whitespace add 26a6242c41 Uniformize JavaDoc links (2) add 99bb351ef3 Fix broken links add 5eb54db415 Add `sync` option to all tabs add bd38609906 Fix broken external links add ef64024fd3 Fix `.htaccess` after removal of pages add e1fae6e84d Update `org.hdrhistogram:HdrHistogram` to version `2.2.2` (#2627) add c28bd4a75f Add migrating from Logback/SLF4J pages (#2625) add 882166f913 Merge changes from `2.x` add 2d86aa07c5 Comment out unsafe configuration No new revisions were added by this update. Summary of changes: .../org/apache/logging/log4j/util/Strings.java | 2 +- .../core/appender/MemoryMappedFileManager.java | 4 +- .../logging/log4j/core/layout/GelfLayout.java | 2 +- .../logging/log4j/core/layout/XmlLayout.java | 3 +- log4j-parent/pom.xml | 2 +- .../update_org_hdrhistogram_hdrhistogram.xml | 4 +- .../modules/ROOT/examples/hibernate/log4j2.json| 29 +++- .../ROOT/examples/hibernate/log4j2.properties | 17 --- .../modules/ROOT/examples/hibernate/log4j2.xml | 9 +++- .../modules/ROOT/examples/hibernate/log4j2.yaml| 17 --- src/site/antora/modules/ROOT/pages/hibernate.adoc | 9 ++-- .../modules/ROOT/pages/manual/appenders.adoc | 41 .../antora/modules/ROOT/pages/manual/async.adoc| 4 +- .../modules/ROOT/pages/manual/configuration.adoc | 20 .../modules/ROOT/pages/manual/eventlogging.adoc| 8 ++-- .../modules/ROOT/pages/manual/extending.adoc | 10 ++-- .../antora/modules/ROOT/pages/manual/filters.adoc | 2 +- .../modules/ROOT/pages/manual/installation.adoc| 24 +- .../modules/ROOT/pages/manual/logbuilder.adoc | 17 --- .../antora/modules/ROOT/pages/manual/markers.adoc | 2 +- .../modules/ROOT/pages/manual/resource-logger.adoc | 2 +- .../antora/modules/ROOT/pages/manual/scripts.adoc | 2 +- .../modules/ROOT/pages/manual/thread-context.adoc | 19 ++-- .../antora/modules/ROOT/pages/manual/webapp.adoc | 3 +- .../modules/ROOT/pages/migrate-from-logback.adoc | 54 -- .../manual/systemproperties/properties-async.adoc | 2 +- .../properties-configuration-factory.adoc | 2 +- .../properties-garbage-collection.adoc | 8 +++- .../systemproperties/properties-simple-logger.adoc | 4 +- .../systemproperties/properties-status-logger.adoc | 2 +- src/site/resources/.htaccess | 20 31 files changed, 219 insertions(+), 125 deletions(-)
(logging-log4j2) branch doc/2.x/migrate-from-logback+slf4j deleted (was 3fa1cd9e60)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/migrate-from-logback+slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git was 3fa1cd9e60 Merge changes from `2.x` The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(logging-log4j2) branch 2.x updated: Add migrating from Logback/SLF4J pages (#2625)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new c28bd4a75f Add migrating from Logback/SLF4J pages (#2625) c28bd4a75f is described below commit c28bd4a75f60a4c7611db667d1bd3803f96ded06 Author: Volkan Yazıcı AuthorDate: Thu May 30 12:55:48 2024 +0200 Add migrating from Logback/SLF4J pages (#2625) Co-authored-by: Piotr P. Karwasz --- src/site/antora/modules/ROOT/nav.adoc | 16 +- src/site/antora/modules/ROOT/pages/index.adoc | 2 +- src/site/antora/modules/ROOT/pages/manual/api.adoc | 18 +- .../ROOT/pages/{ => manual}/getting-started.adoc | 342 +++-- .../antora/modules/ROOT/pages/manual/index.adoc| 4 +- .../modules/ROOT/pages/manual/installation.adoc| 99 +- .../modules/ROOT/pages/migrate-from-logback.adoc | 111 +++ .../modules/ROOT/pages/migrate-from-slf4j.adoc | 84 + .../antora/modules/ROOT/partials/concepts.adoc | 133 .../modules/ROOT/partials/manual/api-intro.adoc| 40 ++- 10 files changed, 570 insertions(+), 279 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index 0b9e02ed59..24883c4962 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -20,14 +20,8 @@ * link:{logging-services-url}/support[Support] ** link:{logging-services-url}/security[Security] -.Resources -* xref:faq.adoc[F.A.Q.] -* xref:getting-started.adoc[] -* xref:manual/migration.adoc[] -* xref:manual/cloud.adoc[] -* xref:development.adoc[] - .xref:manual/index.adoc[] +* xref:manual/getting-started.adoc[] * xref:manual/installation.adoc[] * xref:manual/architecture.adoc[] * xref:manual/api.adoc[API] @@ -65,6 +59,14 @@ * xref:plugin-reference.adoc[Plugin reference] * xref:javadoc.adoc[Java API reference] +.Resources +* xref:faq.adoc[F.A.Q.] +* xref:manual/migration.adoc[] +* xref:migrate-from-logback.adoc[] +* xref:migrate-from-slf4j.adoc[] +* xref:manual/cloud.adoc[] +* xref:development.adoc[] + .Components * xref:log4j-flume-ng.adoc[] * xref:log4j-iostreams.adoc[] diff --git a/src/site/antora/modules/ROOT/pages/index.adoc b/src/site/antora/modules/ROOT/pages/index.adoc index 128c273469..9f32cf9dfc 100644 --- a/src/site/antora/modules/ROOT/pages/index.adoc +++ b/src/site/antora/modules/ROOT/pages/index.adoc @@ -23,7 +23,7 @@ The project is actively maintained by a {logging-services-url}/team-list.html[te [#shortcuts] == Shortcuts -- xref:getting-started.adoc[] +- xref:manual/getting-started.adoc[] - xref:manual/installation.adoc[How can I install Log4j? Which dependencies are needed?] - xref:manual/configuration.adoc[How can I configure my `log4j2.xml`?] - xref:release-notes.adoc[Where are the release notes?] diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc index 0530e16cd3..fb20768ee7 100644 --- a/src/site/antora/modules/ROOT/pages/manual/api.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc @@ -15,13 +15,6 @@ limitations under the License. -:jboss-logging-link: https://github.com/jboss-logging/jboss-logging[JBoss Logging] -:jcl-link: https://commons.apache.org/proper/commons-logging/[JCL (Apache Commons Logging)] -:jpl-link: https://openjdk.org/jeps/264[JPL (Java Platform Logging)] -:jul-link: https://docs.oracle.com/en/java/javase/{java-target-version}/core/java-logging-overview.html[JUL (Java Logging)] -:logback-link: https://logback.qos.ch/[Logback] -:slf4j-link: https://www.slf4j.org/[SLF4J] - = Log4j API Log4j is essentially composed of a logging API called *Log4j API*, and its reference implementation called *Log4j Core*. @@ -29,20 +22,13 @@ Log4j is essentially composed of a logging API called *Log4j API*, and its refer .What is a logging API and a logging implementation? [%collapsible] -Logging APIs:: -A logging API is an interface your code or your dependencies directly logs against. -It is implementation agnostic. -Log4j API, {slf4j-link}, {jul-link}, {jcl-link}, {jpl-link} and {jboss-logging-link} are major logging APIs. - -Logging implementation:: -A logging implementation is only required at runtime and can be changed without the need to recompile your software. -Log4j Core, {jul-link}, {logback-link} are the most well-known logging implementations. +include::partial$concepts.adoc[tags=inc;api;impl] [TIP] Are you looking for a crash course on how to use Log4j in your application or library? -See xref:getting-started.adoc[]. +See xref:manual/getting-started.adoc[]. You can also check out xref:manual/installation.adoc[] for the complete installation instructions. diff --git a/src/site/antora/modules/ROOT/pages/getting-started.adoc b/src/site/ant
(logging-log4j2) branch doc/2.x/migrate-from-logback+slf4j updated (e02e35a652 -> 3fa1cd9e60)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/migrate-from-logback+slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from e02e35a652 Improve bridge-related content add 26a6242c41 Uniformize JavaDoc links (2) add 99bb351ef3 Fix broken links add 5eb54db415 Add `sync` option to all tabs add bd38609906 Fix broken external links add ef64024fd3 Fix `.htaccess` after removal of pages add e1fae6e84d Update `org.hdrhistogram:HdrHistogram` to version `2.2.2` (#2627) add 3fa1cd9e60 Merge changes from `2.x` No new revisions were added by this update. Summary of changes: .../org/apache/logging/log4j/util/Strings.java | 2 +- .../core/appender/MemoryMappedFileManager.java | 4 +-- .../logging/log4j/core/layout/GelfLayout.java | 2 +- .../logging/log4j/core/layout/XmlLayout.java | 3 +- log4j-parent/pom.xml | 2 +- .../update_org_hdrhistogram_hdrhistogram.xml | 4 +-- .../modules/ROOT/pages/manual/appenders.adoc | 41 +++--- .../antora/modules/ROOT/pages/manual/async.adoc| 4 +-- .../modules/ROOT/pages/manual/configuration.adoc | 20 +-- .../modules/ROOT/pages/manual/eventlogging.adoc| 8 +++-- .../modules/ROOT/pages/manual/extending.adoc | 10 +++--- .../antora/modules/ROOT/pages/manual/filters.adoc | 2 +- .../modules/ROOT/pages/manual/installation.adoc| 24 ++--- .../modules/ROOT/pages/manual/logbuilder.adoc | 17 + .../antora/modules/ROOT/pages/manual/markers.adoc | 2 +- .../modules/ROOT/pages/manual/resource-logger.adoc | 2 +- .../antora/modules/ROOT/pages/manual/scripts.adoc | 2 +- .../modules/ROOT/pages/manual/thread-context.adoc | 19 +++--- .../antora/modules/ROOT/pages/manual/webapp.adoc | 3 +- .../manual/systemproperties/properties-async.adoc | 2 +- .../properties-configuration-factory.adoc | 2 +- .../properties-garbage-collection.adoc | 8 +++-- .../systemproperties/properties-simple-logger.adoc | 4 +-- .../systemproperties/properties-status-logger.adoc | 2 +- src/site/resources/.htaccess | 20 +-- 25 files changed, 117 insertions(+), 92 deletions(-)
(logging-log4j2) branch doc/2.x/migrate-from-logback+slf4j updated (00139dcdb3 -> e02e35a652)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/migrate-from-logback+slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 00139dcdb3 Add cheat sheet for dependency conversion add e02e35a652 Improve bridge-related content No new revisions were added by this update. Summary of changes: .../modules/ROOT/pages/migrate-from-logback.adoc | 57 +++--- 1 file changed, 40 insertions(+), 17 deletions(-)
(logging-log4j2) branch doc/2.x/hibernate updated (89366f7070 -> c4e5c75715)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/hibernate in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 89366f7070 Add Hibernate integration page add 245d4f713a Apply review feedback add c4e5c75715 Remove redundant whitespace No new revisions were added by this update. Summary of changes: src/site/antora/modules/ROOT/pages/hibernate.adoc | 10 src/site/antora/modules/ROOT/pages/manual/api.adoc | 2 -- .../modules/ROOT/pages/migrate-from-logback.adoc | 8 +++--- .../modules/ROOT/pages/migrate-from-slf4j.adoc | 29 +- 4 files changed, 27 insertions(+), 22 deletions(-)
(logging-log4j2) branch doc/2.x/migrate-from-logback+slf4j updated (018dcd7b3b -> 80dc155342)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/migrate-from-logback+slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 018dcd7b3b Add migration from Logback/SLF4J pages add 80dc155342 Apply review feedback No new revisions were added by this update. Summary of changes: src/site/antora/modules/ROOT/pages/manual/api.adoc | 2 -- .../modules/ROOT/pages/migrate-from-logback.adoc | 8 +++--- .../modules/ROOT/pages/migrate-from-slf4j.adoc | 29 +- 3 files changed, 27 insertions(+), 12 deletions(-)
(logging-log4j2) branch doc/2.x/hibernate created (now 89366f7070)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/hibernate in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git at 89366f7070 Add Hibernate integration page This branch includes the following new commits: new 89366f7070 Add Hibernate integration page The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(logging-log4j2) 01/01: Add Hibernate integration page
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/hibernate in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 89366f7070b8751979386f71d16e6eeb5b93874b Author: Volkan Yazıcı AuthorDate: Wed May 29 15:25:27 2024 +0200 Add Hibernate integration page --- .../modules/ROOT/examples/hibernate/log4j2.json| 41 ++ .../ROOT/examples/hibernate/log4j2.properties | 34 .../modules/ROOT/examples/hibernate/log4j2.xml | 46 +++ .../modules/ROOT/examples/hibernate/log4j2.yaml| 43 ++ src/site/antora/modules/ROOT/nav.adoc | 1 + src/site/antora/modules/ROOT/pages/hibernate.adoc | 93 ++ .../modules/ROOT/pages/manual/installation.adoc| 4 +- 7 files changed, 260 insertions(+), 2 deletions(-) diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json new file mode 100644 index 00..38fcc1026e --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.json @@ -0,0 +1,41 @@ +{ + "Configuration": { +"Appenders": { + "Console": { +"name": "CONSOLE", +"PatternLayout": {} + } +}, +"Loggers": { + "Logger": [ + +// Log just the SQL +{ + "name": "org.hibernate.SQL", + "level": "DEBUG" +}, + +// Log JDBC bind parameters and extracted values +{ + "name": "org.hibernate.type", + "level": "TRACE" +}, +{ + "name": "org.hibernate.orm.jdbc.bind", + "level": "TRACE" +}, +{ + "name": "org.hibernate.orm.jdbc.extract", + "level": "TRACE" +} + + ], + "Root": { +"level": "WARN" + }, + "AppenderRef": { +"ref": "CONSOLE" + } +} + } +} diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.properties b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.properties new file mode 100644 index 00..57f70b59e0 --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.properties @@ -0,0 +1,34 @@ +# +# 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. +# +appender.0.type = Console +appender.0.name = CONSOLE +appender.0.layout.type = PatternLayout + +# Log just the SQL +logger.0.name = org.hibernate.SQL +logger.0.level = DEBUG + +# Log JDBC bind parameters and extracted values +logger.1.name = org.hibernate.type +logger.1.level = TRACE +logger.2.name = org.hibernate.orm.jdbc.bind +logger.2.level = TRACE +logger.3.name = org.hibernate.orm.jdbc.bind +logger.3.level = TRACE + +rootLogger.level = WARN +rootLogger.appenderRef.0.ref = CONSOLE diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.xml b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.xml new file mode 100644 index 00..1526999c0d --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.xml @@ -0,0 +1,46 @@ + + +https://logging.apache.org/xml/ns; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=" + https://logging.apache.org/xml/ns + https://logging.apache.org/xml/ns/log4j-config-2.xsd;> + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/site/antora/modules/ROOT/examples/hibernate/log4j2.yaml b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.yaml new file mode 100644 index 00..1758545935 --- /dev/null +++ b/src/site/antora/modules/ROOT/examples/hibernate/log4j2.yaml @@ -0,0 +1,43 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional informa
(logging-log4j2) 01/01: Add migration from Logback/SLF4J pages
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/migrate-from-logback+slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 018dcd7b3bdfb374a6161800f8be951937f8e42a Author: Volkan Yazıcı AuthorDate: Wed May 29 12:46:05 2024 +0200 Add migration from Logback/SLF4J pages --- src/site/antora/modules/ROOT/nav.adoc | 16 +- src/site/antora/modules/ROOT/pages/index.adoc | 2 +- src/site/antora/modules/ROOT/pages/manual/api.adoc | 20 +- .../ROOT/pages/{ => manual}/getting-started.adoc | 342 +++-- .../antora/modules/ROOT/pages/manual/index.adoc| 4 +- .../modules/ROOT/pages/manual/installation.adoc| 98 +- .../modules/ROOT/pages/migrate-from-logback.adoc | 65 .../modules/ROOT/pages/migrate-from-slf4j.adoc | 67 .../antora/modules/ROOT/partials/concepts.adoc | 133 .../modules/ROOT/partials/manual/api-intro.adoc| 40 ++- 10 files changed, 508 insertions(+), 279 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index 0b9e02ed59..24883c4962 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -20,14 +20,8 @@ * link:{logging-services-url}/support[Support] ** link:{logging-services-url}/security[Security] -.Resources -* xref:faq.adoc[F.A.Q.] -* xref:getting-started.adoc[] -* xref:manual/migration.adoc[] -* xref:manual/cloud.adoc[] -* xref:development.adoc[] - .xref:manual/index.adoc[] +* xref:manual/getting-started.adoc[] * xref:manual/installation.adoc[] * xref:manual/architecture.adoc[] * xref:manual/api.adoc[API] @@ -65,6 +59,14 @@ * xref:plugin-reference.adoc[Plugin reference] * xref:javadoc.adoc[Java API reference] +.Resources +* xref:faq.adoc[F.A.Q.] +* xref:manual/migration.adoc[] +* xref:migrate-from-logback.adoc[] +* xref:migrate-from-slf4j.adoc[] +* xref:manual/cloud.adoc[] +* xref:development.adoc[] + .Components * xref:log4j-flume-ng.adoc[] * xref:log4j-iostreams.adoc[] diff --git a/src/site/antora/modules/ROOT/pages/index.adoc b/src/site/antora/modules/ROOT/pages/index.adoc index 128c273469..9f32cf9dfc 100644 --- a/src/site/antora/modules/ROOT/pages/index.adoc +++ b/src/site/antora/modules/ROOT/pages/index.adoc @@ -23,7 +23,7 @@ The project is actively maintained by a {logging-services-url}/team-list.html[te [#shortcuts] == Shortcuts -- xref:getting-started.adoc[] +- xref:manual/getting-started.adoc[] - xref:manual/installation.adoc[How can I install Log4j? Which dependencies are needed?] - xref:manual/configuration.adoc[How can I configure my `log4j2.xml`?] - xref:release-notes.adoc[Where are the release notes?] diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc index 0530e16cd3..391baaff2c 100644 --- a/src/site/antora/modules/ROOT/pages/manual/api.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc @@ -15,13 +15,6 @@ limitations under the License. -:jboss-logging-link: https://github.com/jboss-logging/jboss-logging[JBoss Logging] -:jcl-link: https://commons.apache.org/proper/commons-logging/[JCL (Apache Commons Logging)] -:jpl-link: https://openjdk.org/jeps/264[JPL (Java Platform Logging)] -:jul-link: https://docs.oracle.com/en/java/javase/{java-target-version}/core/java-logging-overview.html[JUL (Java Logging)] -:logback-link: https://logback.qos.ch/[Logback] -:slf4j-link: https://www.slf4j.org/[SLF4J] - = Log4j API Log4j is essentially composed of a logging API called *Log4j API*, and its reference implementation called *Log4j Core*. @@ -29,20 +22,15 @@ Log4j is essentially composed of a logging API called *Log4j API*, and its refer .What is a logging API and a logging implementation? [%collapsible] -Logging APIs:: -A logging API is an interface your code or your dependencies directly logs against. -It is implementation agnostic. -Log4j API, {slf4j-link}, {jul-link}, {jcl-link}, {jpl-link} and {jboss-logging-link} are major logging APIs. - -Logging implementation:: -A logging implementation is only required at runtime and can be changed without the need to recompile your software. -Log4j Core, {jul-link}, {logback-link} are the most well-known logging implementations. + +include::partial$concepts.adoc[tags=inc;api;impl] + [TIP] Are you looking for a crash course on how to use Log4j in your application or library? -See xref:getting-started.adoc[]. +See xref:manual/getting-started.adoc[]. You can also check out xref:manual/installation.adoc[] for the complete installation instructions. diff --git a/src/site/antora/modules/ROOT/pages/getting-started.adoc b/src/site/antora/modules/ROOT/pages/manual/getting-started.adoc similarity index 53% rename from src/site/antora/modules/ROOT/pages/getting-started.adoc rename to src/site/antora/modules/ROOT/pages/man
(logging-log4j2) branch doc/2.x/migrate-from-logback+slf4j updated (a278d339bb -> 018dcd7b3b)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/migrate-from-logback+slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git discard a278d339bb Add migration from Logback/SLF4J pages new 018dcd7b3b Add migration from Logback/SLF4J pages This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (a278d339bb) \ N -- N -- N refs/heads/doc/2.x/migrate-from-logback+slf4j (018dcd7b3b) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: src/site/antora/modules/ROOT/pages/manual/index.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
(logging-log4j2) 01/01: Add migration from Logback/SLF4J pages
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/migrate-from-logback+slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit a278d339bbce902798f37d182cc4611d66397e13 Author: Volkan Yazıcı AuthorDate: Wed May 29 12:46:05 2024 +0200 Add migration from Logback/SLF4J pages --- src/site/antora/modules/ROOT/nav.adoc | 16 +- src/site/antora/modules/ROOT/pages/index.adoc | 2 +- src/site/antora/modules/ROOT/pages/manual/api.adoc | 20 +- .../ROOT/pages/{ => manual}/getting-started.adoc | 342 +++-- .../modules/ROOT/pages/manual/installation.adoc| 98 +- .../modules/ROOT/pages/migrate-from-logback.adoc | 65 .../modules/ROOT/pages/migrate-from-slf4j.adoc | 67 .../antora/modules/ROOT/partials/concepts.adoc | 133 .../modules/ROOT/partials/manual/api-intro.adoc| 40 ++- 9 files changed, 506 insertions(+), 277 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index 0b9e02ed59..24883c4962 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -20,14 +20,8 @@ * link:{logging-services-url}/support[Support] ** link:{logging-services-url}/security[Security] -.Resources -* xref:faq.adoc[F.A.Q.] -* xref:getting-started.adoc[] -* xref:manual/migration.adoc[] -* xref:manual/cloud.adoc[] -* xref:development.adoc[] - .xref:manual/index.adoc[] +* xref:manual/getting-started.adoc[] * xref:manual/installation.adoc[] * xref:manual/architecture.adoc[] * xref:manual/api.adoc[API] @@ -65,6 +59,14 @@ * xref:plugin-reference.adoc[Plugin reference] * xref:javadoc.adoc[Java API reference] +.Resources +* xref:faq.adoc[F.A.Q.] +* xref:manual/migration.adoc[] +* xref:migrate-from-logback.adoc[] +* xref:migrate-from-slf4j.adoc[] +* xref:manual/cloud.adoc[] +* xref:development.adoc[] + .Components * xref:log4j-flume-ng.adoc[] * xref:log4j-iostreams.adoc[] diff --git a/src/site/antora/modules/ROOT/pages/index.adoc b/src/site/antora/modules/ROOT/pages/index.adoc index 128c273469..9f32cf9dfc 100644 --- a/src/site/antora/modules/ROOT/pages/index.adoc +++ b/src/site/antora/modules/ROOT/pages/index.adoc @@ -23,7 +23,7 @@ The project is actively maintained by a {logging-services-url}/team-list.html[te [#shortcuts] == Shortcuts -- xref:getting-started.adoc[] +- xref:manual/getting-started.adoc[] - xref:manual/installation.adoc[How can I install Log4j? Which dependencies are needed?] - xref:manual/configuration.adoc[How can I configure my `log4j2.xml`?] - xref:release-notes.adoc[Where are the release notes?] diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc index 0530e16cd3..391baaff2c 100644 --- a/src/site/antora/modules/ROOT/pages/manual/api.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc @@ -15,13 +15,6 @@ limitations under the License. -:jboss-logging-link: https://github.com/jboss-logging/jboss-logging[JBoss Logging] -:jcl-link: https://commons.apache.org/proper/commons-logging/[JCL (Apache Commons Logging)] -:jpl-link: https://openjdk.org/jeps/264[JPL (Java Platform Logging)] -:jul-link: https://docs.oracle.com/en/java/javase/{java-target-version}/core/java-logging-overview.html[JUL (Java Logging)] -:logback-link: https://logback.qos.ch/[Logback] -:slf4j-link: https://www.slf4j.org/[SLF4J] - = Log4j API Log4j is essentially composed of a logging API called *Log4j API*, and its reference implementation called *Log4j Core*. @@ -29,20 +22,15 @@ Log4j is essentially composed of a logging API called *Log4j API*, and its refer .What is a logging API and a logging implementation? [%collapsible] -Logging APIs:: -A logging API is an interface your code or your dependencies directly logs against. -It is implementation agnostic. -Log4j API, {slf4j-link}, {jul-link}, {jcl-link}, {jpl-link} and {jboss-logging-link} are major logging APIs. - -Logging implementation:: -A logging implementation is only required at runtime and can be changed without the need to recompile your software. -Log4j Core, {jul-link}, {logback-link} are the most well-known logging implementations. + +include::partial$concepts.adoc[tags=inc;api;impl] + [TIP] Are you looking for a crash course on how to use Log4j in your application or library? -See xref:getting-started.adoc[]. +See xref:manual/getting-started.adoc[]. You can also check out xref:manual/installation.adoc[] for the complete installation instructions. diff --git a/src/site/antora/modules/ROOT/pages/getting-started.adoc b/src/site/antora/modules/ROOT/pages/manual/getting-started.adoc similarity index 53% rename from src/site/antora/modules/ROOT/pages/getting-started.adoc rename to src/site/antora/modules/ROOT/pages/manual/getting-started.adoc index e723d99446..0309ef23fd 100644 --- a/
(logging-log4j2) branch doc/2.x/migrate-from-logback+slf4j created (now a278d339bb)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/migrate-from-logback+slf4j in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git at a278d339bb Add migration from Logback/SLF4J pages This branch includes the following new commits: new a278d339bb Add migration from Logback/SLF4J pages The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(logging-log4j2) branch 2.x updated: Fix broken links
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 9b7e8cb804 Fix broken links 9b7e8cb804 is described below commit 9b7e8cb804f8bb4e9858d099cfba14db5ce1e9fe Author: Volkan Yazıcı AuthorDate: Wed May 29 13:10:33 2024 +0200 Fix broken links --- .../pages/log4j-spring-cloud-config-client.adoc| 4 +-- .../modules/ROOT/pages/manual/configuration.adoc | 3 +- .../systemproperties/properties-log4j-jul.adoc | 36 +- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc b/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc index 7d364bdb31..cbde7c9d77 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-spring-cloud-config-client.adoc @@ -128,9 +128,7 @@ If more extensive authentication is required an `AuthorizationProvider` can be i xref:manual/systemproperties.adoc#log4j2.configurationAuthorizationProvider[log4j2.configurationAuthorizationProvider] system property, in log4j2.component.properties or in Spring's `bootstrap.yml` using either the `log4j2.authorizationProvider` or `logging.auth.authorizationProvider` key. -For the properties required by TLS configuration see -xref:manual/systemproperties -.adoc#properties-transport-security[the Transport Security configuration]. +For the properties required by TLS configuration see xref:manual/systemproperties.adoc#properties-transport-security[the Transport Security configuration]. == Requirements diff --git a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc index 6446200af5..4a47f2e499 100644 --- a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc @@ -432,8 +432,7 @@ Overrides the logging level of xref:manual/status-logger.adoc[]. [WARNING] -Since version `2.24.0`, this attribute is deprecated and should be replaced with the xref:manual/status-logger -.adoc#log4j2.statusLoggerLevel[log4j2.statusLoggerLevel] configuration property instead. +Since version `2.24.0`, this attribute is deprecated and should be replaced with the xref:manual/status-logger.adoc#log4j2.statusLoggerLevel[log4j2.statusLoggerLevel] configuration property instead. [id=configuration-elements-filters] diff --git a/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-log4j-jul.adoc b/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-log4j-jul.adoc index 8dd16c660e..28afd8ede0 100644 --- a/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-log4j-jul.adoc +++ b/src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-log4j-jul.adoc @@ -26,7 +26,41 @@ Fully qualified name of an alternative `org.apache.logging.log4j.jul.LevelConverter` implementation. -See xref:log4j-jul.adoc#default-level-conversions[Default Level Conversions] for the default implementation. +.Default level conversions +[%collapsible] + +[cols="1m,1m"] +|=== +| 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] +| 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] +| FINEST + +| http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#ALL[ALL] +| ALL +|=== + [id=log4j2.julLoggerAdapter] == `log4j2.julLoggerAdapter`
(logging-log4j2) branch doc/2.x/improve-redirs deleted (was b578ac6b74)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/improve-redirs in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git was b578ac6b74 Improve redirects The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(logging-log4j2) branch 2.x updated: Improve redirects (#2622)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 50e286e23a Improve redirects (#2622) 50e286e23a is described below commit 50e286e23a862bfe0c29901976d30f335fcacb43 Author: Volkan Yazıcı AuthorDate: Tue May 28 10:26:33 2024 +0200 Improve redirects (#2622) --- src/site/antora/modules/ROOT/nav.adoc | 1 - src/site/antora/modules/ROOT/pages/articles.adoc | 145 - src/site/antora/modules/ROOT/pages/log4j-api.adoc | 24 src/site/antora/modules/ROOT/pages/log4j-jcl.adoc | 29 - .../antora/modules/ROOT/pages/log4j-jmx-gui.adoc | 27 src/site/antora/modules/ROOT/pages/log4j-jpl.adoc | 27 src/site/antora/modules/ROOT/pages/log4j-jul.adoc | 128 -- .../modules/ROOT/pages/log4j-slf4j-impl.adoc | 40 -- .../modules/ROOT/pages/log4j-slf4j2-impl.adoc | 40 -- .../antora/modules/ROOT/pages/log4j-to-jul.adoc| 34 - .../antora/modules/ROOT/pages/log4j-to-slf4j.adoc | 33 - src/site/antora/modules/ROOT/pages/thanks.adoc | 52 src/site/resources/.htaccess | 18 +-- 13 files changed, 10 insertions(+), 588 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index cebfdfd424..4777d46e50 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -19,7 +19,6 @@ ** xref:release-notes.adoc[] * link:{logging-services-url}/support[Support] ** link:{logging-services-url}/security[Security] -** xref:thanks.adoc[Thanks] .Resources * xref:faq.adoc[F.A.Q.] diff --git a/src/site/antora/modules/ROOT/pages/articles.adoc b/src/site/antora/modules/ROOT/pages/articles.adoc deleted file mode 100644 index bf1d3255f2..00 --- a/src/site/antora/modules/ROOT/pages/articles.adoc +++ /dev/null @@ -1,145 +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 xref:manual/index.adoc[Log4j 2 manual] is the ultimate guide for up-to-date and detailed information on how to configure and use Log4j 2. - -== Chinese - -* https://www.infoq.cn/news/2016/06/log4j-garbage-free/[Log4j 2.6免垃圾收集] (June 12, 2016) -* https://blog.csdn.net/autfish/article/details/51203709[详解log4j2(上) - 从基础到实战] (April 20, 2016) -* https://www.jianshu.com/p/7aec512a003c[Log4j2使用笔记] (November 3, 2015) -* https://www.infoq.cn/news/2015/09/interview-log4j-pmc/[过渡到全新Log4j:Log4j项目管理委员会访谈] (September 14, 2015) -* https://www.infoq.cn/news/2015/09/log4j-version-1-reaches-eol/[Log4j版本1生命周期终结] (September 3, 2015) -* https://www.infoq.cn/news/2014/08/apache-log4j2/[Apache Log4j 2.0值得升级吗] (August 5, 2014) -* https://blog.csdn.net/lrenjun/article/details/8178875[log4j2 使用详解] (November 13, 2012) -* https://web.archive.org/web/20211016221310/https://my.oschina.net/xianggao/blog/523401[Log4j2配置文件详解] (October 29, 2015) - -== English - -* 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 Usi
(logging-log4j2) branch doc/2.x/improve-redirs created (now b578ac6b74)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/improve-redirs in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git at b578ac6b74 Improve redirects This branch includes the following new commits: new b578ac6b74 Improve redirects The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(logging-log4j2) 01/01: Improve redirects
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/improve-redirs in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit b578ac6b74fa43518e163ec73a3f65ca4cd3364d Author: Volkan Yazıcı AuthorDate: Tue May 28 10:12:14 2024 +0200 Improve redirects --- src/site/antora/modules/ROOT/nav.adoc | 1 - src/site/antora/modules/ROOT/pages/articles.adoc | 145 - src/site/antora/modules/ROOT/pages/log4j-api.adoc | 24 src/site/antora/modules/ROOT/pages/log4j-jcl.adoc | 29 - .../antora/modules/ROOT/pages/log4j-jmx-gui.adoc | 27 src/site/antora/modules/ROOT/pages/log4j-jpl.adoc | 27 src/site/antora/modules/ROOT/pages/log4j-jul.adoc | 128 -- .../modules/ROOT/pages/log4j-slf4j-impl.adoc | 40 -- .../modules/ROOT/pages/log4j-slf4j2-impl.adoc | 40 -- .../antora/modules/ROOT/pages/log4j-to-jul.adoc| 34 - .../antora/modules/ROOT/pages/log4j-to-slf4j.adoc | 33 - src/site/antora/modules/ROOT/pages/thanks.adoc | 52 src/site/resources/.htaccess | 18 +-- 13 files changed, 10 insertions(+), 588 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index cebfdfd424..4777d46e50 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -19,7 +19,6 @@ ** xref:release-notes.adoc[] * link:{logging-services-url}/support[Support] ** link:{logging-services-url}/security[Security] -** xref:thanks.adoc[Thanks] .Resources * xref:faq.adoc[F.A.Q.] diff --git a/src/site/antora/modules/ROOT/pages/articles.adoc b/src/site/antora/modules/ROOT/pages/articles.adoc deleted file mode 100644 index bf1d3255f2..00 --- a/src/site/antora/modules/ROOT/pages/articles.adoc +++ /dev/null @@ -1,145 +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 xref:manual/index.adoc[Log4j 2 manual] is the ultimate guide for up-to-date and detailed information on how to configure and use Log4j 2. - -== Chinese - -* https://www.infoq.cn/news/2016/06/log4j-garbage-free/[Log4j 2.6免垃圾收集] (June 12, 2016) -* https://blog.csdn.net/autfish/article/details/51203709[详解log4j2(上) - 从基础到实战] (April 20, 2016) -* https://www.jianshu.com/p/7aec512a003c[Log4j2使用笔记] (November 3, 2015) -* https://www.infoq.cn/news/2015/09/interview-log4j-pmc/[过渡到全新Log4j:Log4j项目管理委员会访谈] (September 14, 2015) -* https://www.infoq.cn/news/2015/09/log4j-version-1-reaches-eol/[Log4j版本1生命周期终结] (September 3, 2015) -* https://www.infoq.cn/news/2014/08/apache-log4j2/[Apache Log4j 2.0值得升级吗] (August 5, 2014) -* https://blog.csdn.net/lrenjun/article/details/8178875[log4j2 使用详解] (November 13, 2012) -* https://web.archive.org/web/20211016221310/https://my.oschina.net/xianggao/blog/523401[Log4j2配置文件详解] (October 29, 2015) - -== English - -* 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-consol
(logging-site) branch asf-site updated (f63bcf4f -> b8819194)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/logging-site.git from f63bcf4f Automatic Site Publish by Buildbot add 33d3b65d Automatic Site Publish by Buildbot add f4e128a7 Automatic Site Publish by Buildbot add 5883bf67 Automatic Site Publish by Buildbot add b8819194 Automatic Site Publish by Buildbot No new revisions were added by this update. Summary of changes: .../2023/11/17/flume-joins-logging-services.html | 14 --- content/blog/2023/11/28/new-pmc-member.html| 14 --- .../2023/12/02/apache-common-logging-1.3.0.html| 14 --- .../12/14/announcing-support-from-the-stf.html | 14 --- .../blog/2023/12/18/20-years-of-innovation.html| 14 --- content/blog/index.html| 14 --- content/charter.html | 14 --- content/dormant.html | 14 --- content/download.html | 14 --- content/feed.xml | 2 +- content/guidelines.html| 14 --- content/img/sponsors/intellij.png | Bin 0 -> 4299 bytes content/img/sponsors/yourkit.png | Bin 0 -> 5554 bytes content/index.html | 14 --- content/mailing-lists.html | 14 --- content/processes.html | 14 --- content/security.html | 14 --- content/support.html | 44 --- content/team-list.html | 14 --- content/what-is-logging.html | 14 --- content/xml/ns/index.html | 34 ++ content/xml/ns/log4j-config-2.23.1.xsd | 126 - 22 files changed, 112 insertions(+), 318 deletions(-) create mode 100644 content/img/sponsors/intellij.png create mode 100644 content/img/sponsors/yourkit.png
(logging-site) branch main updated: Move `thanks.adoc` from Log4j to here
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-site.git The following commit(s) were added to refs/heads/main by this push: new 8f68f756 Move `thanks.adoc` from Log4j to here 8f68f756 is described below commit 8f68f756c580414784a6869de4520de0299e7746 Author: Volkan Yazıcı AuthorDate: Tue May 28 09:57:47 2024 +0200 Move `thanks.adoc` from Log4j to here --- _includes/navbar.html | 14 -- img/sponsors/intellij.png | Bin 0 -> 4299 bytes img/sponsors/yourkit.png | Bin 0 -> 5554 bytes support.adoc | 16 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/_includes/navbar.html b/_includes/navbar.html index 9b878470..b708c1af 100644 --- a/_includes/navbar.html +++ b/_includes/navbar.html @@ -28,20 +28,6 @@ XML Schemas - - -Apache - -https://www.apache.org/;>Home -https://www.apache.org/foundation/sponsorship.html;>Sponsorship -https://www.apache.org/licenses/;>License -https://www.apache.org/foundation/thanks.html;>Thanks -https://www.apache.org/events/current-event.html;>Current Events -https://www.apache.org/security/;>Security -https://privacy.apache.org/policies/privacy-policy-public.html;>Privacy - - - Blog diff --git a/img/sponsors/intellij.png b/img/sponsors/intellij.png new file mode 100644 index ..319205b3 Binary files /dev/null and b/img/sponsors/intellij.png differ diff --git a/img/sponsors/yourkit.png b/img/sponsors/yourkit.png new file mode 100644 index ..dccf5743 Binary files /dev/null and b/img/sponsors/yourkit.png differ diff --git a/support.adoc b/support.adoc index 648a033d..fd2f7ee6 100644 --- a/support.adoc +++ b/support.adoc @@ -138,6 +138,22 @@ In either case, while the Apache Logging Services project thanks you for your su * https://github.com/rgoers[Ralph Goers] * https://github.com/vy[Volkan Yazıcı] +[#sponsors] +=== Sponsors + +There are a handful of tools that developers in the community use; some are open-source and some are commercial. +We would like to take this opportunity to thank our sponsors providing the project maintainers access to these tools: + +* https://www.jetbrains.com[JetBrains] with its https://www.jetbrains.com/idea/[Intellij IDEA] ++ +image::img/sponsors/intellij.png[alt="IntelliJ IDEA",width=200] + +* https://www.yourkit.com[YourKit] with its full-featured https://www.yourkit.com/java/profiler[Java Profiler] ++ +image::img/sponsors/yourkit.png[alt="YourKit",width=200] + +There are several https://www.apache.org/foundation/thanks.html[sponsors supporting ASF]. + [#commercial] == Third-party commercial support
(logging-log4j2) branch main updated: Fix `log4j-osgi-test` tests (#2621)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/main by this push: new 4d2a2661a1 Fix `log4j-osgi-test` tests (#2621) 4d2a2661a1 is described below commit 4d2a2661a12a35a605d2d1209dbd97049f5b5187 Author: Volkan Yazıcı AuthorDate: Tue May 28 09:07:39 2024 +0200 Fix `log4j-osgi-test` tests (#2621) --- .../log4j/osgi/tests/AbstractLoadBundleTest.java | 39 -- .../logging/log4j/osgi/tests/CoreOsgiTest.java | 1 - 2 files changed, 40 deletions(-) diff --git a/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java index 5a957cda94..6f7d4510f7 100644 --- a/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java +++ b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java @@ -19,7 +19,6 @@ package org.apache.logging.log4j.osgi.tests; import static org.junit.Assert.assertEquals; import java.util.List; -import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -88,10 +87,6 @@ abstract class AbstractLoadBundleTest { return installBundle("org.apache.logging.log4j.core"); } -private Bundle get12ApiBundle() throws BundleException { -return installBundle("org.apache.logging.log4j.1.2.api"); -} - private Bundle getApiTestsBundle() throws BundleException { return installBundle("org.apache.logging.log4j.api.test"); } @@ -162,40 +157,6 @@ abstract class AbstractLoadBundleTest { uninstall(spiFly); } -/** - * Tests the loading of the 1.2 Compatibility API bundle, its classes should be loadable from the Core bundle, - * and the class loader should be the same between a class from core and a class from compat - */ -@Test -public void testLog4J12Fragement() throws BundleException, ReflectiveOperationException { - -final List spiFly = startApacheSpiFly(); -final Bundle api = getApiBundle(); -final Bundle kit = getKitBundle(); -final Bundle plugins = getPluginsBundle(); -final Bundle core = getCoreBundle(); -final Bundle compat = get12ApiBundle(); - -doOnBundlesAndVerifyState(Bundle::start, Bundle.ACTIVE, api, kit, plugins, core); - -final Class coreClassFromCore = core.loadClass("org.apache.logging.log4j.core.Core"); -final Class levelClassFrom12API = core.loadClass("org.apache.log4j.Level"); -final Class levelClassFromAPI = core.loadClass("org.apache.logging.log4j.Level"); - -assertEquals( -"expected 1.2 API Level to have the same class loader as Core", -levelClassFrom12API.getClassLoader(), -coreClassFromCore.getClassLoader()); -Assert.assertNotEquals( -"expected 1.2 API Level NOT to have the same class loader as API Level", -levelClassFrom12API.getClassLoader(), -levelClassFromAPI.getClassLoader()); - -doOnBundlesAndVerifyState(Bundle::stop, Bundle.RESOLVED, core, plugins, kit, api); -doOnBundlesAndVerifyState(Bundle::uninstall, Bundle.UNINSTALLED, compat, core, plugins, kit, api); -uninstall(spiFly); -} - private static void doOnBundlesAndVerifyState( final ThrowingConsumer operation, final int expectedState, final Bundle... bundles) { for (final Bundle bundle : bundles) { diff --git a/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java index 12f273cc58..709c3fffa9 100644 --- a/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java +++ b/log4j-osgi-test/src/test/java/org/apache/logging/log4j/osgi/tests/CoreOsgiTest.java @@ -50,7 +50,6 @@ public class CoreOsgiTest { linkBundle("org.apache.logging.log4j.plugins"), linkBundle("org.apache.logging.log4j.kit"), linkBundle("org.apache.logging.log4j.core"), -linkBundle("org.apache.logging.log4j.1.2.api").start(false), // required by Pax Exam's logging linkBundle("org.objectweb.asm"), linkBundle("org.objectweb.asm.commons"),
(logging-log4j2) branch remove-log4j-1.2.api updated (ce1fd2b15b -> 33b3fd8763)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch remove-log4j-1.2.api in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from ce1fd2b15b Add issue link add 33b3fd8763 Fix formatting issues No new revisions were added by this update. Summary of changes: .../log4j/layout/template/json/resolver/MessageResolverTest.java | 9 - 1 file changed, 9 deletions(-)
(logging-log4j2) branch remove-log4j-1.2.api deleted (was 33b3fd8763)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch remove-log4j-1.2.api in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git was 33b3fd8763 Fix formatting issues The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(logging-log4j2) branch remove-log4j-1.2.api updated (b52d6e54cb -> ce1fd2b15b)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch remove-log4j-1.2.api in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from b52d6e54cb Remove `log4j-1.2-api` module add ce1fd2b15b Add issue link No new revisions were added by this update. Summary of changes: src/changelog/.3.x.x/remove_log4j-1.2-api.xml | 1 + 1 file changed, 1 insertion(+)
(logging-log4j2) branch remove-log4j-1.2.api created (now b52d6e54cb)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch remove-log4j-1.2.api in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git at b52d6e54cb Remove `log4j-1.2-api` module This branch includes the following new commits: new b52d6e54cb Remove `log4j-1.2-api` module The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(logging-log4j2) branch 2.x updated: Match API navigation menu with the page itself
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new dfc233c260 Match API navigation menu with the page itself dfc233c260 is described below commit dfc233c2609dcf03f11863d3cd4b163aeff123dc Author: Volkan Yazıcı AuthorDate: Mon May 27 20:19:45 2024 +0200 Match API navigation menu with the page itself --- src/site/antora/modules/ROOT/nav.adoc | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index fd9e3eefae..cebfdfd424 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -16,7 +16,6 @@ * xref:download.adoc[Download] -** xref:runtime-dependencies.adoc[] ** xref:release-notes.adoc[] * link:{logging-services-url}/support[Support] ** link:{logging-services-url}/security[Security] @@ -33,17 +32,19 @@ * xref:manual/installation.adoc[] * xref:manual/architecture.adoc[] * xref:manual/api.adoc[API] -** xref:manual/customloglevels.adoc[] +** xref:manual/api.adoc#loggers[Loggers] +*** xref:manual/eventlogging.adoc[] +*** xref:manual/resource-logger.adoc[] +*** xref:manual/simple-logger.adoc[] +*** xref:manual/status-logger.adoc[] ** xref:manual/logbuilder.adoc[] -** xref:manual/markers.adoc[] -** xref:manual/scoped-context.adoc[] -** xref:manual/thread-context.adoc[] +** xref:manual/api.adoc#fish-tagging[Fish tagging] +*** xref:manual/customloglevels.adoc[] +*** xref:manual/markers.adoc[] +*** xref:manual/scoped-context.adoc[] +*** xref:manual/thread-context.adoc[] ** xref:manual/messages.adoc[] ** xref:manual/flowtracing.adoc[] -** xref:manual/eventlogging.adoc[] -** xref:manual/resource-logger.adoc[] -** xref:manual/simple-logger.adoc[] -** xref:manual/status-logger.adoc[] * Configuration ** xref:manual/configuration.adoc[Configuration file] ** xref:manual/systemproperties.adoc[]
(logging-log4j2) branch 2.x updated: Add Simple Logger and Status Logger pages (#2619)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new f29c8db905 Add Simple Logger and Status Logger pages (#2619) f29c8db905 is described below commit f29c8db905929d628c83f2497079032e9d2ed30c Author: Volkan Yazıcı AuthorDate: Mon May 27 20:04:27 2024 +0200 Add Simple Logger and Status Logger pages (#2619) --- src/site/antora/modules/ROOT/nav.adoc | 2 + src/site/antora/modules/ROOT/pages/faq.adoc| 6 +- .../antora/modules/ROOT/pages/log4j-jmx-gui.adoc | 2 +- src/site/antora/modules/ROOT/pages/manual/api.adoc | 25 - .../modules/ROOT/pages/manual/appenders.adoc | 8 +- .../modules/ROOT/pages/manual/configuration.adoc | 11 ++- src/site/antora/modules/ROOT/pages/manual/jmx.adoc | 4 +- .../antora/modules/ROOT/pages/manual/logsep.adoc | 2 +- .../antora/modules/ROOT/pages/manual/scripts.adoc | 2 +- .../modules/ROOT/pages/manual/simple-logger.adoc | 34 +++ .../modules/ROOT/pages/manual/status-logger.adoc | 107 + .../ROOT/pages/manual/systemproperties.adoc| 53 +++--- .../properties-log4j-core-misc.adoc| 2 +- .../systemproperties/properties-provider.adoc | 2 +- 14 files changed, 200 insertions(+), 60 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index 65d5a8bb34..fd9e3eefae 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -42,6 +42,8 @@ ** xref:manual/flowtracing.adoc[] ** xref:manual/eventlogging.adoc[] ** xref:manual/resource-logger.adoc[] +** xref:manual/simple-logger.adoc[] +** xref:manual/status-logger.adoc[] * Configuration ** xref:manual/configuration.adoc[Configuration file] ** xref:manual/systemproperties.adoc[] diff --git a/src/site/antora/modules/ROOT/pages/faq.adoc b/src/site/antora/modules/ROOT/pages/faq.adoc index 64dc81f017..418d0dc229 100644 --- a/src/site/antora/modules/ROOT/pages/faq.adoc +++ b/src/site/antora/modules/ROOT/pages/faq.adoc @@ -126,11 +126,11 @@ By default, Log4j looks for a configuration file named `log4j2.xml` on the class Note the `2` in the file name! (See xref:manual/configuration.adoc[the Configuration page] for more details.) -. Increase the logging verbosity of the internal status logger: + +. Increase the logging verbosity of the internal xref:manual/status-logger.adoc[]: + `-Dlog4j2.statusLoggerLevel=TRACE` . Enable all internal debug logging: `-Dlog4j2.debug`. -This disables level-based status logger filtering and effectively allows all status logs. +This disables level-based xref:manual/status-logger.adoc[] filtering and effectively allows all status logs. [#separate_log_files] == How do I dynamically write to separate log files? @@ -156,7 +156,7 @@ It is the responsibility of the logging _implementation_ to handle this object, * Log4j 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. -* Log4j API supports xref:manual/api.adoc#LambdaSupport[lambda expressions] both in its plain and fluent API. +* Log4j API supports xref:manual/api.adoc#fluent-api[lambda expressions] both in its plain and fluent API. * Log4j API has better support for xref:manual/garbagefree.adoc[garbage-free logging]: it avoids creating `vararg` arrays and avoids creating ``String``s when logging ``CharSequence``s. [#gc-free-slf4j] diff --git a/src/site/antora/modules/ROOT/pages/log4j-jmx-gui.adoc b/src/site/antora/modules/ROOT/pages/log4j-jmx-gui.adoc index 4dd0239289..47f2c4e7bb 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-jmx-gui.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-jmx-gui.adoc @@ -16,7 +16,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more = Log4j JMX GUI -https://github.com/apache/logging-log4j-jmx-gui[The Apache Log4j JMX GUI] is a basic client GUI that can be used to monitor the `StatusLogger` output and to remotely modify the Log4j configuration. +https://github.com/apache/logging-log4j-jmx-gui[The Apache Log4j JMX GUI] is a basic client GUI that can be used to monitor the xref:manual/status-logger.adoc[] output and to remotely modify the Log4j configuration. The client GUI can be run as a stand-alone application or as a JConsole plug-in. [NOTE] diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc index a5edfcd650..0530e16cd3 100644 --- a/src/site/antora/modules/ROOT/pages/manual/api.adoc +++ b/src/site/antora/modules/ROOT
(logging-log4j2) branch doc/2.x/simple-and-status-logger deleted (was 9a2815bb87)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/simple-and-status-logger in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git was 9a2815bb87 Apply review feedback The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
(logging-log4j2) branch doc/2.x/simple-and-status-logger updated (0803d4cf72 -> 9a2815bb87)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/simple-and-status-logger in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 0803d4cf72 Add links add 9a2815bb87 Apply review feedback No new revisions were added by this update. Summary of changes: src/site/antora/modules/ROOT/pages/manual/api.adoc | 2 +- .../modules/ROOT/pages/manual/simple-logger.adoc | 5 ++ .../ROOT/pages/manual/systemproperties.adoc| 53 ++ 3 files changed, 20 insertions(+), 40 deletions(-)
(logging-log4j2) branch doc/2.x/simple-and-status-logger updated: Add links
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/simple-and-status-logger in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/doc/2.x/simple-and-status-logger by this push: new 0803d4cf72 Add links 0803d4cf72 is described below commit 0803d4cf72de31602bed402c5e33257d02c46841 Author: Volkan Yazıcı AuthorDate: Mon May 27 12:58:58 2024 +0200 Add links --- src/site/antora/modules/ROOT/pages/faq.adoc | 4 ++-- src/site/antora/modules/ROOT/pages/log4j-jmx-gui.adoc | 2 +- src/site/antora/modules/ROOT/pages/manual/appenders.adoc | 8 +--- src/site/antora/modules/ROOT/pages/manual/configuration.adoc | 11 ++- src/site/antora/modules/ROOT/pages/manual/jmx.adoc| 4 ++-- src/site/antora/modules/ROOT/pages/manual/logsep.adoc | 2 +- src/site/antora/modules/ROOT/pages/manual/scripts.adoc| 2 +- .../antora/modules/ROOT/pages/manual/systemproperties.adoc| 10 +- .../manual/systemproperties/properties-log4j-core-misc.adoc | 2 +- .../partials/manual/systemproperties/properties-provider.adoc | 2 +- 10 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/faq.adoc b/src/site/antora/modules/ROOT/pages/faq.adoc index 5ec5661f32..418d0dc229 100644 --- a/src/site/antora/modules/ROOT/pages/faq.adoc +++ b/src/site/antora/modules/ROOT/pages/faq.adoc @@ -126,11 +126,11 @@ By default, Log4j looks for a configuration file named `log4j2.xml` on the class Note the `2` in the file name! (See xref:manual/configuration.adoc[the Configuration page] for more details.) -. Increase the logging verbosity of the internal status logger: + +. Increase the logging verbosity of the internal xref:manual/status-logger.adoc[]: + `-Dlog4j2.statusLoggerLevel=TRACE` . Enable all internal debug logging: `-Dlog4j2.debug`. -This disables level-based status logger filtering and effectively allows all status logs. +This disables level-based xref:manual/status-logger.adoc[] filtering and effectively allows all status logs. [#separate_log_files] == How do I dynamically write to separate log files? diff --git a/src/site/antora/modules/ROOT/pages/log4j-jmx-gui.adoc b/src/site/antora/modules/ROOT/pages/log4j-jmx-gui.adoc index 4dd0239289..47f2c4e7bb 100644 --- a/src/site/antora/modules/ROOT/pages/log4j-jmx-gui.adoc +++ b/src/site/antora/modules/ROOT/pages/log4j-jmx-gui.adoc @@ -16,7 +16,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more = Log4j JMX GUI -https://github.com/apache/logging-log4j-jmx-gui[The Apache Log4j JMX GUI] is a basic client GUI that can be used to monitor the `StatusLogger` output and to remotely modify the Log4j configuration. +https://github.com/apache/logging-log4j-jmx-gui[The Apache Log4j JMX GUI] is a basic client GUI that can be used to monitor the xref:manual/status-logger.adoc[] output and to remotely modify the Log4j configuration. The client GUI can be run as a stand-alone application or as a JConsole plug-in. [NOTE] diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc index 8d01cbc73a..59d2ad03f9 100644 --- a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc @@ -1671,7 +1671,9 @@ Each log event is sent as a Kafka record. |syncSend |boolean -|The default is `true`, causing sends to block until the record has been acknowledged by the Kafka server. When set to `false`, sends a return immediately, allowing for lower latency and significantly higher throughput. _New since 2.8. Be aware that this is a new addition, and it has not been extensively tested. Any failure sending to Kafka will be reported as an error to StatusLogger and the log event will be dropped (the ignoreExceptions parameter will not be effective). Log events may [...] +|The default is `true`, causing sends to block until the record has been acknowledged by the Kafka server. When set to `false`, sends a return immediately, allowing for lower latency and significantly higher throughput. _New since 2.8. Be aware that this is a new addition, and it has not been extensively tested. +Any failure sending to Kafka will be reported as an error to xref:manual/status-logger.adoc[] and the log event will be dropped (the ignoreExceptions parameter will not be effective). +Log events may arrive out of order on the Kafka server._ |properties |Property[] @@ -2925,7 +2927,7 @@ 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 xref:manual/configuration.adoc#StatusMessages[status logger] +is printed to the xref:manual/status-logger.adoc[] at INFO level. Use this to do
(logging-log4j2) branch doc/2.x/simple-and-status-logger created (now 9e1d31294e)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch doc/2.x/simple-and-status-logger in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git at 9e1d31294e Add Simple Logger and Status Logger pages This branch includes the following new commits: new 9e1d31294e Add Simple Logger and Status Logger pages The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(logging-log4j2) 01/01: Add Simple Logger and Status Logger pages
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch doc/2.x/simple-and-status-logger in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 9e1d31294ebeb57faab2c6c0afbf0aae360a2417 Author: Volkan Yazıcı AuthorDate: Mon May 27 12:45:44 2024 +0200 Add Simple Logger and Status Logger pages --- src/site/antora/modules/ROOT/nav.adoc | 2 + src/site/antora/modules/ROOT/pages/faq.adoc| 2 +- src/site/antora/modules/ROOT/pages/manual/api.adoc | 25 - .../modules/ROOT/pages/manual/configuration.adoc | 4 +- .../modules/ROOT/pages/manual/simple-logger.adoc | 29 ++ .../modules/ROOT/pages/manual/status-logger.adoc | 107 + 6 files changed, 163 insertions(+), 6 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index 65d5a8bb34..fd9e3eefae 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -42,6 +42,8 @@ ** xref:manual/flowtracing.adoc[] ** xref:manual/eventlogging.adoc[] ** xref:manual/resource-logger.adoc[] +** xref:manual/simple-logger.adoc[] +** xref:manual/status-logger.adoc[] * Configuration ** xref:manual/configuration.adoc[Configuration file] ** xref:manual/systemproperties.adoc[] diff --git a/src/site/antora/modules/ROOT/pages/faq.adoc b/src/site/antora/modules/ROOT/pages/faq.adoc index 64dc81f017..5ec5661f32 100644 --- a/src/site/antora/modules/ROOT/pages/faq.adoc +++ b/src/site/antora/modules/ROOT/pages/faq.adoc @@ -156,7 +156,7 @@ It is the responsibility of the logging _implementation_ to handle this object, * Log4j 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. -* Log4j API supports xref:manual/api.adoc#LambdaSupport[lambda expressions] both in its plain and fluent API. +* Log4j API supports xref:manual/api.adoc#fluent-api[lambda expressions] both in its plain and fluent API. * Log4j API has better support for xref:manual/garbagefree.adoc[garbage-free logging]: it avoids creating `vararg` arrays and avoids creating ``String``s when logging ``CharSequence``s. [#gc-free-slf4j] diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc index a5edfcd650..fd179483ec 100644 --- a/src/site/antora/modules/ROOT/pages/manual/api.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc @@ -49,9 +49,10 @@ You can also check out xref:manual/installation.adoc[] for the complete installa Log4j API provides * A logging API that libraries and applications can code to +* xref:#simple-logger[A minimal logging implementation (aka. Simple logger)] * Adapter components to create a logging implementation -This page tries to cover the most prominent Log4j API features that libraries and applications can code to. +This page tries to cover the most prominent Log4j API features. [TIP] @@ -92,7 +93,7 @@ include::partial$manual/api-best-practice-use-supplier.adoc[] [#loggers] == Loggers -link:../javadoc/log4j-api/org/apache/logging/log4j/Logger.html[`Logger`]s obtained using link:../javadoc/log4j-api/org/apache/logging/log4j/LogManager.html[`LogManager`] is the primary entry point for logging. +link:../javadoc/log4j-api/org/apache/logging/log4j/Logger.html[`Logger`]s are the primary entry point for logging. In this section we will introduce you to further details about ``Logger``s. [#logger-names] @@ -220,7 +221,25 @@ link:../javadoc/log4j-api/org/apache/logging/log4j/LogManager.html[`EventLogger` xref:manual/eventlogging.adoc[Read more on event loggers...] -[#feature-fluent-api] +[#simple-logger] +=== Simple logger + +Even though Log4j Core is the reference implementation of Log4j API, Log4j API itself also provides a very minimalist implementation: _Simple Logger_. +This is a convenience for environments where either a fully-fledged logging implementation is missing, or cannot be included for other reasons. +`SimpleLogger` is the default Log4j API implementation if no other is available in the classpath. + +xref:manual/simple-logger.adoc[Read more on the simple logger...] + +[#status-logger] +=== Status logger + +_Status Logger_ is a standalone, self-sufficient `Logger` implementation to record events that occur in the logging system (i.e., Log4j) itself. +It is the logging system used by Log4j for reporting status of its internals. +Users can use the status logger to either emit logs in their custom Log4j components, or troubleshoot a Log4j configuration. + +xref:manual/status-logger.adoc[Read more on the status logger...] + +[#fluent-api] == Fluent API The fluent API allows you to log using
(logging-log4j2) branch main updated: Fix link
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/main by this push: new 5edfcc5f0f Fix link 5edfcc5f0f is described below commit 5edfcc5f0f1df43f68464f2ffc3b30872e2761ef Author: Volkan Yazıcı AuthorDate: Mon May 27 11:08:35 2024 +0200 Fix link --- src/site/antora/modules/ROOT/pages/manual/api.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc index 5a0a6bc1f5..8adac0d449 100644 --- a/src/site/antora/modules/ROOT/pages/manual/api.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc @@ -42,7 +42,7 @@ Log4j Core, {jul-link}, {logback-link} are the most well-known logging implement [TIP] Are you looking for a crash course on how to use Log4j in your application or library? -See xref:5min.adoc[]. +See xref:getting-started.adoc[]. You can also check out xref:manual/installation.adoc[] for the complete installation instructions.
(logging-log4j2) branch main updated (893ccfabfd -> 23e742b011)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from 893ccfabfd Update `net.bytebuddy:byte-buddy` to version `1.14.16` (#2608) add 23e742b011 Port changes from `2.x` No new revisions were added by this update. Summary of changes: src/site/antora/antora.tmpl.yml|2 + src/site/antora/antora.yml | 10 +- .../examples/manual/configuration/scripts.json | 65 + .../manual/configuration/scripts.properties| 72 + .../ROOT/examples/manual/configuration/scripts.xml | 71 + .../examples/manual/configuration/scripts.yaml | 72 + .../ROOT/examples/manual/filters/filters.json | 36 + .../filters.properties}| 32 +- .../{markers/log4j2.xml => filters/filters.xml}| 35 +- .../{markers/log4j2.yaml => filters/filters.yaml} | 31 +- .../examples/manual/markers/MarkerExample.java | 63 - .../ROOT/examples/manual/markers/log4j2.json | 31 - .../antora/modules/ROOT/images/LocationPerf.png| Bin 33266 -> 0 bytes src/site/antora/modules/ROOT/nav.adoc | 38 +- .../ROOT/pages/{5min.adoc => getting-started.adoc} | 365 ++-- .../modules/ROOT/pages/getting-started/index.adoc | 62 - src/site/antora/modules/ROOT/pages/index.adoc |5 +- src/site/antora/modules/ROOT/pages/javadoc.adoc|2 +- .../antora/modules/ROOT/pages/log4j-1.2-api.adoc | 15 +- .../antora/modules/ROOT/pages/log4j-flume-ng.adoc | 10 + src/site/antora/modules/ROOT/pages/log4j-jul.adoc | 59 +- .../modules/ROOT/pages/log4j-slf4j-impl.adoc | 10 +- .../modules/ROOT/pages/log4j-slf4j2-impl.adoc |9 + .../pages/log4j-spring-cloud-config-client.adoc| 75 +- .../modules/ROOT/pages/manual/appenders.adoc | 2014 ++-- .../modules/ROOT/pages/manual/architecture.adoc| 38 +- .../antora/modules/ROOT/pages/manual/cloud.adoc| 18 +- .../modules/ROOT/pages/manual/extending.adoc | 34 +- .../antora/modules/ROOT/pages/manual/filters.adoc | 251 +-- .../modules/ROOT/pages/manual/garbagefree.adoc | 23 +- .../antora/modules/ROOT/pages/manual/index.adoc|3 +- .../modules/ROOT/pages/manual/installation.adoc| 102 +- src/site/antora/modules/ROOT/pages/manual/jmx.adoc | 39 +- .../ROOT/pages/manual/json-template-layout.adoc|2 +- .../antora/modules/ROOT/pages/manual/layouts.adoc | 424 ++--- .../antora/modules/ROOT/pages/manual/lookups.adoc |8 +- .../modules/ROOT/pages/manual/migration.adoc |4 +- .../modules/ROOT/pages/manual/performance.adoc | 13 +- .../antora/modules/ROOT/pages/manual/scripts.adoc | 127 ++ .../modules/ROOT/partials/log4j-features.adoc | 23 +- ... api-best-practice-dont-use-string-concat.adoc} | 30 +- .../api-best-practice-dont-use-toString.adoc | 14 +- ...i-best-practice-exception-as-last-argument.adoc | 49 + .../modules/ROOT/partials/manual/api-intro.adoc| 72 + .../ROOT/partials/manual/async-trade-offs.adoc | 75 + .../manual/layouts-location-information.adoc |6 + .../properties-thread-context.adoc |6 +- 47 files changed, 2846 insertions(+), 1699 deletions(-) create mode 100644 src/site/antora/modules/ROOT/examples/manual/configuration/scripts.json create mode 100644 src/site/antora/modules/ROOT/examples/manual/configuration/scripts.properties create mode 100644 src/site/antora/modules/ROOT/examples/manual/configuration/scripts.xml create mode 100644 src/site/antora/modules/ROOT/examples/manual/configuration/scripts.yaml create mode 100644 src/site/antora/modules/ROOT/examples/manual/filters/filters.json copy src/site/antora/modules/ROOT/examples/manual/{markers/log4j2.properties => filters/filters.properties} (55%) copy src/site/antora/modules/ROOT/examples/manual/{markers/log4j2.xml => filters/filters.xml} (68%) copy src/site/antora/modules/ROOT/examples/manual/{markers/log4j2.yaml => filters/filters.yaml} (65%) delete mode 100644 src/site/antora/modules/ROOT/examples/manual/markers/MarkerExample.java delete mode 100644 src/site/antora/modules/ROOT/examples/manual/markers/log4j2.json delete mode 100644 src/site/antora/modules/ROOT/images/LocationPerf.png rename src/site/antora/modules/ROOT/pages/{5min.adoc => getting-started.adoc} (52%) delete mode 100644 src/site/antora/modules/ROOT/pages/getting-started/index.adoc create mode 100644 src/site/antora/modules/ROOT/pages/manual/scripts.adoc copy src/site/antora/modules/ROOT/partials/manual/{systemproperties/properties-jansi.adoc => api-best-practice-dont-use-string-concat.adoc} (55%) copy SECURITY.adoc => src/site/antora/modules/ROOT/partials/manual/api-best-practice-dont-use-toString.adoc (73%) create mode 100644 src/site/antora/modules/ROOT/par
(logging-log4j2) branch 2.x updated: Anchor fixes
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 7a99b243d2 Anchor fixes 7a99b243d2 is described below commit 7a99b243d22f31dd6952fcedab29a47340bf9acd Author: Volkan Yazıcı AuthorDate: Mon May 27 10:38:45 2024 +0200 Anchor fixes --- src/site/antora/modules/ROOT/pages/manual/async.adoc | 2 +- src/site/antora/modules/ROOT/pages/manual/configuration.adoc | 4 ++-- src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc| 3 ++- src/site/antora/modules/ROOT/pages/manual/resource-logger.adoc | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/manual/async.adoc b/src/site/antora/modules/ROOT/pages/manual/async.adoc index 464831d389..65d728c2ad 100644 --- a/src/site/antora/modules/ROOT/pages/manual/async.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/async.adoc @@ -245,7 +245,7 @@ include::example$manual/configuration/custom-wait-strategy.properties[lines=17.. [#Location] == Location information -xref:manual/layouts.adoc#location-information[Computing the location information (i.e., the caller class, method, file, and line number) of a log event is an expensive operation.] +xref:manual/layouts.adoc#LocationInformation[Computing the location information (i.e., the caller class, method, file, and line number) of a log event is an expensive operation.] The impact on asynchronous loggers and appenders is even higher, since the component must decide whether to compute it or not **before** crossing the asynchronous barrier. Hence, the location information is disabled by default for asynchronous loggers and appenders. In order to enable it for a certain logger, set its xref:manual/configuration.adoc#logger-attributes-includeLocation[`includeLocation`] attribute to `true`. diff --git a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc index 0b2c237303..6aa6b9ff5a 100644 --- a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc @@ -497,7 +497,7 @@ include::example$manual/configuration/loggers.properties[tags=loggers] In the example above, we have four logger configurations. They differ from each other regarding the level of log messages that they allow, whether -xref:manual/layouts.adoc#location-information[location information] +xref:manual/layouts.adoc#LocationInformation[location information] will be printed, and which appenders will be used. The table below summarizes the effects of each logger configuration: @@ -623,7 +623,7 @@ https://logging.apache.org/log4j/2.x/javadoc/log4j-api/org/apache/logging/log4j/ .withLocation()] methods. -See xref:manual/layouts.adoc#location-information[Location information] for more details. +See xref:manual/layouts.adoc#LocationInformation[Location information] for more details. [id=logger-elements-appenderrefs] Appender references diff --git a/src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc b/src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc index 707effd69e..bc2286da95 100644 --- a/src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc @@ -14,7 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. -= Event Logging + += Event Logger The `EventLogger` class provides a mechanism for logging significant events in an application using structured data. This approach is beneficial for diff --git a/src/site/antora/modules/ROOT/pages/manual/resource-logger.adoc b/src/site/antora/modules/ROOT/pages/manual/resource-logger.adoc index 90f5843b41..2283034f94 100644 --- a/src/site/antora/modules/ROOT/pages/manual/resource-logger.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/resource-logger.adoc @@ -15,7 +15,7 @@ limitations under the License. -= Resource Loggers += Resource Logger == ScopedResourceLogger
(logging-log4j2) branch 2.x updated: Fix duplicate location information
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 9e20756018 Fix duplicate location information 9e20756018 is described below commit 9e207560182a469949f5b860384b37a276b58804 Author: Volkan Yazıcı AuthorDate: Mon May 27 10:36:03 2024 +0200 Fix duplicate location information --- .../antora/modules/ROOT/pages/manual/layouts.adoc | 49 +- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/manual/layouts.adoc b/src/site/antora/modules/ROOT/pages/manual/layouts.adoc index 0ca8817484..45f7c19f38 100644 --- a/src/site/antora/modules/ROOT/pages/manual/layouts.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/layouts.adoc @@ -33,50 +33,10 @@ A custom character encoder was added to Log4j 2.4.1 for the ISO-8859-1 and US-AS [#common-concerns] == Common concerns -[#location-information] +[#LocationInformation] === Location information -Computing the location information of a logging statement is an expensive operation. -For this reason many Log4j components implement the -link:../javadoc/log4j-core/org/apache/logging/log4j/core/impl/LocationAware.html[LocationAware] -interface to only compute location information when needed. - -Some layouts implement `LocationAware` and they determine if a location information is required according to these rules: - -<>:: -+ -The GELF layout requires location information only if the pattern of the `messagePattern` requires location information. -+ -See <> below. - -<>:: -+ -The HTML layout requires location information if the <> configuration attribute is set to `true`. - -[[location-pattern-layout]]<>:: -+ -The pattern layout will require location information if at least one of these patterns is used: -+ -* <>, -* <>, -* <>, -* <>, -* <>. - -xref:manual/json-template-layout.adoc[JsonTemplateLayout]:: -+ -The JSON template layout will require location information if the -xref:manual/json-template-layout.adoc#locationInfoEnabled[locationInfoEnabled] -configuration attribute is set to `true`. - -The remaining layouts do not require location information. - -[NOTE] - -Even if a layout is configured not to **request** location information, it might use it if the information is already available. -This is always the case of information location computed at build time using the -link:/log4j/transform/latest/#log4j-transform-maven-plugin[Log4j Transform Maven Plugin]. - +include::partial$manual/layouts-location-information.adoc[] [#CSVLayouts] == CSV Layouts @@ -2320,8 +2280,3 @@ Custom fields are always last, in the order they are declared. The values support xref:manual/lookups.adoc[lookups]. NOTE: Additional xref:runtime-dependencies.adoc[runtime dependencies] are required for using YamlLayout. - -[#LocationInformation] -== Location information - -include::partial$manual/layouts-location-information.adoc[]
(logging-log4j2) 02/03: Redirect API-related pages to Log4j 2
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 6d2c4da069b31848ee96aaed2223bf0bd7820d52 Author: Volkan Yazıcı AuthorDate: Mon May 27 09:36:40 2024 +0200 Redirect API-related pages to Log4j 2 --- src/site/antora/antora.tmpl.yml| 1 + src/site/antora/antora.yml | 1 + src/site/antora/modules/ROOT/nav.adoc | 11 +- src/site/antora/modules/ROOT/pages/faq.adoc| 8 +- .../modules/ROOT/pages/manual/api-separation.adoc | 233 --- src/site/antora/modules/ROOT/pages/manual/api.adoc | 215 +++--- .../modules/ROOT/pages/manual/appenders.adoc | 10 +- .../modules/ROOT/pages/manual/architecture.adoc| 12 +- .../modules/ROOT/pages/manual/configuration.adoc | 2 +- .../modules/ROOT/pages/manual/customloglevels.adoc | 220 -- .../modules/ROOT/pages/manual/eventlogging.adoc| 251 .../modules/ROOT/pages/manual/extending.adoc | 2 +- .../modules/ROOT/pages/manual/flowtracing.adoc | 213 -- .../modules/ROOT/pages/manual/garbagefree.adoc | 4 +- .../antora/modules/ROOT/pages/manual/layouts.adoc | 6 +- .../modules/ROOT/pages/manual/logbuilder.adoc | 78 - .../antora/modules/ROOT/pages/manual/lookups.adoc | 4 +- .../antora/modules/ROOT/pages/manual/markers.adoc | 157 -- .../antora/modules/ROOT/pages/manual/messages.adoc | 326 - .../modules/ROOT/pages/manual/migration.adoc | 2 +- .../modules/ROOT/pages/manual/performance.adoc | 4 +- .../modules/ROOT/pages/manual/resource-logger.adoc | 88 -- .../modules/ROOT/pages/manual/scoped-context.adoc | 116 .../ROOT/pages/manual/systemproperties.adoc| 6 +- .../modules/ROOT/pages/manual/thread-context.adoc | 238 --- .../modules/ROOT/partials/log4j-features.adoc | 2 +- .../ROOT/partials/manual/async-drawbacks.adoc | 4 +- .../manual/systemproperties/properties-async.adoc | 4 +- .../properties-configuration-factory.adoc | 2 +- .../properties-garbage-collection.adoc | 4 +- .../systemproperties/properties-log-event.adoc | 6 +- .../properties-logger-context.adoc | 2 +- .../systemproperties/properties-message.adoc | 6 +- .../properties-thread-context.adoc | 4 +- .../partials/properties-garbage-collection.adoc| 6 +- .../ROOT/partials/properties-thread-context.adoc | 4 +- 36 files changed, 89 insertions(+), 2163 deletions(-) diff --git a/src/site/antora/antora.tmpl.yml b/src/site/antora/antora.tmpl.yml index 65e7d8d1a4..648a8109a9 100644 --- a/src/site/antora/antora.tmpl.yml +++ b/src/site/antora/antora.tmpl.yml @@ -46,6 +46,7 @@ asciidoc: java-target-version: "${maven.compiler.target}" java-compiler-version: "${minimalJavaBuildVersion}" logging-services-url: "https://logging.apache.org; +log4j2-url: "https://logging.apache.org/log4j/2.x; lmax-disruptor-url: "https://lmax-exchange.github.io/disruptor; # Dependency versions commons-logging-version: "${site-commons-logging.version}" diff --git a/src/site/antora/antora.yml b/src/site/antora/antora.yml index ce99130556..5cf5bb97e8 100644 --- a/src/site/antora/antora.yml +++ b/src/site/antora/antora.yml @@ -46,6 +46,7 @@ asciidoc: java-target-version: "17" java-compiler-version: "[17,18)" logging-services-url: "https://logging.apache.org; +log4j2-url: "https://logging.apache.org/log4j/2.x; lmax-disruptor-url: "https://lmax-exchange.github.io/disruptor; # Dependency versions commons-logging-version: "1.4.0" diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index 026d4b60b7..61c01232cb 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -31,15 +31,7 @@ * xref:manual/installation.adoc[] * xref:manual/architecture.adoc[] * xref:manual/migration.adoc[] -* xref:manual/api.adoc[] -** xref:manual/logbuilder.adoc[] -** xref:manual/flowtracing.adoc[] -** xref:manual/markers.adoc[] -** xref:manual/eventlogging.adoc[] -** xref:manual/messages.adoc[] -** xref:manual/thread-context.adoc[] -** xref:manual/scoped-context.adoc[] -** xref:manual/resource-logger.adoc[] +* xref:manual/api.adoc[API] * xref:manual/configuration.adoc[] * xref:manual/usage.adoc[] * xref:manual/cloud.adoc[] @@ -51,7 +43,6 @@ * xref:manual/extending.adoc[] * xref:manual/plugins.adoc[] * xref:manual/customconfig.adoc[] -* xref:manual/customloglevels.adoc[] * xref:manual/jmx.adoc[] * xref:manual/logsep.adoc[] * xref:manual/performance.adoc[] diff --git a/src/site/antora/modules/ROOT/pages/faq.adoc b/src/site/antora/modules/
(logging-log4j2) 03/03: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 96c22ef1543260cacbc10cd957a0c9d9a631434e Author: Volkan Yazıcı AuthorDate: Mon May 27 09:47:26 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 4c8abbdaf2..5377e5ba5e 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -90,6 +90,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-log4j2) branch main updated (e29b7eb902 -> 96c22ef154)
This is an automated email from the ASF dual-hosted git repository. vy pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git from e29b7eb902 Fix compilation error new c08972da4a Fix empty string handling for `TruncatingBufferedWriter` (#2609) new 6d2c4da069 Redirect API-related pages to Log4j 2 new 96c22ef154 Make links more visible The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: antora-playbook.yaml | 3 + .../json/util/TruncatingBufferedWriterTest.java| 8 + .../json/util/TruncatingBufferedWriter.java| 15 + src/site/antora/antora.tmpl.yml| 1 + src/site/antora/antora.yml | 1 + src/site/antora/modules/ROOT/nav.adoc | 11 +- src/site/antora/modules/ROOT/pages/faq.adoc| 8 +- .../modules/ROOT/pages/manual/api-separation.adoc | 233 --- src/site/antora/modules/ROOT/pages/manual/api.adoc | 215 +++--- .../modules/ROOT/pages/manual/appenders.adoc | 10 +- .../modules/ROOT/pages/manual/architecture.adoc| 12 +- .../modules/ROOT/pages/manual/configuration.adoc | 2 +- .../modules/ROOT/pages/manual/customloglevels.adoc | 220 -- .../modules/ROOT/pages/manual/eventlogging.adoc| 251 .../modules/ROOT/pages/manual/extending.adoc | 2 +- .../modules/ROOT/pages/manual/flowtracing.adoc | 213 -- .../modules/ROOT/pages/manual/garbagefree.adoc | 4 +- .../antora/modules/ROOT/pages/manual/layouts.adoc | 6 +- .../modules/ROOT/pages/manual/logbuilder.adoc | 78 - .../antora/modules/ROOT/pages/manual/lookups.adoc | 4 +- .../antora/modules/ROOT/pages/manual/markers.adoc | 157 -- .../antora/modules/ROOT/pages/manual/messages.adoc | 326 - .../modules/ROOT/pages/manual/migration.adoc | 2 +- .../modules/ROOT/pages/manual/performance.adoc | 4 +- .../modules/ROOT/pages/manual/resource-logger.adoc | 88 -- .../modules/ROOT/pages/manual/scoped-context.adoc | 116 .../ROOT/pages/manual/systemproperties.adoc| 6 +- .../modules/ROOT/pages/manual/thread-context.adoc | 238 --- .../modules/ROOT/partials/log4j-features.adoc | 2 +- .../ROOT/partials/manual/async-drawbacks.adoc | 4 +- .../manual/systemproperties/properties-async.adoc | 4 +- .../properties-configuration-factory.adoc | 2 +- .../properties-garbage-collection.adoc | 4 +- .../systemproperties/properties-log-event.adoc | 6 +- .../properties-logger-context.adoc | 2 +- .../systemproperties/properties-message.adoc | 6 +- .../properties-thread-context.adoc | 4 +- .../partials/properties-garbage-collection.adoc| 6 +- .../ROOT/partials/properties-thread-context.adoc | 4 +- 39 files changed, 115 insertions(+), 2163 deletions(-) delete mode 100644 src/site/antora/modules/ROOT/pages/manual/api-separation.adoc delete mode 100644 src/site/antora/modules/ROOT/pages/manual/customloglevels.adoc delete mode 100644 src/site/antora/modules/ROOT/pages/manual/eventlogging.adoc delete mode 100644 src/site/antora/modules/ROOT/pages/manual/flowtracing.adoc delete mode 100644 src/site/antora/modules/ROOT/pages/manual/logbuilder.adoc delete mode 100644 src/site/antora/modules/ROOT/pages/manual/markers.adoc delete mode 100644 src/site/antora/modules/ROOT/pages/manual/messages.adoc delete mode 100644 src/site/antora/modules/ROOT/pages/manual/resource-logger.adoc delete mode 100644 src/site/antora/modules/ROOT/pages/manual/scoped-context.adoc delete mode 100644 src/site/antora/modules/ROOT/pages/manual/thread-context.adoc
(logging-log4j2) 01/03: Fix empty string handling for `TruncatingBufferedWriter` (#2609)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit c08972da4a1a31536d518ffedb46cb24d7338589 Author: Brian Payne AuthorDate: Sun May 26 23:56:25 2024 -0700 Fix empty string handling for `TruncatingBufferedWriter` (#2609) Co-authored-by: Volkan Yazıcı --- .../template/json/util/TruncatingBufferedWriterTest.java | 8 .../template/json/util/TruncatingBufferedWriter.java | 15 +++ 2 files changed, 23 insertions(+) diff --git a/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriterTest.java b/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriterTest.java index 24e9a072c1..0ae57d59f6 100644 --- a/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriterTest.java +++ b/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriterTest.java @@ -38,12 +38,20 @@ class TruncatingBufferedWriterTest { writer.write(new char[] {Character.MIN_VALUE, Character.MAX_VALUE}); writer.write("foo"); writer.write("foobar", 3, 3); +writer.write("empty", 3, 0); writer.write(new char[] {'f', 'o', 'o', 'b', 'a', 'r', 'b', 'u', 'z', 'z'}, 6, 4); +writer.write(new char[] {'a', 'b', 'c'}, 0, 0); +writer.write(new char[] {}, 0, 0); +writer.write(new char[] {}); +writer.write("", 0, 0); +writer.write(""); writer.append('!'); writer.append("yo"); writer.append(null); writer.append("yo dog", 3, 6); writer.append(null, -1, -1); +writer.append("", -1, -1); +writer.append(""); // Verify accessors. final char[] expectedBuffer = new char[capacity]; diff --git a/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriter.java b/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriter.java index 44cf52d0e6..468c3df2dc 100644 --- a/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriter.java +++ b/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriter.java @@ -77,6 +77,11 @@ final class TruncatingBufferedWriter extends Writer implements CharSequence { // Check arguments. Objects.requireNonNull(source, "source"); + +if (source.length == 0) { +return; +} + if (offset < 0 || offset >= source.length) { throw new IndexOutOfBoundsException("invalid offset: " + offset); } @@ -126,6 +131,11 @@ final class TruncatingBufferedWriter extends Writer implements CharSequence { // Check arguments. Objects.requireNonNull(string, "string"); + +if (string.isEmpty()) { +return; +} + if (offset < 0 || offset >= string.length()) { throw new IndexOutOfBoundsException("invalid offset: " + offset); } @@ -168,6 +178,11 @@ final class TruncatingBufferedWriter extends Writer implements CharSequence { return this; } +// Short-circuit on empty sequence +if (seq.length() == 0) { +return this; +} + // Check arguments. if (start < 0 || start >= seq.length()) { throw new IndexOutOfBoundsException("invalid start: " + start);
(logging-log4j-transform) branch main updated: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-transform.git The following commit(s) were added to refs/heads/main by this push: new 6a7688a Make links more visible 6a7688a is described below commit 6a7688aa868533a17c146999c387bef536500dd8 Author: Volkan Yazıcı AuthorDate: Mon May 27 09:53:25 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 21775ef..3448486 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -77,6 +77,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-log4j-jakarta) branch main updated: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-jakarta.git The following commit(s) were added to refs/heads/main by this push: new 4ea1ffb Make links more visible 4ea1ffb is described below commit 4ea1ffb274cb4e2d77785ea04ace7dd5689721d0 Author: Volkan Yazıcı AuthorDate: Mon May 27 09:52:58 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index b85ba9c..29eed2c 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -77,6 +77,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-log4j-kotlin) branch main updated: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-kotlin.git The following commit(s) were added to refs/heads/main by this push: new dc7beac Make links more visible dc7beac is described below commit dc7beacc4dcaac2958a14706d124bd37dad476c9 Author: Volkan Yazıcı AuthorDate: Mon May 27 09:52:05 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index dfe7bfe..4f8d956 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -77,6 +77,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-log4j-jmx-gui) branch main updated: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-jmx-gui.git The following commit(s) were added to refs/heads/main by this push: new 6b7e834 Make links more visible 6b7e834 is described below commit 6b7e8346ebf13ce7a059ba6f1bb370607fe0d579 Author: Volkan Yazıcı AuthorDate: Mon May 27 09:52:28 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 49d4808..228b495 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -77,6 +77,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-log4j-scala) branch main updated: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-scala.git The following commit(s) were added to refs/heads/main by this push: new 2da38b0 Make links more visible 2da38b0 is described below commit 2da38b08643084a60bf2279805ae310167bd6216 Author: Volkan Yazıcı AuthorDate: Mon May 27 09:51:37 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 4c0688b..660b911 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -77,6 +77,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-log4j-tools) branch main-site-pro updated: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-site-pro in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git The following commit(s) were added to refs/heads/main-site-pro by this push: new ccb9e30 Make links more visible ccb9e30 is described below commit ccb9e30fe4a0fcd5003e72c7f03e4375b0c139f9 Author: Volkan Yazıcı AuthorDate: Mon May 27 09:49:05 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index ccbb71e..4704a5f 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -77,6 +77,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-log4j-tools) branch main updated: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git The following commit(s) were added to refs/heads/main by this push: new 0ee9c4b Make links more visible 0ee9c4b is described below commit 0ee9c4bbd249194487d98c9a48a730638a04d3b3 Author: Volkan Yazıcı AuthorDate: Mon May 27 09:49:05 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index ccbb71e..4704a5f 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -77,6 +77,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-parent) branch main-site-pro updated: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main-site-pro in repository https://gitbox.apache.org/repos/asf/logging-parent.git The following commit(s) were added to refs/heads/main-site-pro by this push: new 9807a87 Make links more visible 9807a87 is described below commit 9807a8786aabe3ed18bdbc90316b85fa07b8ca9f Author: Volkan Yazıcı AuthorDate: Mon May 27 09:48:08 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 4b83b60..463cfc5 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -77,6 +77,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-parent) branch main updated: Make links more visible
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/logging-parent.git The following commit(s) were added to refs/heads/main by this push: new dcf5881 Make links more visible dcf5881 is described below commit dcf5881d6f40a55adf180b07ec35c244f765b1c4 Author: Volkan Yazıcı AuthorDate: Mon May 27 09:48:08 2024 +0200 Make links more visible --- antora-playbook.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/antora-playbook.yaml b/antora-playbook.yaml index 4b83b60..463cfc5 100644 --- a/antora-playbook.yaml +++ b/antora-playbook.yaml @@ -77,6 +77,9 @@ ui: .doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; } .doc pre { font-size: 0.7rem; } .doc .colist { font-size: 0.75rem; } + /* Make links more visible: */ + .doc a { text-decoration: underline; } + .doc a code { text-decoration: underline; color: #1565c0; } /* Tab header fonts aren't rendered good, adjusting the font weight: */ .tablist > ul li { font-weight: 500; } /* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
(logging-log4j2) branch 2.x updated: Fix empty string handling for `TruncatingBufferedWriter` (#2609)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git The following commit(s) were added to refs/heads/2.x by this push: new 8ccc130aad Fix empty string handling for `TruncatingBufferedWriter` (#2609) 8ccc130aad is described below commit 8ccc130aad9eab6f26969d8d575366d5c8523c07 Author: Brian Payne AuthorDate: Sun May 26 23:56:25 2024 -0700 Fix empty string handling for `TruncatingBufferedWriter` (#2609) Co-authored-by: Volkan Yazıcı --- .../template/json/util/TruncatingBufferedWriterTest.java | 8 .../template/json/util/TruncatingBufferedWriter.java | 15 +++ .../fix-TruncatingBufferedWriter-empty-input-handling.xml | 8 3 files changed, 31 insertions(+) diff --git a/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriterTest.java b/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriterTest.java index 24e9a072c1..0ae57d59f6 100644 --- a/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriterTest.java +++ b/log4j-layout-template-json-test/src/test/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriterTest.java @@ -38,12 +38,20 @@ class TruncatingBufferedWriterTest { writer.write(new char[] {Character.MIN_VALUE, Character.MAX_VALUE}); writer.write("foo"); writer.write("foobar", 3, 3); +writer.write("empty", 3, 0); writer.write(new char[] {'f', 'o', 'o', 'b', 'a', 'r', 'b', 'u', 'z', 'z'}, 6, 4); +writer.write(new char[] {'a', 'b', 'c'}, 0, 0); +writer.write(new char[] {}, 0, 0); +writer.write(new char[] {}); +writer.write("", 0, 0); +writer.write(""); writer.append('!'); writer.append("yo"); writer.append(null); writer.append("yo dog", 3, 6); writer.append(null, -1, -1); +writer.append("", -1, -1); +writer.append(""); // Verify accessors. final char[] expectedBuffer = new char[capacity]; diff --git a/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriter.java b/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriter.java index 44cf52d0e6..468c3df2dc 100644 --- a/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriter.java +++ b/log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/util/TruncatingBufferedWriter.java @@ -77,6 +77,11 @@ final class TruncatingBufferedWriter extends Writer implements CharSequence { // Check arguments. Objects.requireNonNull(source, "source"); + +if (source.length == 0) { +return; +} + if (offset < 0 || offset >= source.length) { throw new IndexOutOfBoundsException("invalid offset: " + offset); } @@ -126,6 +131,11 @@ final class TruncatingBufferedWriter extends Writer implements CharSequence { // Check arguments. Objects.requireNonNull(string, "string"); + +if (string.isEmpty()) { +return; +} + if (offset < 0 || offset >= string.length()) { throw new IndexOutOfBoundsException("invalid offset: " + offset); } @@ -168,6 +178,11 @@ final class TruncatingBufferedWriter extends Writer implements CharSequence { return this; } +// Short-circuit on empty sequence +if (seq.length() == 0) { +return this; +} + // Check arguments. if (start < 0 || start >= seq.length()) { throw new IndexOutOfBoundsException("invalid start: " + start); diff --git a/src/changelog/.2.x.x/fix-TruncatingBufferedWriter-empty-input-handling.xml b/src/changelog/.2.x.x/fix-TruncatingBufferedWriter-empty-input-handling.xml new file mode 100644 index 00..eaeae53f39 --- /dev/null +++ b/src/changelog/.2.x.x/fix-TruncatingBufferedWriter-empty-input-handling.xml @@ -0,0 +1,8 @@ + +http://www.w3.org/2001/XMLSchema-instance; + xmlns="https://logging.apache.org/xml/ns; + xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd; + type="fixed"> + https://github.com/apache/logging-log4j2/pull/2609"/> + Fix empty string handling for `TruncatingBufferedWriter` +
(logging-log4j2) 03/05: Remove redundant navigation items
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit e42bc4d1bd33988200ff6b9bfe6d292c009620b4 Author: Volkan Yazıcı AuthorDate: Fri May 24 10:24:27 2024 +0200 Remove redundant navigation items --- src/site/antora/modules/ROOT/nav.adoc | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/site/antora/modules/ROOT/nav.adoc b/src/site/antora/modules/ROOT/nav.adoc index fa0e44e630..65d5a8bb34 100644 --- a/src/site/antora/modules/ROOT/nav.adoc +++ b/src/site/antora/modules/ROOT/nav.adoc @@ -64,12 +64,6 @@ * xref:javadoc.adoc[Java API reference] .Components -* xref:log4j-api.adoc[] -* xref:log4j-1.2-api.adoc[] -* xref:log4j-slf4j-impl.adoc[] -* xref:log4j-jul.adoc[] -* xref:log4j-jpl.adoc[] -* xref:log4j-to-slf4j.adoc[] * xref:log4j-flume-ng.adoc[] * xref:log4j-mongodb3.adoc[] * xref:log4j-mongodb4.adoc[]
(logging-log4j2) 04/05: Remove `runtime-dependencies.adoc`
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit 4426dd471eb5dcf2e109e87806205537794466e4 Author: Volkan Yazıcı AuthorDate: Fri May 24 10:28:17 2024 +0200 Remove `runtime-dependencies.adoc` Its content is outdated, and covered in `installation.adoc` and elsewhere in the site. --- .../modules/ROOT/pages/runtime-dependencies.adoc | 270 - src/site/resources/.htaccess | 3 + 2 files changed, 3 insertions(+), 270 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/runtime-dependencies.adoc b/src/site/antora/modules/ROOT/pages/runtime-dependencies.adoc deleted file mode 100644 index 5009374a06..00 --- a/src/site/antora/modules/ROOT/pages/runtime-dependencies.adoc +++ /dev/null @@ -1,270 +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. - -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/Fas
(logging-log4j2) 05/05: Rewrite `thread-context.adoc` et al. (#2535)
This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git commit fefd16b7e6fccbab8b3b7b0f29675e0d6005989f Author: Volkan Yazıcı AuthorDate: Fri May 24 13:30:44 2024 +0200 Rewrite `thread-context.adoc` et al. (#2535) --- src/site/antora/modules/ROOT/pages/manual/api.adoc | 30 ++- .../modules/ROOT/pages/manual/extending.adoc | 26 -- .../modules/ROOT/pages/manual/garbagefree.adoc | 3 +- .../modules/ROOT/pages/manual/thread-context.adoc | 271 +++-- .../properties-thread-context.adoc | 3 + 5 files changed, 114 insertions(+), 219 deletions(-) diff --git a/src/site/antora/modules/ROOT/pages/manual/api.adoc b/src/site/antora/modules/ROOT/pages/manual/api.adoc index 4b46a776ef..a5edfcd650 100644 --- a/src/site/antora/modules/ROOT/pages/manual/api.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc @@ -239,7 +239,7 @@ xref:manual/logbuilder.adoc[Read more on the Fluent API...] [#fish-tagging] == Fish tagging -Just as a fish can be tagged and have its movement tracked (aka. _fish tagging_), stamping log events with a common tag or set of data +Just as a fish can be tagged and have its movement tracked (aka. _fish tagging_ footnote:[Fish tagging is first described by Neil Harrison in the _"Patterns for Logging Diagnostic Messages"_ chapter of https://dl.acm.org/doi/10./273448[_"Pattern Languages of Program Design 3"_ edited by R. Martin, D. Riehle, and F. Buschmann in 1997].]), stamping log events with a common tag or set of data elements allows the complete flow of a transaction or a request to be tracked. You can use them for several purposes, such as: @@ -283,7 +283,7 @@ xref:manual/markers.adoc[Read more on markers...] [#scoped-context] === Scoped Context -Just like a https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/ScopedValue.html[Java's `ScopedValue`], in Scoped Context, the visibility of tags are associated with the block they were introduced: +Just like a https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/ScopedValue.html[Java's `ScopedValue`], _Scoped Context_ facilitates associating information with a certain block of code and makings this accessible to the rest of the logging system: [source,java] @@ -317,8 +317,13 @@ xref:manual/scoped-context.adoc[Read more on Scoped Context...] [#thread-context] === Thread Context -Just like https://docs.oracle.com/javase/8/docs/api/java/lang/ThreadLocal.html[Java's `ThreadLocal`], in Thread Context, the visibility of tags are associated with the thread they were introduced. -Thread Context offers both a map-structured, called _Mapped Diagnostic Context (MDC)_, and a stack-structured, called _Nested Diagnostic Context (NDC)_, storage: +Just like https://docs.oracle.com/javase/8/docs/api/java/lang/ThreadLocal.html[Java's `ThreadLocal`], _Thread Context_ facilitates associating information with the executing thread and making this information accessible to the rest of the logging system. +Thread Context offers both + +* map-structured – referred to as _Thread Context Map_ or _Mapped Diagnostic Context (MDC)_ +* stack-structured – referred to as _Thread Context Stack_ or _Nested Diagnostic Context (NDC)_ + +storage: [source,java] @@ -326,13 +331,22 @@ ThreadContext.put("ipAddress", request.getRemoteAddr()); // <1> ThreadContext.put("hostName", request.getServerName()); // <1> ThreadContext.put("loginId", session.getAttribute("loginId")); // <1> -ThreadContext.push("performWork()"); // <2> +void performWork() { +ThreadContext.push("performWork()"); // <2> + +LOGGER.debug("Performing work"); // <3> +// Perform the work + +ThreadContext.pop(); // <4> +} -LOGGER.debug("Performing work"); // <3> +ThreadContext.clear(); // <5> -<1> Associating properties with the logging context map of the thread -<2> Pushing properties to the logging context stack of the thread +<1> Adding properties to the thread context map +<2> Pushing properties to the thread context stack <3> Added properties can later on be used to, for instance, filter the log event, provide extra information in the layout, etc. +<4> Popping the last pushed property from the thread context stack +<5> Clearing the thread context (for both stack and map!) [CAUTION] diff --git a/src/site/antora/modules/ROOT/pages/manual/extending.adoc b/src/site/antora/modules/ROOT/pages/manual/extending.adoc index f44af434b6..432d6768c1 100644 --- a/src/site/antora/modules/ROOT/pages/manual/extending.adoc +++ b/src/site/antora/modules/ROOT/pages/manual/extending.adoc @@ -580,32 +580,6 @@ ListAppender list1 = Li