From 18f24a3e633f556a80166f103bf66681ad917c11 Mon Sep 17 00:00:00 2001 From: Muzahidul Islam Date: Mon, 11 Sep 2023 21:39:51 +0600 Subject: [PATCH 1/3] log4j 2.20.0 dependency added --- java-quickstart/build.gradle | 2 ++ java-quickstart/src/main/resources/log4j2.properties | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 java-quickstart/src/main/resources/log4j2.properties diff --git a/java-quickstart/build.gradle b/java-quickstart/build.gradle index 3e6a978f8..79141296f 100644 --- a/java-quickstart/build.gradle +++ b/java-quickstart/build.gradle @@ -7,6 +7,8 @@ dependencies { compile group: 'com.google.code.gson', name: 'gson', version: gsonVersion compile group: 'org.apache.httpcomponents', name: 'httpclient', version: httpClientVersion compile group: 'org.slf4j', name: 'slf4j-simple', version: slf4jVersion + implementation 'org.apache.logging.log4j:log4j-api:2.20.0' + implementation 'org.apache.logging.log4j:log4j-core:2.20.0' testCompile group: 'junit', name: 'junit', version: '4.12' } diff --git a/java-quickstart/src/main/resources/log4j2.properties b/java-quickstart/src/main/resources/log4j2.properties new file mode 100644 index 000000000..2f25ed139 --- /dev/null +++ b/java-quickstart/src/main/resources/log4j2.properties @@ -0,0 +1,10 @@ + +appenders = console +appender.console.type = Console +appender.console.name = STDOUT +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n + +rootLogger.level = debug +rootLogger.appenderRefs = stdout +rootLogger.appenderRef.stdout.ref = STDOUT \ No newline at end of file From b8adcf02c2406e44f61e954189d70e82867a345e Mon Sep 17 00:00:00 2001 From: Muzahidul Islam Date: Mon, 11 Sep 2023 21:40:41 +0600 Subject: [PATCH 2/3] Slf4j version updated to 2.0.9 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f8816af24..bd175a65f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,7 +18,7 @@ jacksonVersion = 2.13.5 jsonVersion = 20190722 jsonSimpleVersion = 1.1.1 logbackVersion = 1.2.3 -slf4jVersion = 1.7.30 +slf4jVersion = 2.0.9 httpClientVersion = 4.5.14 # Style Packages From aa99510c2ebc90b574477a7a43068c86122fbc08 Mon Sep 17 00:00:00 2001 From: Muzahidul Islam Date: Mon, 11 Sep 2023 21:54:01 +0600 Subject: [PATCH 3/3] Log4j properties updated --- java-quickstart/src/main/resources/log4j2.properties | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/java-quickstart/src/main/resources/log4j2.properties b/java-quickstart/src/main/resources/log4j2.properties index 2f25ed139..6d8da6d94 100644 --- a/java-quickstart/src/main/resources/log4j2.properties +++ b/java-quickstart/src/main/resources/log4j2.properties @@ -1,9 +1,8 @@ -appenders = console appender.console.type = Console appender.console.name = STDOUT appender.console.layout.type = PatternLayout -appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n +appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n rootLogger.level = debug rootLogger.appenderRefs = stdout