You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2021/07/26 12:51:50 UTC
[flink-benchmarks] branch master updated: [FLINK-23393] Fix logging
setup
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-benchmarks.git
The following commit(s) were added to refs/heads/master by this push:
new 8e9bec8 [FLINK-23393] Fix logging setup
8e9bec8 is described below
commit 8e9bec8970eb113af1aeecb03dbb641417ff926a
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Mon Jul 26 14:51:42 2021 +0200
[FLINK-23393] Fix logging setup
- remove log4j1 dependencies
- rename log4j.properties files
- rename the production log4j2.properties file to log4j2-test.properties file, because log4j first searches for test configuration files, and the test-jar dependencies put theirs on the classpath
- remove test log4j2-test.properties file, because both prod/test files have the same name, and only the production one was actually used in all cases
---
pom.xml | 14 -------------
.../{log4j.properties => log4j2-test.properties} | 13 ++++++++----
src/test/log4j.properties | 23 ----------------------
3 files changed, 9 insertions(+), 41 deletions(-)
diff --git a/pom.xml b/pom.xml
index 34f1225..a5aaa8a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -116,14 +116,6 @@ under the License.
<version>${flink.version}</version>
</dependency>
- <!-- explicitly add a standard logging framework, as Flink does not have
- a hard dependency on one specific framework by default -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
-
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -132,12 +124,6 @@ under the License.
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>${log4j.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>${jmh.version}</version>
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j2-test.properties
similarity index 78%
rename from src/main/resources/log4j.properties
rename to src/main/resources/log4j2-test.properties
index c0807db..18d398d 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j2-test.properties
@@ -16,8 +16,13 @@
# limitations under the License.
################################################################################
-log4j.rootLogger=ERROR, console
+rootLogger.level = ERROR
+rootLogger.appenderRef.main.ref = main
+
+appender.main.name = main
+appender.main.type = CONSOLE
+appender.main.target = SYSTEM_ERR
+appender.main.layout.type = PatternLayout
+appender.main.layout.pattern = %d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n
+
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n
diff --git a/src/test/log4j.properties b/src/test/log4j.properties
deleted file mode 100644
index e86a938..0000000
--- a/src/test/log4j.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-################################################################################
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-log4j.rootLogger=WARN, console
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n