From 84dea46a356fe3141c00f10f977e48644670cc8c Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Tue, 4 Jan 2022 12:55:33 +0100 Subject: [PATCH] Update logging --- pom.xml | 2 +- src/main/java/it/cavallium/dbengine/database/LLRange.java | 1 - src/test/java/it/cavallium/dbengine/TestDictionaryMap.java | 6 +++--- .../java/it/cavallium/dbengine/TestDictionaryMapDeep.java | 6 +++--- src/test/java/it/cavallium/dbengine/TestLLDictionary.java | 6 +++--- src/test/java/it/cavallium/dbengine/TestLuceneIndex.java | 6 +++--- src/test/java/it/cavallium/dbengine/TestLuceneSearches.java | 6 +++--- 7 files changed, 16 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 1cd02bd..b96a59e 100644 --- a/pom.xml +++ b/pom.xml @@ -269,7 +269,7 @@ org.warp common-utils - 1.1.6 + 1.1.7 io.net5 diff --git a/src/main/java/it/cavallium/dbengine/database/LLRange.java b/src/main/java/it/cavallium/dbengine/database/LLRange.java index 3c2fa03..1225ff1 100644 --- a/src/main/java/it/cavallium/dbengine/database/LLRange.java +++ b/src/main/java/it/cavallium/dbengine/database/LLRange.java @@ -11,7 +11,6 @@ import java.util.StringJoiner; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.Nullable; -import org.warp.commonutils.log.LoggerFactory; /** * Range of data, from min (inclusive),to max (exclusive) diff --git a/src/test/java/it/cavallium/dbengine/TestDictionaryMap.java b/src/test/java/it/cavallium/dbengine/TestDictionaryMap.java index 0f86589..93dd8a4 100644 --- a/src/test/java/it/cavallium/dbengine/TestDictionaryMap.java +++ b/src/test/java/it/cavallium/dbengine/TestDictionaryMap.java @@ -17,14 +17,14 @@ import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -import org.warp.commonutils.log.Logger; -import org.warp.commonutils.log.LoggerFactory; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -36,7 +36,7 @@ import reactor.util.function.Tuples; public abstract class TestDictionaryMap { - private static final Logger log = LoggerFactory.getLogger(TestDictionaryMap.class); + private static final Logger log = LogManager.getLogger(TestDictionaryMap.class); private TestAllocator allocator; private boolean checkLeaks = true; diff --git a/src/test/java/it/cavallium/dbengine/TestDictionaryMapDeep.java b/src/test/java/it/cavallium/dbengine/TestDictionaryMapDeep.java index 7f9fa26..f611bb8 100644 --- a/src/test/java/it/cavallium/dbengine/TestDictionaryMapDeep.java +++ b/src/test/java/it/cavallium/dbengine/TestDictionaryMapDeep.java @@ -29,6 +29,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; @@ -37,8 +39,6 @@ import org.junit.jupiter.api.TestMethodOrder; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -import org.warp.commonutils.log.Logger; -import org.warp.commonutils.log.LoggerFactory; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -52,7 +52,7 @@ import reactor.util.function.Tuples; @TestMethodOrder(MethodOrderer.MethodName.class) public abstract class TestDictionaryMapDeep { - private final Logger log = LoggerFactory.getLogger(this.getClass()); + private final Logger log = LogManager.getLogger(this.getClass()); private TestAllocator allocator; private boolean checkLeaks = true; diff --git a/src/test/java/it/cavallium/dbengine/TestLLDictionary.java b/src/test/java/it/cavallium/dbengine/TestLLDictionary.java index 3bf23a5..c337fa7 100644 --- a/src/test/java/it/cavallium/dbengine/TestLLDictionary.java +++ b/src/test/java/it/cavallium/dbengine/TestLLDictionary.java @@ -21,6 +21,8 @@ import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Objects; import java.util.stream.Stream; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; @@ -28,15 +30,13 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -import org.warp.commonutils.log.Logger; -import org.warp.commonutils.log.LoggerFactory; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; public abstract class TestLLDictionary { - private final Logger log = LoggerFactory.getLogger(this.getClass()); + private final Logger log = LogManager.getLogger(this.getClass()); private static final Mono> RANGE_ALL = Mono.fromCallable(() -> LLRange.all().send()); private TestAllocator allocator; private TempDb tempDb; diff --git a/src/test/java/it/cavallium/dbengine/TestLuceneIndex.java b/src/test/java/it/cavallium/dbengine/TestLuceneIndex.java index 7afb3a2..4909dbd 100644 --- a/src/test/java/it/cavallium/dbengine/TestLuceneIndex.java +++ b/src/test/java/it/cavallium/dbengine/TestLuceneIndex.java @@ -24,6 +24,8 @@ import it.cavallium.dbengine.lucene.searcher.MultiSearcher; import java.io.IOException; import java.util.Objects; import java.util.stream.Stream; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.Nullable; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; @@ -34,14 +36,12 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -import org.warp.commonutils.log.Logger; -import org.warp.commonutils.log.LoggerFactory; import reactor.core.publisher.Flux; import reactor.util.function.Tuples; public class TestLuceneIndex { - private final Logger log = LoggerFactory.getLogger(this.getClass()); + private final Logger log = LogManager.getLogger(this.getClass()); private static LLTempLMDBEnv ENV; private TestAllocator allocator; diff --git a/src/test/java/it/cavallium/dbengine/TestLuceneSearches.java b/src/test/java/it/cavallium/dbengine/TestLuceneSearches.java index 35bb720..66fff6c 100644 --- a/src/test/java/it/cavallium/dbengine/TestLuceneSearches.java +++ b/src/test/java/it/cavallium/dbengine/TestLuceneSearches.java @@ -51,6 +51,8 @@ import java.util.Objects; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.lang3.function.FailableConsumer; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.Nullable; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; @@ -60,8 +62,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -import org.warp.commonutils.log.Logger; -import org.warp.commonutils.log.LoggerFactory; import reactor.core.publisher.Flux; import reactor.core.publisher.FluxSink.OverflowStrategy; import reactor.core.scheduler.Schedulers; @@ -69,7 +69,7 @@ import reactor.util.function.Tuples; public class TestLuceneSearches { - private static final Logger log = LoggerFactory.getLogger(TestLuceneSearches.class); + private static final Logger log = LogManager.getLogger(TestLuceneSearches.class); private static LLTempLMDBEnv ENV; private static final MemoryTemporaryDbGenerator TEMP_DB_GENERATOR = new MemoryTemporaryDbGenerator();