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 2021/10/13 14:32:16 UTC
[logging-log4j2] branch master updated: Fix code typo in
JsonTemplateLayoutBenchmarkState.
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/master by this push:
new 1a62186 Fix code typo in JsonTemplateLayoutBenchmarkState.
1a62186 is described below
commit 1a62186816bdd05ba420e01f6ee5a2b139a41816
Author: Volkan Yazici <vo...@gmail.com>
AuthorDate: Tue Oct 12 21:37:03 2021 +0200
Fix code typo in JsonTemplateLayoutBenchmarkState.
---
.../log4j/layout/template/json/JsonTemplateLayoutBenchmarkState.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/log4j-perf/src/main/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutBenchmarkState.java b/log4j-perf/src/main/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutBenchmarkState.java
index db68ea3..0a408a7 100644
--- a/log4j-perf/src/main/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutBenchmarkState.java
+++ b/log4j-perf/src/main/java/org/apache/logging/log4j/layout/template/json/JsonTemplateLayoutBenchmarkState.java
@@ -153,9 +153,9 @@ public class JsonTemplateLayoutBenchmarkState {
final Charset layoutCharset = layout.getCharset();
// Note that EcsLayout doesn't support charset configuration, though it
// uses UTF-8 internally.
- if (CHARSET.equals(layoutCharset)) {
+ if (!CHARSET.equals(layoutCharset)) {
throw new IllegalArgumentException(
- "invalid EcsLayout charset: " + layoutCharset);
+ "was expecting EcsLayout charset to be: " + CHARSET + ", found: " + layoutCharset);
}
return layout;
}