From e3606eb31df730364e9ddc46de0c19fc43ccca59 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Wed, 25 Aug 2021 11:32:19 +0200 Subject: [PATCH] [Logging] use only log4j-2 Loggers and only depend on api (#254) Also clean up logging dependencies. --- symja_android_library/matheclipse-api/pom.xml | 14 ++++++++++++++ .../evaluator/SymjaMMAWorkerThread.java | 10 ++++------ .../beakerx/symjamma/widgets/Interactive.java | 6 +++--- symja_android_library/matheclipse-core/pom.xml | 13 +------------ .../numbertheory/SortedMultiset_BottomUp.java | 5 +++-- .../numbertheory/SortedMultiset_TopDown.java | 6 +++--- .../longexponent/ExprTermOrderByName.java | 2 +- .../SymbolicTermOrderByName.java | 2 +- .../matheclipse-external/pom.xml | 13 +------------ symja_android_library/matheclipse-gpl/pom.xml | 7 +++++++ symja_android_library/matheclipse-io/pom.xml | 14 ++++++++++++++ symja_android_library/pom.xml | 18 ++++++++++++------ 12 files changed, 64 insertions(+), 46 deletions(-) diff --git a/symja_android_library/matheclipse-api/pom.xml b/symja_android_library/matheclipse-api/pom.xml index 02914e9944..d7c663f32c 100644 --- a/symja_android_library/matheclipse-api/pom.xml +++ b/symja_android_library/matheclipse-api/pom.xml @@ -57,6 +57,20 @@ encoder + + + + org.apache.logging.log4j + log4j-core + runtime + + + + org.apache.logging.log4j + log4j-slf4j-impl + runtime + + diff --git a/symja_android_library/matheclipse-beakerx/src/main/java/com/twosigma/beakerx/symjamma/evaluator/SymjaMMAWorkerThread.java b/symja_android_library/matheclipse-beakerx/src/main/java/com/twosigma/beakerx/symjamma/evaluator/SymjaMMAWorkerThread.java index 593ffc97fa..fa6a553518 100644 --- a/symja_android_library/matheclipse-beakerx/src/main/java/com/twosigma/beakerx/symjamma/evaluator/SymjaMMAWorkerThread.java +++ b/symja_android_library/matheclipse-beakerx/src/main/java/com/twosigma/beakerx/symjamma/evaluator/SymjaMMAWorkerThread.java @@ -15,17 +15,15 @@ */ package com.twosigma.beakerx.symjamma.evaluator; +import java.util.concurrent.Callable; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import com.twosigma.beakerx.TryResult; import com.twosigma.beakerx.evaluator.JobDescriptor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.concurrent.Callable; class SymjaMMAWorkerThread implements Callable { - private static final Logger logger = - LoggerFactory.getLogger(SymjaMMAWorkerThread.class.getName()); + private static final Logger logger = LogManager.getLogger(SymjaMMAWorkerThread.class.getName()); private final JobDescriptor j; protected SymjaMMAEvaluator symjaEvaluator; diff --git a/symja_android_library/matheclipse-beakerx/src/main/java/com/twosigma/beakerx/symjamma/widgets/Interactive.java b/symja_android_library/matheclipse-beakerx/src/main/java/com/twosigma/beakerx/symjamma/widgets/Interactive.java index 3345fb8eae..4f1ee44b7c 100644 --- a/symja_android_library/matheclipse-beakerx/src/main/java/com/twosigma/beakerx/symjamma/widgets/Interactive.java +++ b/symja_android_library/matheclipse-beakerx/src/main/java/com/twosigma/beakerx/symjamma/widgets/Interactive.java @@ -15,17 +15,17 @@ */ package com.twosigma.beakerx.symjamma.widgets; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import com.twosigma.beakerx.widget.InteractiveBase; import com.twosigma.beakerx.widget.Label; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class Interactive extends InteractiveBase { private static Label label; - private static final Logger logger = LoggerFactory.getLogger(Interactive.class); + private static final Logger logger = LogManager.getLogger(Interactive.class); // @SuppressWarnings("unchecked") // public static void interact(MethodClosure function, Object... parameters) { diff --git a/symja_android_library/matheclipse-core/pom.xml b/symja_android_library/matheclipse-core/pom.xml index 683cb1a47c..e72610dceb 100644 --- a/symja_android_library/matheclipse-core/pom.xml +++ b/symja_android_library/matheclipse-core/pom.xml @@ -108,18 +108,7 @@ org.apache.logging.log4j - log4j-core - - - - org.slf4j - slf4j-simple - test - - - - org.slf4j - log4j-over-slf4j + log4j-api diff --git a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/numbertheory/SortedMultiset_BottomUp.java b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/numbertheory/SortedMultiset_BottomUp.java index 7468ef8257..e8727f4dc7 100644 --- a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/numbertheory/SortedMultiset_BottomUp.java +++ b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/numbertheory/SortedMultiset_BottomUp.java @@ -7,8 +7,9 @@ import java.util.Map; import java.util.SortedSet; import java.util.TreeMap; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; -import org.apache.log4j.Logger; /** * A sorted set of elements with multiple occurrences, sorted smallest elements first. Sorting is @@ -23,7 +24,7 @@ public class SortedMultiset_BottomUp> extends TreeMap> extends TreeMap org.apache.logging.log4j - log4j-core - - - - org.slf4j - slf4j-simple - test - - - - org.slf4j - log4j-over-slf4j + log4j-api diff --git a/symja_android_library/matheclipse-gpl/pom.xml b/symja_android_library/matheclipse-gpl/pom.xml index 1dfcdce806..f51fd798bf 100644 --- a/symja_android_library/matheclipse-gpl/pom.xml +++ b/symja_android_library/matheclipse-gpl/pom.xml @@ -32,6 +32,13 @@ ${project.version} + + + + org.apache.logging.log4j + log4j-1.2-api + + diff --git a/symja_android_library/matheclipse-io/pom.xml b/symja_android_library/matheclipse-io/pom.xml index 4c0dd17496..9c7d427599 100644 --- a/symja_android_library/matheclipse-io/pom.xml +++ b/symja_android_library/matheclipse-io/pom.xml @@ -83,6 +83,20 @@ poi-ooxml + + + + org.apache.logging.log4j + log4j-core + runtime + + + + org.apache.logging.log4j + log4j-slf4j-impl + runtime + + diff --git a/symja_android_library/pom.xml b/symja_android_library/pom.xml index 2c3098009c..8f6aaf4531 100644 --- a/symja_android_library/pom.xml +++ b/symja_android_library/pom.xml @@ -301,6 +301,12 @@ + + org.apache.logging.log4j + log4j-api + 2.13.2 + + org.apache.logging.log4j log4j-core @@ -308,15 +314,15 @@ - org.slf4j - log4j-over-slf4j - 1.7.32 + org.apache.logging.log4j + log4j-1.2-api + 2.13.2 - org.slf4j - slf4j-simple - 1.7.32 + org.apache.logging.log4j + log4j-slf4j-impl + 2.13.2