diff --git a/.gitignore b/.gitignore index 848a4fe38a..d5a058342e 100644 --- a/.gitignore +++ b/.gitignore @@ -33,8 +33,8 @@ bin/ *.ear # log Files # -**/src/main/**/logback*.xml -**/src/test/**/logback*.xml +**/src/main/**/log4j*.xml +**/src/test/**/log4j*.xml # Credentials files # **/*.der diff --git a/build-config/demo-build-config/jar-with-dependencies-with-log4j2.xml b/build-config/demo-build-config/jar-with-dependencies-with-log4j2.xml new file mode 100644 index 0000000000..062d10f76e --- /dev/null +++ b/build-config/demo-build-config/jar-with-dependencies-with-log4j2.xml @@ -0,0 +1,33 @@ + + + jar-with-dependencies + + + jar + + + false + + + ${project.build.outputDirectory} + / + + log4j2.xml + + + + + + / + true + true + runtime + + *:*:*:tests + + + + + diff --git a/build-config/demo-build-config/jar-with-dependencies-with-logback.xml b/build-config/demo-build-config/jar-with-dependencies-with-logback.xml deleted file mode 100644 index 8bd0a6bdd7..0000000000 --- a/build-config/demo-build-config/jar-with-dependencies-with-logback.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - jar-with-dependencies - - jar - - false - - - logback-config.xml - logback.xml - - - - - / - true - true - runtime - - - *:*:*:tests - - - - \ No newline at end of file diff --git a/build-config/pom.xml b/build-config/pom.xml index 7bc923f6f2..b3a3af00cb 100644 --- a/build-config/pom.xml +++ b/build-config/pom.xml @@ -52,11 +52,8 @@ Contributors: maven-surefire-plugin - - logback-leshan-test.xml - - classes - 1 diff --git a/leshan-demo-bsserver/logback-config.xml b/leshan-demo-bsserver/logback-config.xml deleted file mode 100644 index e805621d8b..0000000000 --- a/leshan-demo-bsserver/logback-config.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %gray(%d) %gray(%-25logger{0}) [%highlight(%p)] %m %yellow(%X) %n - - - - - - - - - - - - - - \ No newline at end of file diff --git a/leshan-demo-bsserver/pom.xml b/leshan-demo-bsserver/pom.xml index d37dbb1d5b..ba27650db5 100644 --- a/leshan-demo-bsserver/pom.xml +++ b/leshan-demo-bsserver/pom.xml @@ -45,13 +45,6 @@ Contributors: org.eclipse.leshan leshan-demo-servers-shared - - - - ch.qos.logback - logback-classic - runtime - @@ -77,7 +70,7 @@ Contributors: - ../build-config/demo-build-config/jar-with-dependencies-with-logback.xml + ../build-config/demo-build-config/jar-with-dependencies-with-log4j2.xml diff --git a/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/LeshanBootstrapServerDemo.java b/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/LeshanBootstrapServerDemo.java index c410b64df3..081bb39500 100755 --- a/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/LeshanBootstrapServerDemo.java +++ b/leshan-demo-bsserver/src/main/java/org/eclipse/leshan/demo/bsserver/LeshanBootstrapServerDemo.java @@ -62,10 +62,10 @@ public class LeshanBootstrapServerDemo { static { - // Define a default logback.configurationFile - String property = System.getProperty("logback.configurationFile"); + // Define a default log4j.configurationFile + String property = System.getProperty("log4j2.configurationFile"); if (property == null) { - System.setProperty("logback.configurationFile", "logback-config.xml"); + System.setProperty("log4j2.configurationFile", "log4j2.xml"); } } diff --git a/leshan-demo-client/logback-config.xml b/leshan-demo-client/logback-config.xml deleted file mode 100644 index a59413ad1c..0000000000 --- a/leshan-demo-client/logback-config.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - %gray(%30.30logger{0}) %gray(%d) [%highlight(%p)] %m %yellow(%mdc) %n - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/leshan-demo-client/pom.xml b/leshan-demo-client/pom.xml index 8d0f3c7853..fe3ed604a7 100644 --- a/leshan-demo-client/pom.xml +++ b/leshan-demo-client/pom.xml @@ -62,7 +62,7 @@ Contributors: - ../build-config/demo-build-config/jar-with-dependencies-with-logback.xml + ../build-config/demo-build-config/jar-with-dependencies-with-log4j2.xml diff --git a/leshan-demo-client/src/main/java/org/eclipse/leshan/demo/client/LeshanClientDemo.java b/leshan-demo-client/src/main/java/org/eclipse/leshan/demo/client/LeshanClientDemo.java index e0e5a2e41b..819d2ffd44 100644 --- a/leshan-demo-client/src/main/java/org/eclipse/leshan/demo/client/LeshanClientDemo.java +++ b/leshan-demo-client/src/main/java/org/eclipse/leshan/demo/client/LeshanClientDemo.java @@ -90,10 +90,10 @@ public class LeshanClientDemo { static { - // Define a default logback.configurationFile - String property = System.getProperty("logback.configurationFile"); + // Define a default log4j2.configurationFile + String property = System.getProperty("log4j2.configurationFile"); if (property == null) { - System.setProperty("logback.configurationFile", "logback-config.xml"); + System.setProperty("log4j2.configurationFile", "log4j2.xml"); } } diff --git a/leshan-demo-server/logback-config.xml b/leshan-demo-server/logback-config.xml deleted file mode 100644 index c5c97301ea..0000000000 --- a/leshan-demo-server/logback-config.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - %gray(%d) %gray(%-20logger{0}) [%highlight(%p)] %m %yellow(%X) %n - - - - - - - - - - - - - \ No newline at end of file diff --git a/leshan-demo-server/pom.xml b/leshan-demo-server/pom.xml index c9ae278fbd..aad3e19d87 100644 --- a/leshan-demo-server/pom.xml +++ b/leshan-demo-server/pom.xml @@ -69,13 +69,6 @@ Contributors: commons-io commons-io - - - - ch.qos.logback - logback-classic - runtime - @@ -101,7 +94,7 @@ Contributors: - ../build-config/demo-build-config/jar-with-dependencies-with-logback.xml + ../build-config/demo-build-config/jar-with-dependencies-with-log4j2.xml diff --git a/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/LeshanServerDemo.java b/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/LeshanServerDemo.java index 253425e080..d7015d9ce1 100644 --- a/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/LeshanServerDemo.java +++ b/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/LeshanServerDemo.java @@ -74,10 +74,10 @@ public class LeshanServerDemo { static { - // Define a default logback.configurationFile - String property = System.getProperty("logback.configurationFile"); + // Define a default log4j2.configurationFile + String property = System.getProperty("log4j2.configurationFile"); if (property == null) { - System.setProperty("logback.configurationFile", "logback-config.xml"); + System.setProperty("log4j2.configurationFile", "log4j2.xml"); } } diff --git a/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/model/DdfDownloader.java b/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/model/DdfDownloader.java index 2275446268..6612a1e440 100644 --- a/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/model/DdfDownloader.java +++ b/leshan-demo-server/src/main/java/org/eclipse/leshan/demo/server/model/DdfDownloader.java @@ -49,10 +49,10 @@ public class DdfDownloader { static { - // Define a default logback.configurationFile - String property = System.getProperty("logback.configurationFile"); + // Define a default log4j2.configurationFile + String property = System.getProperty("log4j2.configurationFile"); if (property == null) { - System.setProperty("logback.configurationFile", "logback-config.xml"); + System.setProperty("log4j2.configurationFile", "log4j2.xml"); } } diff --git a/leshan-demo-shared/logback-leshan-test.xml b/leshan-demo-shared/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-demo-shared/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-demo-shared/pom.xml b/leshan-demo-shared/pom.xml index b8ddbc0c3e..be07d7817d 100644 --- a/leshan-demo-shared/pom.xml +++ b/leshan-demo-shared/pom.xml @@ -43,8 +43,16 @@ Contributors: picocli-shell-jline2 - ch.qos.logback - logback-classic + org.apache.logging.log4j + log4j-api + + + org.apache.logging.log4j + log4j-core + + + org.apache.logging.log4j + log4j-slf4j2-impl org.eclipse.californium diff --git a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/StandardHelpOptions.java b/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/StandardHelpOptions.java index f0994c979f..ddd7d419ce 100644 --- a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/StandardHelpOptions.java +++ b/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/StandardHelpOptions.java @@ -15,11 +15,12 @@ *******************************************************************************/ package org.eclipse.leshan.demo.cli; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.core.LoggerContext; +import org.apache.logging.log4j.core.config.LoggerConfig; import org.slf4j.LoggerFactory; -import ch.qos.logback.classic.Level; -import ch.qos.logback.classic.Logger; -import ch.qos.logback.classic.LoggerContext; import picocli.CommandLine.Option; /** @@ -39,7 +40,7 @@ public class StandardHelpOptions { description = { "Specify multiple -v options to increase verbosity.", // "For example, `-v -v -v` or `-vvv`", // "", // - "You can adjust more precisely log output using logback configuration file," + // + "You can adjust more precisely log output using log4j2 configuration file," + // " see 'How to activate more log ?' in FAQ:", // " https://github.com/eclipse/leshan/wiki/F.A.Q./" }) public void setVerbose(boolean[] verbose) { @@ -69,16 +70,25 @@ public void setVerbose(boolean[] verbose) { case 4: setLogLevel(loggerContext, "org.eclipse.leshan", Level.TRACE); setLogLevel(loggerContext, "org.eclipse.californium", Level.TRACE); - setLogLevel(loggerContext, Logger.ROOT_LOGGER_NAME, Level.TRACE); + setLogLevel(loggerContext, LogManager.ROOT_LOGGER_NAME, Level.TRACE); break; } } } - private void setLogLevel(LoggerContext loggerContext, String loggerName, Level level) { - Logger logger = loggerContext.getLogger(loggerName); - if (logger != null) - logger.setLevel(level); + private void setLogLevel(LoggerContext ctx, String loggerName, Level level) { + org.apache.logging.log4j.core.config.Configuration config = ctx.getConfiguration(); + LoggerConfig loggerConfig = config.getLoggerConfig(loggerName); + + // Jeśli logger nie istnieje, tworzymy własny + if (!loggerConfig.getName().equals(loggerName)) { + loggerConfig = new LoggerConfig(loggerName, level, true); + config.addLogger(loggerName, loggerConfig); + } else { + loggerConfig.setLevel(level); + } + + ctx.updateLoggers(); } public int getVerboseLevel() { diff --git a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/interactive/InteractiveCLI.java b/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/interactive/InteractiveCLI.java index 1c98f5d3bc..b79e952a32 100644 --- a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/interactive/InteractiveCLI.java +++ b/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/interactive/InteractiveCLI.java @@ -17,10 +17,6 @@ import java.io.IOException; -import org.slf4j.LoggerFactory; - -import ch.qos.logback.classic.Logger; -import ch.qos.logback.core.Appender; import jline.TerminalFactory; import jline.TerminalFactory.Type; import jline.console.ConsoleReader; @@ -58,12 +54,7 @@ public InteractiveCLI(JLineInteractiveCommands interactivesCommands) throws IOEx console.addCompleter(new PicocliJLineCompleter(commandLine.getCommandSpec())); - // Configure Terminal appender if it is present. - Appender appender = ((Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME)) - .getAppender("TERMINAL"); - if (appender instanceof TerminalAppender) { - ((TerminalAppender) appender).setConsole(console); - } + // LoggerContext ctx = (LoggerContext) LogManager.getContext(false); } public void showHelp() { diff --git a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/interactive/TerminalAppender.java b/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/interactive/TerminalAppender.java deleted file mode 100644 index f4c40106aa..0000000000 --- a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/cli/interactive/TerminalAppender.java +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Sierra Wireless and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v2.0 - * and Eclipse Distribution License v1.0 which accompany this distribution. - * - * The Eclipse Public License is available at - * http://www.eclipse.org/legal/epl-v20.html - * and the Eclipse Distribution License is available at - * http://www.eclipse.org/org/documents/edl-v10.html. - * - * Contributors: - * Sierra Wireless - initial API and implementation - *******************************************************************************/ -package org.eclipse.leshan.demo.cli.interactive; - -import java.io.IOException; - -import ch.qos.logback.core.ConsoleAppender; -import jline.console.ConsoleReader; - -/** - * A logback Console appender compatible with a Jline 2 Console reader. - */ -public class TerminalAppender extends ConsoleAppender { - - private ConsoleReader console; - private String prompt; - - @Override - protected void subAppend(E event) { - if (console == null || !console.getTerminal().isAnsiSupported()) - super.subAppend(event); - else { - // stash prompt - String stashed = ""; - try { - stashed = console.getCursorBuffer().copy().toString(); - console.resetPromptLine("", "", -1); - } catch (IOException e) { - e.printStackTrace(); - } - - // Display logs - super.subAppend(event); - - // unstash prompt - try { - console.resetPromptLine(prompt, stashed, -1); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - public void setConsole(ConsoleReader console) { - this.console = console; - this.prompt = console.getPrompt(); - } -} diff --git a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/logback/ColorAwarePatternLayout.java b/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/logback/ColorAwarePatternLayout.java deleted file mode 100644 index c0674c0b67..0000000000 --- a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/logback/ColorAwarePatternLayout.java +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Sierra Wireless and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v2.0 - * and Eclipse Distribution License v1.0 which accompany this distribution. - * - * The Eclipse Public License is available at - * http://www.eclipse.org/legal/epl-v20.html - * and the Eclipse Distribution License is available at - * http://www.eclipse.org/org/documents/edl-v10.html. - * - * Contributors: - * Sierra Wireless - initial API and implementation - *******************************************************************************/ -package org.eclipse.leshan.demo.logback; - -import ch.qos.logback.classic.PatternLayout; -import picocli.CommandLine.Help.Ansi; - -/** - * A Logback Pattern Layout which use Picocli ANSI color heuristic to apply ANSI color only on terminal which support - * it. - */ -public class ColorAwarePatternLayout extends PatternLayout { - - static { - if (!Ansi.AUTO.enabled()) { - DEFAULT_CONVERTER_MAP.put("black", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("red", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("green", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("yellow", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("blue", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("magenta", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("cyan", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("white", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("gray", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("boldRed", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("boldGreen", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("boldYellow", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("boldBlue", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("boldMagenta", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("boldCyan", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("boldWhite", NoColorConverter.class.getName()); - DEFAULT_CONVERTER_MAP.put("highlight", NoColorConverter.class.getName()); - } - } -} diff --git a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/logback/NoColorConverter.java b/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/logback/NoColorConverter.java deleted file mode 100644 index c80c52e540..0000000000 --- a/leshan-demo-shared/src/main/java/org/eclipse/leshan/demo/logback/NoColorConverter.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2021 Sierra Wireless and others. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v2.0 - * and Eclipse Distribution License v1.0 which accompany this distribution. - * - * The Eclipse Public License is available at - * http://www.eclipse.org/legal/epl-v20.html - * and the Eclipse Distribution License is available at - * http://www.eclipse.org/org/documents/edl-v10.html. - * - * Contributors: - * Sierra Wireless - initial API and implementation - *******************************************************************************/ -package org.eclipse.leshan.demo.logback; - -import ch.qos.logback.core.pattern.CompositeConverter; - -public class NoColorConverter extends CompositeConverter { - - @Override - protected String transform(E event, String in) { - return in; - } -} diff --git a/leshan-integration-tests/logback-leshan-test.xml b/leshan-integration-tests/logback-leshan-test.xml deleted file mode 100644 index d11f6ca1d4..0000000000 --- a/leshan-integration-tests/logback-leshan-test.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - - - - diff --git a/leshan-integration-tests/pom.xml b/leshan-integration-tests/pom.xml index 46684e9287..a7792d6367 100644 --- a/leshan-integration-tests/pom.xml +++ b/leshan-integration-tests/pom.xml @@ -106,8 +106,18 @@ Contributors: test - ch.qos.logback - logback-classic + org.apache.logging.log4j + log4j-api + test + + + org.apache.logging.log4j + log4j-core + test + + + org.apache.logging.log4j + log4j-slf4j2-impl test diff --git a/leshan-lwm2m-bsserver/logback-leshan-test.xml b/leshan-lwm2m-bsserver/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-lwm2m-bsserver/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-lwm2m-bsserver/pom.xml b/leshan-lwm2m-bsserver/pom.xml index 0f029e4b0d..4ad4352006 100644 --- a/leshan-lwm2m-bsserver/pom.xml +++ b/leshan-lwm2m-bsserver/pom.xml @@ -53,13 +53,24 @@ Contributors: test-jar - ch.qos.logback - logback-classic + nl.jqno.equalsverifier + equalsverifier + + + org.apache.logging.log4j + log4j-api test - nl.jqno.equalsverifier - equalsverifier + org.apache.logging.log4j + log4j-core + test + + org.apache.logging.log4j + log4j-slf4j2-impl + test + + diff --git a/leshan-lwm2m-client/logback-leshan-test.xml b/leshan-lwm2m-client/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-lwm2m-client/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-lwm2m-client/pom.xml b/leshan-lwm2m-client/pom.xml index 879cb2bd86..9e9c324a9c 100644 --- a/leshan-lwm2m-client/pom.xml +++ b/leshan-lwm2m-client/pom.xml @@ -37,6 +37,12 @@ Contributors: + + org.apache.logging.log4j + log4j-slf4j2-impl + ${log4j2.version} + test + org.junit.jupiter junit-jupiter @@ -48,11 +54,6 @@ Contributors: ${project.version} test-jar - - ch.qos.logback - logback-classic - test - nl.jqno.equalsverifier equalsverifier diff --git a/leshan-lwm2m-core/logback-leshan-test.xml b/leshan-lwm2m-core/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-lwm2m-core/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-lwm2m-core/pom.xml b/leshan-lwm2m-core/pom.xml index c31f416cc7..4e886a8765 100644 --- a/leshan-lwm2m-core/pom.xml +++ b/leshan-lwm2m-core/pom.xml @@ -46,6 +46,12 @@ Contributors: + + org.apache.logging.log4j + log4j-slf4j2-impl + ${log4j2.version} + test + org.junit.jupiter junit-jupiter @@ -56,11 +62,6 @@ Contributors: equalsverifier test - - ch.qos.logback - logback-classic - test - diff --git a/leshan-lwm2m-server-redis/pom.xml b/leshan-lwm2m-server-redis/pom.xml index 85eaace014..ce1ca3aedc 100644 --- a/leshan-lwm2m-server-redis/pom.xml +++ b/leshan-lwm2m-server-redis/pom.xml @@ -39,6 +39,10 @@ Contributors: redis.clients jedis + + org.mockito + mockito-core + @@ -46,5 +50,20 @@ Contributors: junit-jupiter test + + org.apache.logging.log4j + log4j-api + test + + + org.apache.logging.log4j + log4j-core + test + + + org.apache.logging.log4j + log4j-slf4j2-impl + test + diff --git a/leshan-lwm2m-server/logback-leshan-test.xml b/leshan-lwm2m-server/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-lwm2m-server/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-lwm2m-server/pom.xml b/leshan-lwm2m-server/pom.xml index 22645ae066..a3ed161a3d 100644 --- a/leshan-lwm2m-server/pom.xml +++ b/leshan-lwm2m-server/pom.xml @@ -53,13 +53,24 @@ Contributors: test-jar - ch.qos.logback - logback-classic + nl.jqno.equalsverifier + equalsverifier + + + org.apache.logging.log4j + log4j-api test - nl.jqno.equalsverifier - equalsverifier + org.apache.logging.log4j + log4j-core + test + + org.apache.logging.log4j + log4j-slf4j2-impl + test + + diff --git a/leshan-lwm2m-servers-shared/logback-leshan-test.xml b/leshan-lwm2m-servers-shared/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-lwm2m-servers-shared/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-lwm2m-servers-shared/pom.xml b/leshan-lwm2m-servers-shared/pom.xml index 5854cbad31..90951c7f13 100644 --- a/leshan-lwm2m-servers-shared/pom.xml +++ b/leshan-lwm2m-servers-shared/pom.xml @@ -42,11 +42,6 @@ Contributors: junit-jupiter test - - ch.qos.logback - logback-classic - test - nl.jqno.equalsverifier equalsverifier diff --git a/leshan-tl-cf-bsserver-coap-oscore/logback-leshan-test.xml b/leshan-tl-cf-bsserver-coap-oscore/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-tl-cf-bsserver-coap-oscore/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-cf-bsserver-coap-oscore/pom.xml b/leshan-tl-cf-bsserver-coap-oscore/pom.xml index eea8364292..35ddb73b51 100644 --- a/leshan-tl-cf-bsserver-coap-oscore/pom.xml +++ b/leshan-tl-cf-bsserver-coap-oscore/pom.xml @@ -46,11 +46,6 @@ Contributors: junit-jupiter test - - ch.qos.logback - logback-classic - test - diff --git a/leshan-tl-cf-bsserver-coap/logback-leshan-test.xml b/leshan-tl-cf-bsserver-coap/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-tl-cf-bsserver-coap/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-cf-bsserver-coap/pom.xml b/leshan-tl-cf-bsserver-coap/pom.xml index 990a6830f4..c03b932beb 100644 --- a/leshan-tl-cf-bsserver-coap/pom.xml +++ b/leshan-tl-cf-bsserver-coap/pom.xml @@ -55,8 +55,18 @@ Contributors: test - ch.qos.logback - logback-classic + org.apache.logging.log4j + log4j-api + test + + + org.apache.logging.log4j + log4j-core + test + + + org.apache.logging.log4j + log4j-slf4j2-impl test diff --git a/leshan-tl-cf-client-coap-oscore/logback-leshan-test.xml b/leshan-tl-cf-client-coap-oscore/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-tl-cf-client-coap-oscore/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-cf-client-coap/logback-leshan-test.xml b/leshan-tl-cf-client-coap/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-tl-cf-client-coap/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-cf-server-coap-oscore/logback-leshan-test.xml b/leshan-tl-cf-server-coap-oscore/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-tl-cf-server-coap-oscore/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-cf-server-coap-oscore/pom.xml b/leshan-tl-cf-server-coap-oscore/pom.xml index 5a54a595b3..6671a5d6bc 100644 --- a/leshan-tl-cf-server-coap-oscore/pom.xml +++ b/leshan-tl-cf-server-coap-oscore/pom.xml @@ -46,11 +46,6 @@ Contributors: junit-jupiter test - - ch.qos.logback - logback-classic - test - diff --git a/leshan-tl-cf-server-coap/logback-leshan-test.xml b/leshan-tl-cf-server-coap/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-tl-cf-server-coap/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-cf-server-coap/pom.xml b/leshan-tl-cf-server-coap/pom.xml index 2e04512441..d694689a81 100644 --- a/leshan-tl-cf-server-coap/pom.xml +++ b/leshan-tl-cf-server-coap/pom.xml @@ -55,14 +55,25 @@ Contributors: test - ch.qos.logback - logback-classic + nl.jqno.equalsverifier + equalsverifier + + + org.apache.logging.log4j + log4j-api test - nl.jqno.equalsverifier - equalsverifier + org.apache.logging.log4j + log4j-core + test + + org.apache.logging.log4j + log4j-slf4j2-impl + test + + diff --git a/leshan-tl-cf-shared-oscore/logback-leshan-test.xml b/leshan-tl-cf-shared-oscore/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-tl-cf-shared-oscore/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-cf-shared/logback-leshan-test.xml b/leshan-tl-cf-shared/logback-leshan-test.xml deleted file mode 100644 index df0891d8fb..0000000000 --- a/leshan-tl-cf-shared/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-jc-server-coap/logback-leshan-test.xml b/leshan-tl-jc-server-coap/logback-leshan-test.xml deleted file mode 100644 index 2e93285e57..0000000000 --- a/leshan-tl-jc-server-coap/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-jc-server-coaptcp/logback-leshan-test.xml b/leshan-tl-jc-server-coaptcp/logback-leshan-test.xml deleted file mode 100644 index 2e93285e57..0000000000 --- a/leshan-tl-jc-server-coaptcp/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/leshan-tl-jc-shared/logback-leshan-test.xml b/leshan-tl-jc-shared/logback-leshan-test.xml deleted file mode 100644 index 2e93285e57..0000000000 --- a/leshan-tl-jc-shared/logback-leshan-test.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - %d %p %C{1} [%t] %m%n - - - - - - - - diff --git a/pom.xml b/pom.xml index 0d41a794ab..c5a1e9d366 100644 --- a/pom.xml +++ b/pom.xml @@ -134,7 +134,7 @@ Contributors: 4.0.0-M6 - 1.3.16 + 2.25.3 6.21.0 4.1.125.Final 2.0.17 @@ -328,17 +328,19 @@ Contributors: - ch.qos.logback - logback-classic - ${logback.version} - - - - javax.servlet - javax.servlet-api - - + org.apache.logging.log4j + log4j-api + ${log4j2.version} + + + org.apache.logging.log4j + log4j-core + ${log4j2.version} + + + org.apache.logging.log4j + log4j-slf4j2-impl + ${log4j2.version} org.apache.commons