You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2023/10/06 07:57:35 UTC
[logging-log4j2] branch release/2.21.0 updated (a51955359a -> b0413d5bc7)
This is an automated email from the ASF dual-hosted git repository.
vy pushed a change to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
from a51955359a Exclude Velocity vulnerability
new 017b30d8a2 Fix the `disableAnsi` default value docs (#1537)
new 0247e0282f Replaced the usage of `System.out` in `StackLocator` with `System.err` (#1484)
new b8d08c40bf Restored `Log4jMarker` visibility in SLF4J adapters (#1414)
new af88da7cb9 Use Java version-specific warnings in `StackLocator` (#1760)
new bdd1c792e2 Add changelog entry (#1760)
new d2d351cb61 Update old changelog XSDs
new 66bc65079c Propagate synchronous action failures in `RollingFileManager` and `FileRenameAction` (#1445, #1549)
new 6ddb5445ae Added changelog entry (#1445, #1549)
new c971b2cc94 Warn on incorrect highlight style (#1545, #1637)
new 431d5cc7d8 Improve changelog (#1545, #1637)
new b45978419c Improve warning message if multi-release JARs are not supported (#1833, #1760)
new 7f5db1ba98 Remove unpublished modules from BOM
new b0413d5bc7 Merge remote-tracking branch 'origin/release/2.21.0' into release/2.21.0
The 13 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:
log4j-parent/pom.xml | 16 +++++++
pom.xml | 12 -----
.../.2.x.x/1231_validation_path_condition.xml | 2 +-
.../.2.x.x/1232_log4j-to-sfl4j-2-OSGiMetadata.xml | 2 +-
.../.2.x.x/1312_add_environment_arbiter.xml | 2 +-
...1367_Missing-Bundle-Activation-OSGiMetadata.xml | 2 +-
.../.2.x.x/1369_bump_build_requirement_jdk_11.xml | 2 +-
...1445_1549_fix_sync_roll_action_propagation.xml} | 9 ++--
.../.2.x.x/1484_fix_StackLocator_stdout.xml | 2 +-
...e_of_incorrect_syntax_of_highlighting_style.xml | 15 +++---
src/changelog/.2.x.x/1589_mongodb_tests.xml | 2 +-
.../.2.x.x/1640_java_9_stack_trace_element.xml | 2 +-
src/changelog/.2.x.x/1646_unsafe_cleaner.xml | 2 +-
.../.2.x.x/1650_fix_rollover_strategy_log4j1.xml | 2 +-
.../.2.x.x/1681_fix_and_improve_lookup_docs.xml | 2 +-
.../.2.x.x/1692_make_JTL_LocationAware.xml | 2 +-
.../1747_mongodb4-long-collection-size-conifg.xml | 2 +-
..._version_specific_warnings_in_StackLocator.xml} | 7 +--
src/site/_release-notes/_2.x.x.adoc | 54 ++++++++++++++++++++++
.../scala-api.html => release-notes/index.html} | 8 ++--
src/site/site.xml | 2 +-
21 files changed, 104 insertions(+), 45 deletions(-)
copy src/changelog/.2.x.x/{1445_fix_synchronous_rolling_file_manager.xml => 1445_1549_fix_sync_roll_action_propagation.xml} (78%)
copy src/changelog/.2.x.x/{1414_restore_SLF4J_Log4jMarker_visibility.xml => 1760_use_java_version_specific_warnings_in_StackLocator.xml} (81%)
copy src/site/resources/{manual/scala-api.html => release-notes/index.html} (74%)
[logging-log4j2] 12/13: Remove unpublished modules from BOM
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 7f5db1ba98dcc7e11f8aa6623caed67a03684e1a
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Fri Oct 6 09:47:29 2023 +0200
Remove unpublished modules from BOM
---
log4j-parent/pom.xml | 16 ++++++++++++++++
pom.xml | 12 ------------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
index bd197f90a4..f214f91847 100644
--- a/log4j-parent/pom.xml
+++ b/log4j-parent/pom.xml
@@ -154,6 +154,22 @@
<dependencyManagement>
<dependencies>
+ <!-- BEGIN: Modules that are not published (and hence missing in the BOM) -->
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-osgi</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-layout-template-json-test</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- END: Modules that are not published (and hence missing in the BOM) -->
+
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-bom</artifactId>
diff --git a/pom.xml b/pom.xml
index de9a2eb9f8..7f6051a211 100644
--- a/pom.xml
+++ b/pom.xml
@@ -587,12 +587,6 @@
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-layout-template-json-test</artifactId>
- <version>${project.version}</version>
- </dependency>
-
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-mongodb3</artifactId>
@@ -605,12 +599,6 @@
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-osgi</artifactId>
- <version>${project.version}</version>
- </dependency>
-
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
[logging-log4j2] 01/13: Fix the `disableAnsi` default value docs (#1537)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 017b30d8a25ad7bc588748b19dfe4bc330f277fa
Author: Petr Bodnár <p....@centrum.cz>
AuthorDate: Thu Oct 5 14:03:01 2023 +0200
Fix the `disableAnsi` default value docs (#1537)
The default value of the disableAnsi parameter (attribute) was changed for Windows
by https://issues.apache.org/jira/browse/LOG4J2-2087. But the user documentation
was not updated appropriately.
---
src/site/xdoc/manual/layouts.xml.vm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/site/xdoc/manual/layouts.xml.vm b/src/site/xdoc/manual/layouts.xml.vm
index 899997220c..c12b11fef4 100644
--- a/src/site/xdoc/manual/layouts.xml.vm
+++ b/src/site/xdoc/manual/layouts.xml.vm
@@ -805,7 +805,9 @@ WARN [main]: Message 2</pre>
<tr>
<td>disableAnsi</td>
<td>boolean</td>
- <td>If <code>true</code> (default is false), do not output ANSI escape codes.</td>
+ <td>If <code>true</code>, do not output ANSI escape codes. Parameter default value is platform dependent.
+ If run on Windows, it defaults to <code>true</code>, unless system property <code>log4j.skipJansi</code>
+ is set to <code>false</code>. On other platforms, it defaults to <code>false</code>.</td>
</tr>
<tr>
<td>noConsoleNoAnsi</td>
[logging-log4j2] 03/13: Restored `Log4jMarker` visibility in SLF4J adapters (#1414)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit b8d08c40bf39ace58c02b39ea397793e0361985f
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Oct 5 14:45:53 2023 +0200
Restored `Log4jMarker` visibility in SLF4J adapters (#1414)
---
.../java/org/apache/logging/slf4j/Log4jMarker.java | 2 +-
.../java/org/apache/logging/slf4j/Log4jMarker.java | 2 +-
.../1414_restore_SLF4J_Log4jMarker_visibility.xml | 26 ++++++++++++++++++++++
src/site/_release-notes/_2.x.x.adoc | 1 +
4 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java b/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java
index 64e5fe1993..8379780e52 100644
--- a/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java
+++ b/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java
@@ -29,7 +29,7 @@ import org.slf4j.Marker;
/**
* Log4j/SLF4J {@link Marker} type bridge.
*/
-class Log4jMarker implements Marker {
+public class Log4jMarker implements Marker {
public static final long serialVersionUID = 1590472L;
diff --git a/log4j-slf4j2-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java b/log4j-slf4j2-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java
index 64e5fe1993..8379780e52 100644
--- a/log4j-slf4j2-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java
+++ b/log4j-slf4j2-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java
@@ -29,7 +29,7 @@ import org.slf4j.Marker;
/**
* Log4j/SLF4J {@link Marker} type bridge.
*/
-class Log4jMarker implements Marker {
+public class Log4jMarker implements Marker {
public static final long serialVersionUID = 1590472L;
diff --git a/src/changelog/.2.x.x/1414_restore_SLF4J_Log4jMarker_visibility.xml b/src/changelog/.2.x.x/1414_restore_SLF4J_Log4jMarker_visibility.xml
new file mode 100644
index 0000000000..4bc5517ddc
--- /dev/null
+++ b/src/changelog/.2.x.x/1414_restore_SLF4J_Log4jMarker_visibility.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
+ type="fixed">
+ <issue id="1414" link="https://github.com/apache/logging-log4j2/issues/1414"/>
+ <author id="github:ppkarwasz"/>
+ <author id="github:vy"/>
+ <description format="asciidoc">Restored `Log4jMarker` visibility in SLF4J adapters</description>
+</entry>
diff --git a/src/site/_release-notes/_2.x.x.adoc b/src/site/_release-notes/_2.x.x.adoc
index bcc9f57543..df3a23e76d 100644
--- a/src/site/_release-notes/_2.x.x.adoc
+++ b/src/site/_release-notes/_2.x.x.adoc
@@ -78,6 +78,7 @@ For complete information on Apache Log4j 2, including instructions on how to sub
* Avoided using released objects in `StackTraceStringResolver` of `JsonTemplateLayout` (https://github.com/apache/logging-log4j2/pull/1380[1380])
* Added missing setter for `connectionStringSource` in `MongoDb4Provider` builder (https://github.com/apache/logging-log4j2/issues/1389[1389])
* Fixed NPE in `PluginElementVisitor` (https://github.com/apache/logging-log4j2/issues/1391[1391])
+* Restored `Log4jMarker` visibility in SLF4J adapters (https://github.com/apache/logging-log4j2/issues/1414[1414])
* Fixed buffer size in `Log4jFixedFormatter` date time formatter (https://github.com/apache/logging-log4j2/pull/1418[1418])
* Replaced the usage of `System.out` in `StackLocator` for warnings with `System.err` (https://github.com/apache/logging-log4j2/issues/1484[1484])
* Fixed concurrent date-time formatting issue in `PatternLayout` (https://github.com/apache/logging-log4j2/issues/1485[1485])
[logging-log4j2] 11/13: Improve warning message if multi-release JARs are not supported (#1833, #1760)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit b45978419c7b46d2474dd0d8f9af42f19102c0b1
Author: Florian Schmaus <fl...@geekplace.eu>
AuthorDate: Thu Oct 5 15:39:56 2023 +0200
Improve warning message if multi-release JARs are not supported (#1833, #1760)
---
log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
index 2ee943185e..3c0881bc54 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
@@ -80,7 +80,7 @@ public final class StackLocator {
} catch (final Exception | LinkageError e) {
if (Constants.JAVA_MAJOR_VERSION > 8) {
LowLevelLogUtil.log(
- "WARNING: Runtime environment does not support multi-release JARs. This will impact location-based features.");
+ "WARNING: Runtime environment or build system does not support multi-release JARs. This will impact location-based features.");
} else {
LowLevelLogUtil.log(
"WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact location-based features.");
[logging-log4j2] 13/13: Merge remote-tracking branch 'origin/release/2.21.0' into release/2.21.0
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit b0413d5bc786b665f5f360b0f63c105d16001f97
Merge: 7f5db1ba98 a51955359a
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Fri Oct 6 09:57:24 2023 +0200
Merge remote-tracking branch 'origin/release/2.21.0' into release/2.21.0
.../JdbcAppenderColumnMappingPropertiesTest.java | 66 ++++++++++++++++
...cAppenderColumnMappingPropertiesTest.properties | 31 ++++++++
.../log4j/core/appender/db/ColumnMapping.java | 48 +++++++++---
.../core/appender/db/jdbc/JdbcDatabaseManager.java | 7 +-
.../log4j/web/Log4jServletContextListener.java | 70 ++++++++++++-----
.../log4j/web/Log4jServletContextListenerTest.java | 89 ++++++++++++++--------
.../log4j/web/Log4jServletContextListener.java | 70 ++++++++++++-----
.../log4j/web/Log4jServletContextListenerTest.java | 89 ++++++++++++++--------
osv-scanner.toml | 34 +++++++++
pom.xml | 2 +-
.../1405_column_mapping_rename_type_attribute.xml | 27 +++++++
...w_multiple_servletcontextlistener_instances.xml | 28 +++++++
.../.2.x.x/update-1runtime-angus-activation.xml | 27 +++++++
.../.2.x.x/update-1runtime-angus-mail.xml | 27 +++++++
.../.2.x.x/update-1runtime-cassandra-driver.xml | 27 +++++++
src/changelog/.2.x.x/update-1runtime-cassandra.xml | 27 +++++++
.../.2.x.x/update-1runtime-commons-compress.xml | 27 +++++++
.../.2.x.x/update-1runtime-commons-csv.xml | 27 +++++++
src/changelog/.2.x.x/update-1runtime-jackson.xml | 27 +++++++
.../.2.x.x/update-1runtime-jakarta-activation.xml | 27 +++++++
.../.2.x.x/update-1runtime-jakarta-mail.xml | 27 +++++++
src/changelog/.2.x.x/update-1runtime-jctools.xml | 27 +++++++
src/changelog/.2.x.x/update-1runtime-kafka.xml | 27 +++++++
.../.2.x.x/update-1runtime-kubernetes.xml | 27 +++++++
src/changelog/.2.x.x/update-1runtime-mongodb.xml | 27 +++++++
src/changelog/.2.x.x/update-1runtime-netty.xml | 27 +++++++
.../.2.x.x/update-1runtime-spring-boot.xml | 27 +++++++
.../.2.x.x/update-1runtime-spring-framework.xml | 27 +++++++
.../.2.x.x/update-1runtime-tomcat-juli.xml | 27 +++++++
src/changelog/.2.x.x/update-1runtime-woodstox.xml | 27 +++++++
src/changelog/.2.x.x/update-2build-asciidoctor.xml | 27 +++++++
.../.2.x.x/update-2build-build-helper.xml | 27 +++++++
src/changelog/.2.x.x/update-2build-dependency.xml | 27 +++++++
src/changelog/.2.x.x/update-2build-docker.xml | 27 +++++++
.../.2.x.x/update-2build-log4j-changelog.xml | 27 +++++++
src/changelog/.2.x.x/update-2build-scm.xml | 27 +++++++
src/changelog/.2.x.x/update-2build-spotbugs.xml | 27 +++++++
src/changelog/.2.x.x/update-2build-surefire.xml | 27 +++++++
src/changelog/.2.x.x/update-2build-xml.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-activemq.xml | 27 +++++++
.../update-3test-allocation-instrumenter.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-assertj.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-commons-lang.xml | 27 +++++++
.../.2.x.x/update-3test-elasticsearch.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-flapdoodle.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-groovy.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-guava.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-h2.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-hsqldb.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-jetty.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-jmh.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-jsonunit.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-junit.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-logback.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-maven.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-webcompere.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-wiremock.xml | 27 +++++++
src/changelog/.2.x.x/update-3test-xmlunit.xml | 27 +++++++
src/site/_release-notes/_2.x.x.adoc | 48 ++++++++++++
src/site/resources/release-notes/index.html | 28 +++++++
src/site/site.xml | 2 +-
61 files changed, 1767 insertions(+), 114 deletions(-)
diff --cc src/site/_release-notes/_2.x.x.adoc
index 53d0d577dd,88c8651c96..1fd8f67dfc
--- a/src/site/_release-notes/_2.x.x.adoc
+++ b/src/site/_release-notes/_2.x.x.adoc
@@@ -60,9 -59,8 +60,54 @@@ For complete information on Apache Log4
* Bumped the minimum Java version required for the build to JDK 11. Runtime requirements remain unchanged. (https://github.com/apache/logging-log4j2/issues/1369[1369])
* Set the default `minLevel` and `maxLevel` of `LevelRangeFilter` to `OFF` and `ALL`, respectively (https://github.com/apache/logging-log4j2/pull/1503[1503])
* Removed additional `isFiltered` checks in `AsyncLoggerConfig` (https://github.com/apache/logging-log4j2/pull/1550[1550])
+* Use Java version-specific warnings in `StackLocator` (https://github.com/apache/logging-log4j2/pull/1760[1760])
* Started logging a status error event instead of an NPE in `OsgiServiceLocator.loadServices(Class, Lookup, boolean)` when a bundle has no valid `BundleContext` for a service type
* Implemented a CI-based release process
++* Runtime dependencies: update Eclipse Angus Activation from version 2.0.0 to version link:https://github.com/eclipse-ee4j/angus-activation/releases/tag/2.0.1[2.0.1]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Eclipse Angus Mail from version 2.0.1 to version link:https://github.com/eclipse-ee4j/angus-mail/releases/tag/2.0.2[2.0.2]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: `com.datastax.cassandra:cassandra-driver-core` to version 3.11.5. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Apache Cassandra from version 3.11.14 to version link:https://github.com/apache/cassandra/blob/cassandra-3.11/CHANGES.txt[3.11.16]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Apache Commons Compress from version 1.22 to version link:https://commons.apache.org/proper/commons-compress/changes-report.html#a1.24.0[1.24.0]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Apache Commons CSV from version 1.9.0 to version link:https://commons.apache.org/proper/commons-csv/changes-report.html#a1.10.0[1.10.0]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Jackson from version 2.14.1 to version link:https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.15.2[2.15.2]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Jakarta Activation API from version 2.1.1 to version link:https://jakarta.ee/specifications/activation/2.1/changelog/[2.1.2]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Jakarta Mail API from version 2.1.1 to version link:https://jakarta.ee/specifications/mail/2.1/changelog/[2.1.2]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update JCTools from version 3.3.0 to version link:https://github.com/JCTools/JCTools/blob/master/RELEASE-NOTES.md[4.0.1]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Apache Kafka from version 1.1.1 to version link:https://archive.apache.org/dist/kafka/3.4.0/RELEASE_NOTES.html[3.4.0]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Kubernetes client from version 5.12.2 to version link:https://github.com/fabric8io/kubernetes-client/releases?q=5.12.4[5.12.4]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update `org.mongodb:mongodb-driver-core` to version 4.10.2. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update `io.netty:netty-bom` to version 4.1.97. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Spring Boot from version 2.7.7 to version link:https://github.com/spring-projects/spring-boot/releases/tag/v2.7.15[2.7.15]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Spring Framework from version 5.3.24 to version link:https://github.com/spring-projects/spring-framework/releases/tag/v5.3.29[5.3.29]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Tomcat JULI from version 10.0.23 to version 10.0.27. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update Woodstox from version 6.4.0 to version link:https://github.com/FasterXML/woodstox/blob/master/release-notes/VERSION[6.5.1]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Build dependencies: update `maven-asciidoctor-plugin` from version 2.2.2 to link:https://github.com/asciidoctor/asciidoctor-maven-plugin/releases/tag/asciidoctor-maven-plugin-2.2.4[2.2.4]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Build dependencies: update `build-helper-maven-plugin` from version 3.3.0 to link:https://github.com/mojohaus/build-helper-maven-plugin/releases/tag/3.4.0[3.4.0]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Build dependencies: update `maven-dependency-plugin` from version 3.3.0 to link:https://blogsarchive.apache.org/maven/entry/apache-maven-dependency-plugin-version4[3.5.0]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Build dependencies: update `docker-maven-plugin` from version 0.40.2 to link:https://github.com/fabric8io/docker-maven-plugin/releases/tag/v0.43.2[0.43.2]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Build dependencies: update `log4j-changelog` from version 0.2.0 to link:https://github.com/apache/logging-log4j-tools/releases/tag/rel%2F0.3.0[0.3.0]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Build dependencies: update `maven-scm-plugin` from version 1.12.2 to 1.13.0. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Build dependencies: update `spotbugs-maven-plugin` from version 4.7.2.1 to link:https://github.com/spotbugs/spotbugs-maven-plugin/releases/tag/spotbugs-maven-plugin-4.7.3.5[4.7.3.5]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Build dependencies: update `maven-surefire-plugin` from version 3.0.0-M7 to link:https://github.com/apache/maven-surefire/releases/tag/surefire-3.1.2[3.1.2]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Build dependencies: update `xml-maven-plugin` from version 1.0.2 to link:https://github.com/mojohaus/xml-maven-plugin/releases/tag/1.1.0[1.1.0]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update Apache ActiveMQ from version 5.17.3 to version 5.17.4. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update Allocation Instrumenter from version 3.3.0 to version link:https://github.com/google/allocation-instrumenter/releases/tag/java-allocation-instrumenter-3.3.3[3.3.3]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update AssertJ from version 3.23.1 to version 3.24.2. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Runtime dependencies: update `org.apache.commons:commons-lang3` to version 3.13.0. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update Elasticsearch HLRC from version 7.17.8 to version link:https://www.elastic.co/guide/en/elasticsearch/reference/7.17/release-notes-7.17.13.html[7.17.13]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update Groovy from version 3.0.14 to version link:https://groovy-lang.org/changelogs/changelog-3.0.19.html[3.0.19]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update Guava from version 31.1 to version link:https://github.com/google/guava/releases/tag/v32.1.2[32.1.2]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update H2 from version 2.1.214 to version link:http://www.h2database.com/html/changelog.html[2.2.222]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies (**security**): update HyperSQL DB from version 2.5.2 to version link:https://hsqldb.org/doc/2.0/changelist_2_0.txt[2.7.2]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update Jetty from version 9.4.50 to version link:https://github.com/eclipse/jetty.project/releases?q=9.4.52[9.4.52]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update JMH from version 1.36 to version 1.37. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update link:https://github.com/lukas-krecan/JsonUnit[JsonUnit] from version 2.36.0 to version 2.38.0. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update JUnit from version 5.9.1 to version link:https://junit.org/junit5/docs/5.10.0/release-notes/[5.10.0]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update Logback from version 1.2.11 to version link:https://logback.qos.ch/news.html#1.2.12[1.2.12]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update Apache Maven from version 3.8.6 to version link:https://maven.apache.org/docs/3.9.0/release-notes.html[3.9.0]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update WebCompere System Stubs from version 2.0.1 to version link:https://github.com/webcompere/system-stubs/releases/tag/system-stubs-parent-2.0.2[2.0.2]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update `com.github.tomakehurst:wiremock-jre8` to version 2.35.1. (https://github.com/apache/logging-log4j2/issues/1591[1591])
++* Test dependencies: update XMLUnit from version 2.9.0 to version link:https://github.com/xmlunit/xmlunit/releases/tag/v2.9.1[2.9.1]. (https://github.com/apache/logging-log4j2/issues/1591[1591])
=== Removed
@@@ -80,11 -78,7 +125,12 @@@
* Avoided using released objects in `StackTraceStringResolver` of `JsonTemplateLayout` (https://github.com/apache/logging-log4j2/pull/1380[1380])
* Added missing setter for `connectionStringSource` in `MongoDb4Provider` builder (https://github.com/apache/logging-log4j2/issues/1389[1389])
* Fixed NPE in `PluginElementVisitor` (https://github.com/apache/logging-log4j2/issues/1391[1391])
++* Add `columnType` as alias for the column mapping `type` attribute. (https://github.com/apache/logging-log4j2/issues/1405[1405])
+* Restored `Log4jMarker` visibility in SLF4J adapters (https://github.com/apache/logging-log4j2/issues/1414[1414])
* Fixed buffer size in `Log4jFixedFormatter` date time formatter (https://github.com/apache/logging-log4j2/pull/1418[1418])
+* Fixed the propagation of synchronous action failures in `RollingFileManager` and `FileRenameAction` (https://github.com/apache/logging-log4j2/issues/1445[1445], https://github.com/apache/logging-log4j2/pull/1549[1549])
+* Fixed `RollingFileManager` to propagate failed synchronous actions correctly. (https://github.com/apache/logging-log4j2/issues/1445[1445])
+* Replaced the usage of `System.out` in `StackLocator` for warnings with `System.err` (https://github.com/apache/logging-log4j2/issues/1484[1484])
* Fixed concurrent date-time formatting issue in `PatternLayout` (https://github.com/apache/logging-log4j2/issues/1485[1485])
* Fixed runtime dependencies documentation (https://github.com/apache/logging-log4j2/pull/1530[1530])
* Allowed to override FQCN in `Log4jEventBuilder` by implementing `CallerBoundaryAware` (https://github.com/apache/logging-log4j2/pull/1533[1533])
@@@ -96,6 -90,6 +142,7 @@@
* Removed incorrect mention of `base64` lookup and improve the rest of the lookup manual (https://github.com/apache/logging-log4j2/issues/1681[1681], https://issues.apache.org/jira/browse/LOG4J2-3504[LOG4J2-3504])
* Implemented `LocationAware` for `JsonTemplateLayout`, since this was causing location not being passed to underlying appenders (https://github.com/apache/logging-log4j2/issues/1692[1692])
* Added support for `long` values in MongoDb 4 appender to configure `collectionSize` (https://github.com/apache/logging-log4j2/issues/1747[1747])
++* Only shutdown Log4j after last `Log4jServletContextListener` is executed. (https://github.com/apache/logging-log4j2/issues/1782[1782])
* Fixed context data loss if `<AsyncLogger>` components are used with an all async logger context (https://github.com/apache/logging-log4j2/issues/1786[1786])
* Fixed `JsonTemplateLayout` NPE thrown on custom log levels (https://github.com/apache/logging-log4j2/issues/1805[1805])
* Improved `Log4j-config.xsd` schema (https://issues.apache.org/jira/browse/LOG4J2-170[LOG4J2-170])
@@@ -104,3 -98,3 +151,4 @@@
* Fixed `%notEmpty` directive of `PatternLayout` for empty MDC/NDC inputs (https://issues.apache.org/jira/browse/LOG4J2-3660[LOG4J2-3660])
* Fixed file descriptor leak on Tomcat (https://issues.apache.org/jira/browse/LOG4J2-3663[LOG4J2-3663])
* Ensured `FileOutputStream` is closed in `CommonsCompressAction.execute()`
++* Test dependencies: update Flapdoodle Embedded MongoDB from version 3.5.1 to version 4.7.1. (https://github.com/apache/logging-log4j2/issues/1589[1589])
diff --cc src/site/resources/release-notes/index.html
index 0000000000,0000000000..a4a932daed
new file mode 100644
--- /dev/null
+++ b/src/site/resources/release-notes/index.html
@@@ -1,0 -1,0 +1,28 @@@
++<!DOCTYPE html>
++<!--
++ 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.
++-->
++<html lang="en">
++<head>
++ <title>Apache Log4j Release Notes</title>
++ <!-- Log4j 2.21.0 removed the `/release-notes/index.html` in favor of `/release-notes.html`.
++ We have this HTML-based redirect here to continue support these old URLs. -->
++ <meta http-equiv="refresh" content="0; url=../release-notes.html"/>
++</head>
++<body>
++<p>You will be redirected to <a href="../release-notes.html">the release notes page</a>.</p>
++</body>
++</html>
diff --cc src/site/site.xml
index 9097061c5e,9097061c5e..c84a24db36
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@@ -55,7 -55,7 +55,7 @@@
<item name="Optional Components" href="/maven-artifacts.html#Optional_Components" />
<item name="Snapshot builds" href="/maven-artifacts.html#Snapshot_builds" />
</item>
-- <item name="Release Notes" href="/release-notes/index.html"/>
++ <item name="Release Notes" href="/release-notes.html"/>
<item name="FAQ" href="/faq.html"/>
<item name="Performance" href="/performance.html" collapse="true">
<item name="Benchmarks" href="/performance.html#benchmarks" />
[logging-log4j2] 07/13: Propagate synchronous action failures in `RollingFileManager` and `FileRenameAction` (#1445, #1549)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 66bc65079cb437ac06da8ab7e09ce9bbf75838fe
Author: Tim P <17...@users.noreply.github.com>
AuthorDate: Thu Oct 5 09:10:38 2023 -0400
Propagate synchronous action failures in `RollingFileManager` and `FileRenameAction` (#1445, #1549)
---
.../appender/rolling/RollingFileManagerTest.java | 51 ++++++++++++++++++++++
.../rolling/action/FileRenameActionTest.java | 12 +++--
.../core/appender/rolling/RollingFileManager.java | 2 +-
.../appender/rolling/action/FileRenameAction.java | 2 +-
.../1445_fix_synchronous_rolling_file_manager.xml | 27 ++++++++++++
5 files changed, 88 insertions(+), 6 deletions(-)
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManagerTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManagerTest.java
index 796ad67a82..7da92ed5e2 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManagerTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManagerTest.java
@@ -21,7 +21,10 @@ import java.nio.charset.StandardCharsets;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.appender.RollingFileAppender;
+import org.apache.logging.log4j.core.appender.rolling.action.AbstractAction;
import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.NullConfiguration;
+import org.apache.logging.log4j.core.layout.PatternLayout;
import org.apache.logging.log4j.core.lookup.StrSubstitutor;
import org.apache.logging.log4j.core.util.IOUtils;
import org.junit.Assert;
@@ -84,4 +87,52 @@ public class RollingFileManagerTest {
}
}
}
+
+ /**
+ * Test that a synchronous action failure does not cause a rollover. Addresses Issue #1445.
+ */
+ @Test
+ public void testSynchronousActionFailure() throws IOException {
+ class FailingSynchronousAction extends AbstractAction {
+ @Override
+ public boolean execute() {
+ return false;
+ }
+ }
+ class FailingSynchronousStrategy implements RolloverStrategy {
+ @Override
+ public RolloverDescription rollover(final RollingFileManager manager) throws SecurityException {
+ return new RolloverDescriptionImpl(manager.getFileName(), false, new FailingSynchronousAction(), null);
+ }
+ }
+
+ final Configuration configuration = new NullConfiguration();
+
+ // Create the manager.
+ final File file = File.createTempFile("testSynchronousActionFailure", "log");
+ final RollingFileManager manager = RollingFileManager.getFileManager(
+ file.getAbsolutePath(),
+ "testSynchronousActionFailure.log.%d{yyyy-MM-dd}", true, false,
+ OnStartupTriggeringPolicy.createPolicy(1), new FailingSynchronousStrategy(), null,
+ PatternLayout.createDefaultLayout(), 0, true, false, null, null, null, configuration);
+ Assert.assertNotNull(manager);
+ manager.initialize();
+
+ // Get the initialTime of this original log file
+ final long initialTime = manager.getFileTime();
+
+ // Log something to ensure that the existing file size is > 0
+ final String testContent = "Test";
+ manager.writeToDestination(testContent.getBytes(StandardCharsets.US_ASCII), 0, testContent.length());
+
+ // Trigger rollover that will fail
+ manager.rollover();
+
+ // If the rollover fails, then the size should not be reset
+ Assert.assertNotEquals(0, manager.getFileSize());
+
+ // The initialTime should not have changed
+ Assert.assertEquals(initialTime, manager.getFileTime());
+
+ }
}
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameActionTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameActionTest.java
index 185baa2b64..ef3f3a0af1 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameActionTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameActionTest.java
@@ -46,7 +46,8 @@ public class FileRenameActionTest {
final File dest = new File(tempDir, "newFile.log");
final FileRenameAction action = new FileRenameAction(file, dest, false);
- action.execute();
+ boolean renameResult = action.execute();
+ assertTrue(renameResult, "Rename action returned false");
assertTrue(dest.exists(), "Renamed file does not exist");
assertFalse(file.exists(), "Old file exists");
}
@@ -60,7 +61,8 @@ public class FileRenameActionTest {
assertTrue(file.exists(), "File to rename does not exist");
final File dest = new File(tempDir, "newFile.log");
final FileRenameAction action = new FileRenameAction(file, dest, false);
- action.execute();
+ boolean renameResult = action.execute();
+ assertTrue(renameResult, "Rename action returned false");
assertFalse(dest.exists(), "Renamed file should not exist");
assertFalse(file.exists(), "Old file still exists");
}
@@ -74,7 +76,8 @@ public class FileRenameActionTest {
assertTrue(file.exists(), "File to rename does not exist");
final File dest = new File(tempDir, "newFile.log");
final FileRenameAction action = new FileRenameAction(file, dest, true);
- action.execute();
+ boolean renameResult = action.execute();
+ assertTrue(renameResult, "Rename action returned false");
assertTrue(dest.exists(), "Renamed file should exist");
assertFalse(file.exists(), "Old file still exists");
}
@@ -91,7 +94,8 @@ public class FileRenameActionTest {
final File dest = new File(tempDir, "newFile.log");
final FileRenameAction action = new FileRenameAction(file, dest, false);
- action.execute();
+ boolean renameResult = action.execute();
+ assertTrue(renameResult, "Rename action returned false");
assertTrue(dest.exists(), "Renamed file does not exist");
assertFalse(file.exists(), "Old file exists");
}
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
index 0a86005eac..0ceef8056f 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
@@ -520,7 +520,7 @@ public class RollingFileManager extends FileManager {
asyncExecutor.execute(new AsyncAction(descriptor.getAsynchronous(), this));
releaseRequired = false;
}
- return true;
+ return success;
}
return false;
} finally {
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java
index a42b5af02e..90be9dda80 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java
@@ -163,7 +163,7 @@ public class FileRenameAction extends AbstractAction {
}
} else {
try {
- source.delete();
+ return source.delete();
} catch (final Exception exDelete) {
LOGGER.error("Unable to delete empty file {}: {} {}", source.getAbsolutePath(),
exDelete.getClass().getName(), exDelete.getMessage());
diff --git a/src/changelog/.2.x.x/1445_fix_synchronous_rolling_file_manager.xml b/src/changelog/.2.x.x/1445_fix_synchronous_rolling_file_manager.xml
new file mode 100644
index 0000000000..4e446ebf50
--- /dev/null
+++ b/src/changelog/.2.x.x/1445_fix_synchronous_rolling_file_manager.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
+ type="fixed">
+ <issue id="1445" link="https://github.com/apache/logging-log4j2/issues/1445"/>
+ <author id="thisdudeiknew" name="Timothy Pfeifer"/>
+ <description format="asciidoc">
+ Fixed `RollingFileManager` to propagate failed synchronous actions correctly.
+ </description>
+</entry>
[logging-log4j2] 09/13: Warn on incorrect highlight style (#1545, #1637)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit c971b2cc940fd39c310704b1e07ceedbb2e9ec7b
Author: Ammar Awad <am...@gmail.com>
AuthorDate: Thu Oct 5 16:31:03 2023 +0300
Warn on incorrect highlight style (#1545, #1637)
---
.../log4j/core/pattern/HighlightConverterTest.java | 20 +++++++++++++++
.../logging/log4j/core/pattern/AnsiEscape.java | 3 +++
.../log4j/core/pattern/HighlightConverter.java | 14 +++++------
...e_of_incorrect_syntax_of_highlighting_style.xml | 29 ++++++++++++++++++++++
4 files changed, 59 insertions(+), 7 deletions(-)
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/HighlightConverterTest.java b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/HighlightConverterTest.java
index afbd03ad3d..f0f7266423 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/HighlightConverterTest.java
+++ b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/HighlightConverterTest.java
@@ -171,6 +171,26 @@ public class HighlightConverterTest {
assertEquals("INFO : message in a bottle", buffer.toString());
}
+ /*
+ This test ensure that a keyvalue pair separated by = sign must be provided in order to configure the highlighting style
+ */
+ @Test
+ @UsingStatusListener
+ public void testBadStyleOption(final ListStatusListener listener) {
+ String defaultWarnColor = "yellow";
+ String defaultInfoColor = "green";
+ final String[] options = {"%5level", PatternParser.NO_CONSOLE_NO_ANSI + "=false, " + PatternParser.DISABLE_ANSI
+ + "=false, " + "LOGBACK"};
+ final HighlightConverter converter = HighlightConverter.newInstance(null, options);
+ assertNotNull(converter);
+
+ // As the default highlighting WARN color is Yellow while the LOGBACK color is Red
+ assertEquals(AnsiEscape.createSequence(defaultWarnColor), converter.getLevelStyle(Level.WARN));
+ // As the default highlighting INFO color is Green while the LOGBACK color is Blue
+ assertEquals(AnsiEscape.createSequence(defaultInfoColor), converter.getLevelStyle(Level.INFO));
+ assertThat(listener.findStatusData(Level.WARN)).hasSize(1);
+ }
+
private CharSequence toFormattedCharSeq(final HighlightConverter converter, final Level level) {
final StringBuilder sb = new StringBuilder();
converter.format(Log4jLogEvent.newBuilder().setLevel(level).build(), sb);
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/AnsiEscape.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/AnsiEscape.java
index 51e8c75b75..4aee2a2c3d 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/AnsiEscape.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/AnsiEscape.java
@@ -347,6 +347,7 @@ public enum AnsiEscape {
* Bright white background color.
*/
BG_BRIGHT_WHITE("107");
+ private static final StatusLogger LOGGER = StatusLogger.getLogger();
private static final String DEFAULT_STYLE = CSI.getCode() + SUFFIX.getCode();
@@ -431,6 +432,8 @@ public enum AnsiEscape {
final String value = keyValue[1];
final boolean escape = Arrays.binarySearch(sortedIgnoreKeys, key) < 0;
map.put(key, escape ? createSequence(value.split("\\s")) : value);
+ } else {
+ LOGGER.warn("Syntax error, missing '=': Expected \"{KEY1=VALUE, KEY2=VALUE, ...}");
}
}
return map;
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java
index 439d0bc2a4..494305d696 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java
@@ -27,7 +27,6 @@ import org.apache.logging.log4j.core.config.Configuration;
import org.apache.logging.log4j.core.config.plugins.Plugin;
import org.apache.logging.log4j.core.layout.PatternLayout;
import org.apache.logging.log4j.util.PerformanceSensitive;
-import org.apache.logging.log4j.util.Strings;
import static org.apache.logging.log4j.util.Strings.toRootUpperCase;
@@ -87,6 +86,10 @@ public final class HighlightConverter extends LogEventPatternConverter implement
private static final String STYLE_KEY = "STYLE";
+ private static final String DISABLE_ANSI_KEY = "DISABLEANSI";
+
+ private static final String NO_CONSOLE_NO_ANSI_KEY = "NOCONSOLENOANSI";
+
private static final String STYLE_KEY_DEFAULT = "DEFAULT";
private static final String STYLE_KEY_LOGBACK = "LOGBACK";
@@ -146,11 +149,8 @@ public final class HighlightConverter extends LogEventPatternConverter implement
return DEFAULT_STYLES;
}
// Feels like a hack. Should String[] options change to a Map<String,String>?
- final String string = options[1]
- .replaceAll(PatternParser.DISABLE_ANSI + "=(true|false)", Strings.EMPTY)
- .replaceAll(PatternParser.NO_CONSOLE_NO_ANSI + "=(true|false)", Strings.EMPTY);
- //
- final Map<String, String> styles = AnsiEscape.createMap(string, new String[] {STYLE_KEY});
+ final Map<String, String> styles = AnsiEscape.createMap(options[1], new String[]{STYLE_KEY, DISABLE_ANSI_KEY,
+ NO_CONSOLE_NO_ANSI_KEY});
final Map<String, String> levelStyles = new HashMap<>(DEFAULT_STYLES);
for (final Map.Entry<String, String> entry : styles.entrySet()) {
final String key = toRootUpperCase(entry.getKey());
@@ -163,7 +163,7 @@ public final class HighlightConverter extends LogEventPatternConverter implement
} else {
levelStyles.putAll(enumMap);
}
- } else {
+ } else if (!DISABLE_ANSI_KEY.equalsIgnoreCase(key) && !NO_CONSOLE_NO_ANSI_KEY.equalsIgnoreCase(key)) {
final Level level = Level.toLevel(key, null);
if (level == null) {
LOGGER.warn("Setting style for yet unknown level name {}", key);
diff --git a/src/changelog/.2.x.x/1545_add_warn_in_case_of_incorrect_syntax_of_highlighting_style.xml b/src/changelog/.2.x.x/1545_add_warn_in_case_of_incorrect_syntax_of_highlighting_style.xml
new file mode 100644
index 0000000000..55cb7a656d
--- /dev/null
+++ b/src/changelog/.2.x.x/1545_add_warn_in_case_of_incorrect_syntax_of_highlighting_style.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ type="fixed">
+ <issue id="1545" link="https://github.com/apache/logging-log4j2/issues/1545"/>
+ <author id="aawad6"/>
+ <author name="Ammar Awad"/>
+ <description format="asciidoc">
+ Add a warning in case of incorrect syntax of highlighting style (without =).
+ e.g. %highlight{%5level}{LOGBACK} should be %highlight{%5level}{STYLE=LOGBACK}
+ </description>
+</entry>
[logging-log4j2] 06/13: Update old changelog XSDs
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit d2d351cb614799ecb309c3787f4bd1ec19ed6e25
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Oct 5 14:58:28 2023 +0200
Update old changelog XSDs
---
src/changelog/.2.x.x/1231_validation_path_condition.xml | 2 +-
src/changelog/.2.x.x/1232_log4j-to-sfl4j-2-OSGiMetadata.xml | 2 +-
src/changelog/.2.x.x/1312_add_environment_arbiter.xml | 2 +-
src/changelog/.2.x.x/1367_Missing-Bundle-Activation-OSGiMetadata.xml | 2 +-
src/changelog/.2.x.x/1369_bump_build_requirement_jdk_11.xml | 2 +-
src/changelog/.2.x.x/1484_fix_StackLocator_stdout.xml | 2 +-
src/changelog/.2.x.x/1589_mongodb_tests.xml | 2 +-
src/changelog/.2.x.x/1640_java_9_stack_trace_element.xml | 2 +-
src/changelog/.2.x.x/1646_unsafe_cleaner.xml | 2 +-
src/changelog/.2.x.x/1650_fix_rollover_strategy_log4j1.xml | 2 +-
src/changelog/.2.x.x/1681_fix_and_improve_lookup_docs.xml | 2 +-
src/changelog/.2.x.x/1692_make_JTL_LocationAware.xml | 2 +-
src/changelog/.2.x.x/1747_mongodb4-long-collection-size-conifg.xml | 2 +-
.../.2.x.x/1760_use_java_version_specific_warnings_in_StackLocator.xml | 2 +-
14 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/changelog/.2.x.x/1231_validation_path_condition.xml b/src/changelog/.2.x.x/1231_validation_path_condition.xml
index dc900af9e1..62e6deb63e 100644
--- a/src/changelog/.2.x.x/1231_validation_path_condition.xml
+++ b/src/changelog/.2.x.x/1231_validation_path_condition.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1231" link="https://github.com/apache/logging-log4j2/issues/1231"/>
<author id="github:lukaszspyra" name="Łukasz Spyra"/>
diff --git a/src/changelog/.2.x.x/1232_log4j-to-sfl4j-2-OSGiMetadata.xml b/src/changelog/.2.x.x/1232_log4j-to-sfl4j-2-OSGiMetadata.xml
index 660158037f..dadddda390 100644
--- a/src/changelog/.2.x.x/1232_log4j-to-sfl4j-2-OSGiMetadata.xml
+++ b/src/changelog/.2.x.x/1232_log4j-to-sfl4j-2-OSGiMetadata.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1232" link="https://github.com/apache/logging-log4j2/issues/1232"/>
<author id="hanneswell"/>
diff --git a/src/changelog/.2.x.x/1312_add_environment_arbiter.xml b/src/changelog/.2.x.x/1312_add_environment_arbiter.xml
index d39d3178cb..c1d91f7336 100644
--- a/src/changelog/.2.x.x/1312_add_environment_arbiter.xml
+++ b/src/changelog/.2.x.x/1312_add_environment_arbiter.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1312" link="https://github.com/apache/logging-log4j2/issues/1312"/>
<author id="github:MouettE-SC" name="Charles Leclerc"/>
diff --git a/src/changelog/.2.x.x/1367_Missing-Bundle-Activation-OSGiMetadata.xml b/src/changelog/.2.x.x/1367_Missing-Bundle-Activation-OSGiMetadata.xml
index 912c284bf9..f46d57009b 100644
--- a/src/changelog/.2.x.x/1367_Missing-Bundle-Activation-OSGiMetadata.xml
+++ b/src/changelog/.2.x.x/1367_Missing-Bundle-Activation-OSGiMetadata.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1367" link="https://github.com/apache/logging-log4j2/issues/1367"/>
<author id="github:N1k145" name="Niklas Kellner"/>
diff --git a/src/changelog/.2.x.x/1369_bump_build_requirement_jdk_11.xml b/src/changelog/.2.x.x/1369_bump_build_requirement_jdk_11.xml
index 3c8c79b1fb..56dfbcecea 100644
--- a/src/changelog/.2.x.x/1369_bump_build_requirement_jdk_11.xml
+++ b/src/changelog/.2.x.x/1369_bump_build_requirement_jdk_11.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="changed">
<issue id="1369" link="https://github.com/apache/logging-log4j2/issues/1369"/>
<author id="github:ppkarwasz"/>
diff --git a/src/changelog/.2.x.x/1484_fix_StackLocator_stdout.xml b/src/changelog/.2.x.x/1484_fix_StackLocator_stdout.xml
index 02081bc830..f102cbcec4 100644
--- a/src/changelog/.2.x.x/1484_fix_StackLocator_stdout.xml
+++ b/src/changelog/.2.x.x/1484_fix_StackLocator_stdout.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1484" link="https://github.com/apache/logging-log4j2/issues/1484"/>
<author id="github:hblohm" name="Henning Blohm"/>
diff --git a/src/changelog/.2.x.x/1589_mongodb_tests.xml b/src/changelog/.2.x.x/1589_mongodb_tests.xml
index 1a2d1e3c27..3f9c035c03 100644
--- a/src/changelog/.2.x.x/1589_mongodb_tests.xml
+++ b/src/changelog/.2.x.x/1589_mongodb_tests.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1589" link="https://github.com/apache/logging-log4j2/issues/1589"/>
<author id="github:ppkarwasz"/>
diff --git a/src/changelog/.2.x.x/1640_java_9_stack_trace_element.xml b/src/changelog/.2.x.x/1640_java_9_stack_trace_element.xml
index cc384869b5..c47b93d57d 100644
--- a/src/changelog/.2.x.x/1640_java_9_stack_trace_element.xml
+++ b/src/changelog/.2.x.x/1640_java_9_stack_trace_element.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1640" link="https://github.com/apache/logging-log4j2/issues/1640"/>
<author id="github:rgoers"/>
diff --git a/src/changelog/.2.x.x/1646_unsafe_cleaner.xml b/src/changelog/.2.x.x/1646_unsafe_cleaner.xml
index 6cf0d1b631..a5394e9baf 100644
--- a/src/changelog/.2.x.x/1646_unsafe_cleaner.xml
+++ b/src/changelog/.2.x.x/1646_unsafe_cleaner.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1646" link="https://github.com/apache/logging-log4j2/issues/1646"/>
<author id="github:ppkarwasz"/>
diff --git a/src/changelog/.2.x.x/1650_fix_rollover_strategy_log4j1.xml b/src/changelog/.2.x.x/1650_fix_rollover_strategy_log4j1.xml
index 2b587ab819..44661b6f31 100644
--- a/src/changelog/.2.x.x/1650_fix_rollover_strategy_log4j1.xml
+++ b/src/changelog/.2.x.x/1650_fix_rollover_strategy_log4j1.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1650" link="https://github.com/apache/logging-log4j2/issues/1650"/>
<author name="Krzysztof Krasoń" id="github:krzyk"/>
diff --git a/src/changelog/.2.x.x/1681_fix_and_improve_lookup_docs.xml b/src/changelog/.2.x.x/1681_fix_and_improve_lookup_docs.xml
index 38fd13777b..784d85d945 100644
--- a/src/changelog/.2.x.x/1681_fix_and_improve_lookup_docs.xml
+++ b/src/changelog/.2.x.x/1681_fix_and_improve_lookup_docs.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1681" link="https://github.com/apache/logging-log4j2/issues/1681"/>
<issue id="LOG4J2-3504" link="https://issues.apache.org/jira/browse/LOG4J2-3504"/>
diff --git a/src/changelog/.2.x.x/1692_make_JTL_LocationAware.xml b/src/changelog/.2.x.x/1692_make_JTL_LocationAware.xml
index 316648b23f..22551a9d0f 100644
--- a/src/changelog/.2.x.x/1692_make_JTL_LocationAware.xml
+++ b/src/changelog/.2.x.x/1692_make_JTL_LocationAware.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1692" link="https://github.com/apache/logging-log4j2/issues/1692"/>
<author name="Jalyn Xing" id="github:jalynxing"/>
diff --git a/src/changelog/.2.x.x/1747_mongodb4-long-collection-size-conifg.xml b/src/changelog/.2.x.x/1747_mongodb4-long-collection-size-conifg.xml
index e87d8d43e7..ef5c56f809 100644
--- a/src/changelog/.2.x.x/1747_mongodb4-long-collection-size-conifg.xml
+++ b/src/changelog/.2.x.x/1747_mongodb4-long-collection-size-conifg.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="fixed">
<issue id="1747" link="https://github.com/apache/logging-log4j2/issues/1747"/>
<author name="Gary Gregory" id="github:garydgregory"/>
diff --git a/src/changelog/.2.x.x/1760_use_java_version_specific_warnings_in_StackLocator.xml b/src/changelog/.2.x.x/1760_use_java_version_specific_warnings_in_StackLocator.xml
index e1eea638ac..0d98a84881 100644
--- a/src/changelog/.2.x.x/1760_use_java_version_specific_warnings_in_StackLocator.xml
+++ b/src/changelog/.2.x.x/1760_use_java_version_specific_warnings_in_StackLocator.xml
@@ -17,7 +17,7 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
type="changed">
<issue id="1760" link="https://github.com/apache/logging-log4j2/pull/1760"/>
<author id="github:Flowdalic" name="Florian Schmaus"/>
[logging-log4j2] 10/13: Improve changelog (#1545, #1637)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 431d5cc7d80be6b05510989a7e28f10497d6a457
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Oct 5 15:33:12 2023 +0200
Improve changelog (#1545, #1637)
---
..._in_case_of_incorrect_syntax_of_highlighting_style.xml | 15 +++++++--------
src/site/_release-notes/_2.x.x.adoc | 1 +
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/changelog/.2.x.x/1545_add_warn_in_case_of_incorrect_syntax_of_highlighting_style.xml b/src/changelog/.2.x.x/1545_add_warn_in_case_of_incorrect_syntax_of_highlighting_style.xml
index 55cb7a656d..110e79948f 100644
--- a/src/changelog/.2.x.x/1545_add_warn_in_case_of_incorrect_syntax_of_highlighting_style.xml
+++ b/src/changelog/.2.x.x/1545_add_warn_in_case_of_incorrect_syntax_of_highlighting_style.xml
@@ -17,13 +17,12 @@
-->
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://logging.apache.org/log4j/changelog"
- xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
- type="fixed">
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
+ type="added">
<issue id="1545" link="https://github.com/apache/logging-log4j2/issues/1545"/>
- <author id="aawad6"/>
- <author name="Ammar Awad"/>
- <description format="asciidoc">
- Add a warning in case of incorrect syntax of highlighting style (without =).
- e.g. %highlight{%5level}{LOGBACK} should be %highlight{%5level}{STYLE=LOGBACK}
- </description>
+ <issue id="1637" link="https://github.com/apache/logging-log4j2/pull/1637"/>
+ <author id="github:aawad6" name="Ammar Awad"/>
+ <author id="github:ppkarwasz"/>
+ <author id="github:vy"/>
+ <description format="asciidoc">Added a warning for incorrect syntax of highlighting styles</description>
</entry>
diff --git a/src/site/_release-notes/_2.x.x.adoc b/src/site/_release-notes/_2.x.x.adoc
index e63320ff5f..53d0d577dd 100644
--- a/src/site/_release-notes/_2.x.x.adoc
+++ b/src/site/_release-notes/_2.x.x.adoc
@@ -53,6 +53,7 @@ For complete information on Apache Log4j 2, including instructions on how to sub
=== Added
* Added marker parent support to `JsonTemplateLayout` (https://github.com/apache/logging-log4j2/pull/1381[1381])
+* Added a warning for incorrect syntax of highlighting styles (https://github.com/apache/logging-log4j2/issues/1545[1545], https://github.com/apache/logging-log4j2/pull/1637[1637])
=== Changed
[logging-log4j2] 05/13: Add changelog entry (#1760)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit bdd1c792e2eb4f0bdf182e206d623791ed352b58
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Oct 5 14:57:34 2023 +0200
Add changelog entry (#1760)
---
...a_version_specific_warnings_in_StackLocator.xml | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/changelog/.2.x.x/1760_use_java_version_specific_warnings_in_StackLocator.xml b/src/changelog/.2.x.x/1760_use_java_version_specific_warnings_in_StackLocator.xml
new file mode 100644
index 0000000000..e1eea638ac
--- /dev/null
+++ b/src/changelog/.2.x.x/1760_use_java_version_specific_warnings_in_StackLocator.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ type="changed">
+ <issue id="1760" link="https://github.com/apache/logging-log4j2/pull/1760"/>
+ <author id="github:Flowdalic" name="Florian Schmaus"/>
+ <author id="github:ppkarwasz"/>
+ <author id="github:vy"/>
+ <description format="asciidoc">Use Java version-specific warnings in `StackLocator`</description>
+</entry>
[logging-log4j2] 02/13: Replaced the usage of `System.out` in `StackLocator` with `System.err` (#1484)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 0247e0282f2f335e64395e7e8a1b7abc9fed41e5
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Oct 5 14:10:38 2023 +0200
Replaced the usage of `System.out` in `StackLocator` with `System.err` (#1484)
---
.../apache/logging/log4j/util/StackLocator.java | 4 ++--
.../.2.x.x/1484_fix_StackLocator_stdout.xml | 26 ++++++++++++++++++++++
src/site/_release-notes/_2.x.x.adoc | 1 +
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
index bf285d1403..d738f32a87 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
@@ -72,12 +72,12 @@ public final class StackLocator {
} else {
o = getCallerClassMethod.invoke(null, 1);
if (o == sunReflectionClass) {
- System.out.println("WARNING: Unexpected result from sun.reflect.Reflection.getCallerClass(int), adjusting offset for future calls.");
+ System.err.println("WARNING: Unexpected result from sun.reflect.Reflection.getCallerClass(int), adjusting offset for future calls.");
java7u25CompensationOffset = 1;
}
}
} catch (final Exception | LinkageError e) {
- System.out.println("WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.");
+ System.err.println("WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.");
getCallerClassMethod = null;
java7u25CompensationOffset = -1;
}
diff --git a/src/changelog/.2.x.x/1484_fix_StackLocator_stdout.xml b/src/changelog/.2.x.x/1484_fix_StackLocator_stdout.xml
new file mode 100644
index 0000000000..02081bc830
--- /dev/null
+++ b/src/changelog/.2.x.x/1484_fix_StackLocator_stdout.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.0.xsd"
+ type="fixed">
+ <issue id="1484" link="https://github.com/apache/logging-log4j2/issues/1484"/>
+ <author id="github:hblohm" name="Henning Blohm"/>
+ <author id="github:vy"/>
+ <description format="asciidoc">Replaced the usage of `System.out` in `StackLocator` for warnings with `System.err`</description>
+</entry>
diff --git a/src/site/_release-notes/_2.x.x.adoc b/src/site/_release-notes/_2.x.x.adoc
index 88c8651c96..bcc9f57543 100644
--- a/src/site/_release-notes/_2.x.x.adoc
+++ b/src/site/_release-notes/_2.x.x.adoc
@@ -79,6 +79,7 @@ For complete information on Apache Log4j 2, including instructions on how to sub
* Added missing setter for `connectionStringSource` in `MongoDb4Provider` builder (https://github.com/apache/logging-log4j2/issues/1389[1389])
* Fixed NPE in `PluginElementVisitor` (https://github.com/apache/logging-log4j2/issues/1391[1391])
* Fixed buffer size in `Log4jFixedFormatter` date time formatter (https://github.com/apache/logging-log4j2/pull/1418[1418])
+* Replaced the usage of `System.out` in `StackLocator` for warnings with `System.err` (https://github.com/apache/logging-log4j2/issues/1484[1484])
* Fixed concurrent date-time formatting issue in `PatternLayout` (https://github.com/apache/logging-log4j2/issues/1485[1485])
* Fixed runtime dependencies documentation (https://github.com/apache/logging-log4j2/pull/1530[1530])
* Allowed to override FQCN in `Log4jEventBuilder` by implementing `CallerBoundaryAware` (https://github.com/apache/logging-log4j2/pull/1533[1533])
[logging-log4j2] 08/13: Added changelog entry (#1445, #1549)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 6ddb5445ae1990efc4864788fe7db361d0240950
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Oct 5 15:20:45 2023 +0200
Added changelog entry (#1445, #1549)
---
.../1445_1549_fix_sync_roll_action_propagation.xml | 28 ++++++++++++++++++++++
src/site/_release-notes/_2.x.x.adoc | 3 +++
2 files changed, 31 insertions(+)
diff --git a/src/changelog/.2.x.x/1445_1549_fix_sync_roll_action_propagation.xml b/src/changelog/.2.x.x/1445_1549_fix_sync_roll_action_propagation.xml
new file mode 100644
index 0000000000..e2a70737e7
--- /dev/null
+++ b/src/changelog/.2.x.x/1445_1549_fix_sync_roll_action_propagation.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://logging.apache.org/log4j/changelog"
+ xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.1.xsd"
+ type="fixed">
+ <issue id="1445" link="https://github.com/apache/logging-log4j2/issues/1445"/>
+ <issue id="1549" link="https://github.com/apache/logging-log4j2/pull/1549"/>
+ <author id="github:thisdudeiknew"/>
+ <author id="github:ppkarwasz"/>
+ <author id="github:vy"/>
+ <description format="asciidoc">Fixed the propagation of synchronous action failures in `RollingFileManager` and `FileRenameAction`</description>
+</entry>
diff --git a/src/site/_release-notes/_2.x.x.adoc b/src/site/_release-notes/_2.x.x.adoc
index df3a23e76d..e63320ff5f 100644
--- a/src/site/_release-notes/_2.x.x.adoc
+++ b/src/site/_release-notes/_2.x.x.adoc
@@ -59,6 +59,7 @@ For complete information on Apache Log4j 2, including instructions on how to sub
* Bumped the minimum Java version required for the build to JDK 11. Runtime requirements remain unchanged. (https://github.com/apache/logging-log4j2/issues/1369[1369])
* Set the default `minLevel` and `maxLevel` of `LevelRangeFilter` to `OFF` and `ALL`, respectively (https://github.com/apache/logging-log4j2/pull/1503[1503])
* Removed additional `isFiltered` checks in `AsyncLoggerConfig` (https://github.com/apache/logging-log4j2/pull/1550[1550])
+* Use Java version-specific warnings in `StackLocator` (https://github.com/apache/logging-log4j2/pull/1760[1760])
* Started logging a status error event instead of an NPE in `OsgiServiceLocator.loadServices(Class, Lookup, boolean)` when a bundle has no valid `BundleContext` for a service type
* Implemented a CI-based release process
@@ -80,6 +81,8 @@ For complete information on Apache Log4j 2, including instructions on how to sub
* Fixed NPE in `PluginElementVisitor` (https://github.com/apache/logging-log4j2/issues/1391[1391])
* Restored `Log4jMarker` visibility in SLF4J adapters (https://github.com/apache/logging-log4j2/issues/1414[1414])
* Fixed buffer size in `Log4jFixedFormatter` date time formatter (https://github.com/apache/logging-log4j2/pull/1418[1418])
+* Fixed the propagation of synchronous action failures in `RollingFileManager` and `FileRenameAction` (https://github.com/apache/logging-log4j2/issues/1445[1445], https://github.com/apache/logging-log4j2/pull/1549[1549])
+* Fixed `RollingFileManager` to propagate failed synchronous actions correctly. (https://github.com/apache/logging-log4j2/issues/1445[1445])
* Replaced the usage of `System.out` in `StackLocator` for warnings with `System.err` (https://github.com/apache/logging-log4j2/issues/1484[1484])
* Fixed concurrent date-time formatting issue in `PatternLayout` (https://github.com/apache/logging-log4j2/issues/1485[1485])
* Fixed runtime dependencies documentation (https://github.com/apache/logging-log4j2/pull/1530[1530])
[logging-log4j2] 04/13: Use Java version-specific warnings in `StackLocator` (#1760)
Posted by vy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch release/2.21.0
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit af88da7cb926abb1d35d2dc208381097fed8bd4d
Author: Florian Schmaus <fl...@geekplace.eu>
AuthorDate: Thu Oct 5 14:54:44 2023 +0200
Use Java version-specific warnings in `StackLocator` (#1760)
Co-authored-by: Piotr P. Karwasz <pi...@karwasz.org>
Co-authored-by: Volkan Yazıcı <vo...@yazi.ci>
---
.../main/java/org/apache/logging/log4j/util/StackLocator.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
index d738f32a87..2ee943185e 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
@@ -72,12 +72,19 @@ public final class StackLocator {
} else {
o = getCallerClassMethod.invoke(null, 1);
if (o == sunReflectionClass) {
- System.err.println("WARNING: Unexpected result from sun.reflect.Reflection.getCallerClass(int), adjusting offset for future calls.");
+ LowLevelLogUtil.log(
+ "WARNING: Unexpected result from sun.reflect.Reflection.getCallerClass(int), adjusting offset for future calls.");
java7u25CompensationOffset = 1;
}
}
} catch (final Exception | LinkageError e) {
- System.err.println("WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.");
+ if (Constants.JAVA_MAJOR_VERSION > 8) {
+ LowLevelLogUtil.log(
+ "WARNING: Runtime environment does not support multi-release JARs. This will impact location-based features.");
+ } else {
+ LowLevelLogUtil.log(
+ "WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact location-based features.");
+ }
getCallerClassMethod = null;
java7u25CompensationOffset = -1;
}