From d29c824e1c56b521a7af0cf91bc3c925e2f11264 Mon Sep 17 00:00:00 2001 From: iyupeng Date: Wed, 15 Dec 2021 14:58:37 +0800 Subject: [PATCH] [POAE7-1418] remove some dependencies to log4j, add log4j2 configurations (#220) --- Plasma-based-cache/pom.xml | 4 ++-- .../src/test/resources/log4j2.properties | 16 ++++++++++++++++ oap-ape/ape-java/ape-common/pom.xml | 5 ----- oap-ape/ape-java/ape-server/pom.xml | 5 +++++ .../src/main/resources/log4j2.properties | 16 ++++++++++++++++ .../src/test/resources/log4j2.properties | 16 ++++++++++++++++ 6 files changed, 55 insertions(+), 7 deletions(-) create mode 100755 oap-ape/ape-java/ape-client/src/test/resources/log4j2.properties create mode 100755 oap-ape/ape-java/ape-server/src/main/resources/log4j2.properties create mode 100755 oap-ape/ape-java/ape-server/src/test/resources/log4j2.properties diff --git a/Plasma-based-cache/pom.xml b/Plasma-based-cache/pom.xml index b60d8e8af..658d8d00d 100644 --- a/Plasma-based-cache/pom.xml +++ b/Plasma-based-cache/pom.xml @@ -248,13 +248,13 @@ org.apache.logging.log4j log4j-slf4j-impl - 2.15.0 + 2.16.0 test org.apache.logging.log4j log4j-1.2-api - 2.15.0 + 2.16.0 test diff --git a/oap-ape/ape-java/ape-client/src/test/resources/log4j2.properties b/oap-ape/ape-java/ape-client/src/test/resources/log4j2.properties new file mode 100755 index 000000000..99ebafae0 --- /dev/null +++ b/oap-ape/ape-java/ape-client/src/test/resources/log4j2.properties @@ -0,0 +1,16 @@ +# Extra logging related to initialization of Log4j +# Set to debug or trace if log4j initialization is failing +status = warn +# Name of the configuration +name = ConsoleLogConfig + +# Console appender configuration +appender.console.type = Console +appender.console.name = consoleLogger +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n + +# Root logger level +rootLogger.level = info +# Root logger referring to console appender +rootLogger.appenderRef.stdout.ref = consoleLogger diff --git a/oap-ape/ape-java/ape-common/pom.xml b/oap-ape/ape-java/ape-common/pom.xml index e5e8b62d3..c69745cf9 100644 --- a/oap-ape/ape-java/ape-common/pom.xml +++ b/oap-ape/ape-java/ape-common/pom.xml @@ -97,11 +97,6 @@ - - org.apache.logging.log4j - log4j-slf4j-impl - 2.15.0 - org.apache.parquet parquet-column diff --git a/oap-ape/ape-java/ape-server/pom.xml b/oap-ape/ape-java/ape-server/pom.xml index 45971ce78..7d167aad5 100644 --- a/oap-ape/ape-java/ape-server/pom.xml +++ b/oap-ape/ape-java/ape-server/pom.xml @@ -19,6 +19,11 @@ ape-common ${ape.version} + + org.apache.logging.log4j + log4j-slf4j-impl + 2.16.0 + diff --git a/oap-ape/ape-java/ape-server/src/main/resources/log4j2.properties b/oap-ape/ape-java/ape-server/src/main/resources/log4j2.properties new file mode 100755 index 000000000..99ebafae0 --- /dev/null +++ b/oap-ape/ape-java/ape-server/src/main/resources/log4j2.properties @@ -0,0 +1,16 @@ +# Extra logging related to initialization of Log4j +# Set to debug or trace if log4j initialization is failing +status = warn +# Name of the configuration +name = ConsoleLogConfig + +# Console appender configuration +appender.console.type = Console +appender.console.name = consoleLogger +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n + +# Root logger level +rootLogger.level = info +# Root logger referring to console appender +rootLogger.appenderRef.stdout.ref = consoleLogger diff --git a/oap-ape/ape-java/ape-server/src/test/resources/log4j2.properties b/oap-ape/ape-java/ape-server/src/test/resources/log4j2.properties new file mode 100755 index 000000000..99ebafae0 --- /dev/null +++ b/oap-ape/ape-java/ape-server/src/test/resources/log4j2.properties @@ -0,0 +1,16 @@ +# Extra logging related to initialization of Log4j +# Set to debug or trace if log4j initialization is failing +status = warn +# Name of the configuration +name = ConsoleLogConfig + +# Console appender configuration +appender.console.type = Console +appender.console.name = consoleLogger +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n + +# Root logger level +rootLogger.level = info +# Root logger referring to console appender +rootLogger.appenderRef.stdout.ref = consoleLogger