From b2cbc98589d8345b858ea6255376d98f60f1056c Mon Sep 17 00:00:00 2001 From: Collin Simon Date: Fri, 24 Jun 2022 10:05:54 +0000 Subject: [PATCH 1/3] Upgrade to log4j2 --- project.clj | 13 +++++++------ resources/log4j.properties | 6 ------ resources/log4j2.properties | 30 ++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 12 deletions(-) delete mode 100644 resources/log4j.properties create mode 100644 resources/log4j2.properties diff --git a/project.clj b/project.clj index 37d7665..23d0471 100644 --- a/project.clj +++ b/project.clj @@ -1,5 +1,5 @@ (defproject tap-mssql - "1.6.11" + "1.6.12" :description "Singer.io tap for extracting data from a Microsft SQL Server " :url "https://github.com/stitchdata/tap-mssql" :license {:name "GNU Affero General Public License Version 3; Other commercial licenses available." @@ -13,11 +13,11 @@ [com.microsoft.sqlserver/mssql-jdbc "7.2.1.jre8"] ;; logging - [org.clojure/tools.logging "0.3.1"] - [log4j "1.2.17" :exclusions [javax.mail/mail - javax.jms/jms - com.sun.jdmk/jmxtools - com.sun.jmx/jmxri]] + ;; Basic log4j dependency to declare bare minimum + [org.clojure/tools.logging "1.2.4"] + [org.slf4j/slf4j-log4j12 "1.7.36"] + [org.apache.logging.log4j/log4j-1.2-api "2.17.1"] + [org.apache.logging.log4j/log4j-core "2.17.1"] ;; repl [nrepl "0.6.0"] ;; For Lein 2.9.X @@ -28,5 +28,6 @@ ] :plugins [[lein-pprint "1.2.0"]] :main tap-mssql.core + :manifest {"Multi-Release" "true"} :profiles {:uberjar {:aot [tap-mssql.core]} :system {:java-cmd "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java"}}) diff --git a/resources/log4j.properties b/resources/log4j.properties deleted file mode 100644 index 61c60d4..0000000 --- a/resources/log4j.properties +++ /dev/null @@ -1,6 +0,0 @@ -log4j.rootLogger=INFO, console - -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.Target=System.err -log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=%p %m%n diff --git a/resources/log4j2.properties b/resources/log4j2.properties new file mode 100644 index 0000000..c919ab8 --- /dev/null +++ b/resources/log4j2.properties @@ -0,0 +1,30 @@ +# +# Relevant links +# https://logging.apache.org/log4j/2.x/manual/configuration.html#ConfigurationSyntax +# https://logging.apache.org/log4j/2.x/manual/configuration.html#Configuration_with_Properties +# https://logging.apache.org/log4j/2.x/manual/configuration.html#Configuring_Loggers +# + +status = warn +name = PropertiesConfig + +# Root logger level +rootLogger.level = INFO + +# Console appender configuration +appender.console.type = Console +appender.console.name = ConsoleLogger +appender.console.target = SYSTEM_ERR +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = %p [%t] %c - %m%n + +# Error appender configuration +appender.errors.type = Console +appender.errors.name = ErrorLogger +appender.errors.target = SYSTEM_ERR +appender.errors.layout.type = PatternLayout +appender.errors.layout.pattern = %p [%t] %m%n + +# Root logger referring to console appender +rootLogger.appenderRefs = console +rootLogger.appenderRef.console.ref = ConsoleLogger From 353ec54351b1b60205b9a6701a695d17d08fa23b Mon Sep 17 00:00:00 2001 From: Collin Simon Date: Fri, 24 Jun 2022 10:07:07 +0000 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb4a4ef..a0562e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.6.12 + * Upgrade to log4j2 [#77](https://github.com/stitchdata/tap-mssql/pull/77) + ## 1.6.11 * Fix RowVersion states for logical syncs [#76](https://github.com/stitchdata/tap-mssql/pull/76) From a146e4df9811eadd776c4a245e8dc3fcfa282a82 Mon Sep 17 00:00:00 2001 From: Collin Simon Date: Fri, 24 Jun 2022 10:35:26 +0000 Subject: [PATCH 3/3] Remove outdated comment [skip ci] --- project.clj | 1 - 1 file changed, 1 deletion(-) diff --git a/project.clj b/project.clj index 23d0471..800da19 100644 --- a/project.clj +++ b/project.clj @@ -13,7 +13,6 @@ [com.microsoft.sqlserver/mssql-jdbc "7.2.1.jre8"] ;; logging - ;; Basic log4j dependency to declare bare minimum [org.clojure/tools.logging "1.2.4"] [org.slf4j/slf4j-log4j12 "1.7.36"] [org.apache.logging.log4j/log4j-1.2-api "2.17.1"]