Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package slf4j2 for openSUSE:Factory checked in at 2026-05-14 21:43:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/slf4j2 (Old) and /work/SRC/openSUSE:Factory/.slf4j2.new.1966 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "slf4j2" Thu May 14 21:43:39 2026 rev:3 rq:1353081 version:2.0.18 Changes: -------- --- /work/SRC/openSUSE:Factory/slf4j2/slf4j2.changes 2026-05-09 13:01:08.328349278 +0200 +++ /work/SRC/openSUSE:Factory/.slf4j2.new.1966/slf4j2.changes 2026-05-14 21:43:45.740581996 +0200 @@ -1,0 +2,13 @@ +Wed May 13 15:02:15 UTC 2026 - Fridrich Strba <[email protected]> + +- Update to version 2.0.18 + * Changes + + In the logViaLocationAwareLoggerAPI() method of + slf4j-api/DefaultLoggingEventBuilder the first marker from the + markerList is now passed to locationAwareLogger.log() instead + of null. + + The renderLevel() method in slf4j-simple/SimpleLogger now uses + CONFIG_PARAMS.warnLevelString for WARN instead of hardcoded + "WARN". + +------------------------------------------------------------------- Old: ---- slf4j-2.0.17.tar.xz New: ---- slf4j-2.0.18.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ slf4j2.spec ++++++ --- /var/tmp/diff_new_pack.2OJMAs/_old 2026-05-14 21:43:46.280604148 +0200 +++ /var/tmp/diff_new_pack.2OJMAs/_new 2026-05-14 21:43:46.280604148 +0200 @@ -20,7 +20,7 @@ %global base_name slf4j %global version_suffix 2 Name: %{base_name}%{version_suffix} -Version: 2.0.17 +Version: 2.0.18 Release: 0 Summary: Simple Logging Facade for Java # the log4j-over-slf4j and jcl-over-slf4j submodules are ASL 2.0, rest is MIT ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.2OJMAs/_old 2026-05-14 21:43:46.324605953 +0200 +++ /var/tmp/diff_new_pack.2OJMAs/_new 2026-05-14 21:43:46.328606117 +0200 @@ -1,6 +1,6 @@ -mtime: 1778308915 -commit: 6668f396077e4858caa1d5e8112566c5835a6f1e1e29a31aeeac0494f7737de4 +mtime: 1778684697 +commit: ebec4ac75ae6eddfbbb2d77677cbd15b89f6892bb408a6dff78c10d8010daf85 url: https://src.opensuse.org/java-packages/slf4j2 -revision: 6668f396077e4858caa1d5e8112566c5835a6f1e1e29a31aeeac0494f7737de4 +revision: ebec4ac75ae6eddfbbb2d77677cbd15b89f6892bb408a6dff78c10d8010daf85 projectscmsync: https://src.opensuse.org/java-packages/_ObsPrj ++++++ _service ++++++ --- /var/tmp/diff_new_pack.2OJMAs/_old 2026-05-14 21:43:46.344606773 +0200 +++ /var/tmp/diff_new_pack.2OJMAs/_new 2026-05-14 21:43:46.364607594 +0200 @@ -2,7 +2,7 @@ <service name="tar_scm" mode="disabled"> <param name="scm">git</param> <param name="url">https://github.com/qos-ch/slf4j.git</param> - <param name="revision">v_2.0.17</param> + <param name="revision">v_2.0.18</param> <param name="match-tag">v_*</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v_(.*)</param> ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-05-13 17:04:57.000000000 +0200 @@ -0,0 +1 @@ +.osc ++++++ slf4j-2.0.17.tar.xz -> slf4j-2.0.18.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/integration/build.xml new/slf4j-2.0.18/integration/build.xml --- old/slf4j-2.0.17/integration/build.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/integration/build.xml 2026-05-12 20:32:21.000000000 +0200 @@ -82,12 +82,12 @@ </target> <target name="testAll" depends="init, - testNoProvider150, + testNoProvider150, testMismatch, testMatch, - testMultiBinding, - testFuture_16Series, - testActiveSecurityManager"> + testMultiBinding, + testFuture_16Series" + > </target> @@ -201,7 +201,7 @@ <property name="path_to_policy" value="file:./src/policy/java-under-ant.policy"/> </target> - + <!-- no longer supported in JDK 24 and later --> <target name="testActiveSecurityManager" depends="setPathToPolicy_FromTop, setPathToPolicy_FromIntegration"> <junit printsummary="yes" fork="no" haltonfailure="yes"> <jvmarg value="-Djava.security.manager"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/integration/pom.xml new/slf4j-2.0.18/integration/pom.xml --- old/slf4j-2.0.17/integration/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/integration/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/jcl-over-slf4j/pom.xml new/slf4j-2.0.18/jcl-over-slf4j/pom.xml --- old/slf4j-2.0.17/jcl-over-slf4j/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/jcl-over-slf4j/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -5,7 +5,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/jul-to-slf4j/pom.xml new/slf4j-2.0.18/jul-to-slf4j/pom.xml --- old/slf4j-2.0.17/jul-to-slf4j/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/jul-to-slf4j/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/log4j-over-slf4j/compatibility/build.xml new/slf4j-2.0.18/log4j-over-slf4j/compatibility/build.xml --- old/slf4j-2.0.17/log4j-over-slf4j/compatibility/build.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/log4j-over-slf4j/compatibility/build.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,137 +0,0 @@ -<project name="testing-log4j-bridge" default="usage" basedir="."> - - <property name="lbversion" value="0.9.8-SNAPSHOT" /> - <property name="slf4jversion" value="1.4.2" /> - <property name="source.home" value="./src/main/java/" /> - <property name="javac.dest.12" value="./target/classes12/" /> - <property name="javac.dest.13" value="./target/classes13/" /> - <property name="lib" value="./lib" /> - - <property name="deprecation" value="on" /> - - <path id="basic.classpath"> - <pathelement location="${source.home}" /> - <pathelement location="${lib}/junit-3.8.1.jar" /> - </path> - - <path id="log4j12.classpath"> - <path refid="basic.classpath" /> - <pathelement location="${javac.dest.12}" /> - <pathelement location="${lib}/log4j-1.2.14.jar" /> - </path> - - <path id="log4j13.classpath"> - <path refid="basic.classpath" /> - <pathelement location="${javac.dest.13}" /> - <pathelement location="${lib}/log4j-1.3alpha-8.jar" /> - </path> - - <path id="los.classpath"> - <path refid="basic.classpath" /> - <pathelement location="${lib}/log4j-over-slf4j-${slf4jversion}.jar" /> - <pathelement location="${lib}/logback-classic-${lbversion}.jar" /> - <pathelement location="${lib}/logback-core-${lbversion}.jar" /> - <pathelement location="${lib}/slf4j-api-${slf4jversion}.jar" /> - </path> - - <!-- ================================================================= --> - <!-- Default target --> - <!-- ================================================================= --> - <target name="usage"> - <echo> - These are some of the targets supported by this ANT build script: - - all - run all available tests - refresh - copy required jar files to the lib directory - </echo> - </target> - - <delete> - <fileset dir="." includes="**/*.bak"/> - </delete> - - <target name="refresh"> - <delete> - <fileset dir="lib"> - <include name="logback-*.jar"/> - <include name="log4j-bridge-*.jar"/> - </fileset> - </delete> - <copy file="../../slf4j-api/target/slf4j-api-${slf4jversion}.jar" todir="lib/"/> - <copy file="../target/log4j-over-slf4j-${slf4jversion}.jar" todir="lib/"/> - - </target> - - - <target name="init"> - <mkdir dir="${javac.dest.12}" /> - <mkdir dir="${javac.dest.13}" /> - </target> - - <target name="clean"> - <delete> - <fileset dir="${javac.dest.12}" includes="**" /> - <fileset dir="${javac.dest.13}" includes="**" /> - </delete> - </target> - - <target name="build_log4j12" depends="init"> - <javac srcdir="${source.home}" - destdir="${javac.dest.12}" - includes="**/Log4j12Calls.java" - deprecation="${deprecation}" debug="on"> - <classpath refid="log4j12.classpath" /> - </javac> - </target> - - <target name="build_log4j13" depends="init"> - <javac srcdir="${source.home}" - destdir="${javac.dest.13}" - includes="**/Log4j13Calls.java" deprecation="${deprecation}" debug="on"> - <classpath refid="log4j13.classpath" /> - </javac> - </target> - - <target name="build_loggerTest" depends="init"> - <javac srcdir="${source.home}" - destdir="${javac.dest.12}" - includes="**/LoggerTest.java" - deprecation="${deprecation}" debug="on"> - <classpath refid="los.classpath" /> - </javac> - </target> - - <!-- ================================================================= --> - <!-- Run tests --> - <!-- ================================================================= --> - <target name="all" depends="test12, test13, loggerTest" /> - - - <target name="loggerTest" depends="build_loggerTest"> - <junit printsummary="yes" fork="yes" haltonfailure="yes"> - <classpath refid="los.classpath" /> - <classpath location="${javac.dest.12}" /> - <formatter type="plain" usefile="false" /> - <test name="test.LoggerTest" /> - </junit> - </target> - - <target name="test12" depends="build_log4j12"> - <junit printsummary="yes" fork="yes" haltonfailure="yes"> - <classpath refid="los.classpath" /> - <classpath location="${javac.dest.12}" /> - <formatter type="plain" usefile="false" /> - <test name="test.Log4j12Calls" /> - </junit> - </target> - - <target name="test13" depends="build_log4j13"> - <junit printsummary="yes" fork="yes" haltonfailure="yes"> - <classpath refid="los.classpath" /> - <classpath location="${javac.dest.13}" /> - <formatter type="plain" usefile="false" /> - <test name="test.Log4j13Calls" /> - </junit> - </target> - -</project> Binary files old/slf4j-2.0.17/log4j-over-slf4j/compatibility/lib/junit-3.8.1.jar and new/slf4j-2.0.18/log4j-over-slf4j/compatibility/lib/junit-3.8.1.jar differ Binary files old/slf4j-2.0.17/log4j-over-slf4j/compatibility/lib/log4j-1.2.14.jar and new/slf4j-2.0.18/log4j-over-slf4j/compatibility/lib/log4j-1.2.14.jar differ Binary files old/slf4j-2.0.17/log4j-over-slf4j/compatibility/lib/log4j-1.3alpha-8.jar and new/slf4j-2.0.18/log4j-over-slf4j/compatibility/lib/log4j-1.3alpha-8.jar differ Binary files old/slf4j-2.0.17/log4j-over-slf4j/compatibility/lib/log4j-over-slf4j-1.4.2.jar and new/slf4j-2.0.18/log4j-over-slf4j/compatibility/lib/log4j-over-slf4j-1.4.2.jar differ Binary files old/slf4j-2.0.17/log4j-over-slf4j/compatibility/lib/logback-classic-0.9.8-SNAPSHOT.jar and new/slf4j-2.0.18/log4j-over-slf4j/compatibility/lib/logback-classic-0.9.8-SNAPSHOT.jar differ Binary files old/slf4j-2.0.17/log4j-over-slf4j/compatibility/lib/logback-core-0.9.8-SNAPSHOT.jar and new/slf4j-2.0.18/log4j-over-slf4j/compatibility/lib/logback-core-0.9.8-SNAPSHOT.jar differ Binary files old/slf4j-2.0.17/log4j-over-slf4j/compatibility/lib/slf4j-api-1.4.2.jar and new/slf4j-2.0.18/log4j-over-slf4j/compatibility/lib/slf4j-api-1.4.2.jar differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/log4j-over-slf4j/compatibility/readme.txt new/slf4j-2.0.18/log4j-over-slf4j/compatibility/readme.txt --- old/slf4j-2.0.17/log4j-over-slf4j/compatibility/readme.txt 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/log4j-over-slf4j/compatibility/readme.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ - -This directory is used to test the module against various log4j calls. -Two test cases simulate the typical calls that one can find in an application -that uses either log4j 1.2.x, or log4j 1.3.x. - -In the same directory is a build.xml file that uses ant to -compile the test cases with the corresponding log4j version, -and to run these tests without log4j in the classpath but with -logback jars instead. - -To run the tests, one must have ant installed. Issuing the following command, -once in the compatibility directory will launch the tests: - -ant all - -To obtain more information about the use of the log4j-over-slf4j module, -please visit http://www.slf4j.org/log4j-over-slf4j.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/log4j-over-slf4j/compatibility/src/main/java/test/DummyObject.java new/slf4j-2.0.18/log4j-over-slf4j/compatibility/src/main/java/test/DummyObject.java --- old/slf4j-2.0.17/log4j-over-slf4j/compatibility/src/main/java/test/DummyObject.java 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/log4j-over-slf4j/compatibility/src/main/java/test/DummyObject.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -package test; - -public class DummyObject { - - public String toString() { - return "dummy"; - } -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/log4j-over-slf4j/compatibility/src/main/java/test/Log4j12Calls.java new/slf4j-2.0.18/log4j-over-slf4j/compatibility/src/main/java/test/Log4j12Calls.java --- old/slf4j-2.0.17/log4j-over-slf4j/compatibility/src/main/java/test/Log4j12Calls.java 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/log4j-over-slf4j/compatibility/src/main/java/test/Log4j12Calls.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,39 +0,0 @@ -/** - * Logback: the reliable, generic, fast and flexible logging framework. - * - * Copyright (C) 1999-2006, QOS.ch - * - * This library is free software, you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation. - */ -package test; - -import junit.framework.TestCase; - -import org.apache.log4j.Logger; -import org.apache.log4j.MDC; - -/** - * - * A test case that issues the typical calls - * that an application using log4j 1.2 would do. - * - * @author Ceki Gülcü - * @author Sébastien Pennec - */ -public class Log4j12Calls extends TestCase { - public static final Logger logger = Logger.getLogger(Log4j12Calls.class); - - public void testLog() { - MDC.put("key", "value1"); - - logger.trace("Trace level can be noisy"); - logger.debug("Entering application"); - logger.info("Violets are blue"); - logger.warn("Here is a warning"); - logger.error("Exiting application", new Exception("just testing")); - - MDC.remove("key"); - } -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/log4j-over-slf4j/compatibility/src/main/java/test/Log4j13Calls.java new/slf4j-2.0.18/log4j-over-slf4j/compatibility/src/main/java/test/Log4j13Calls.java --- old/slf4j-2.0.17/log4j-over-slf4j/compatibility/src/main/java/test/Log4j13Calls.java 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/log4j-over-slf4j/compatibility/src/main/java/test/Log4j13Calls.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,46 +0,0 @@ -/** - * Logback: the reliable, generic, fast and flexible logging framework. - * - * Copyright (C) 1999-2006, QOS.ch - * - * This library is free software, you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation. - */ - -package test; - -import junit.framework.TestCase; - -import org.apache.log4j.Logger; -import org.apache.log4j.MDC; - -/** - * - * A test case that issues the typical calls - * that an application using log4j 1.3 would do. - * - * @author Ceki Gülcü - * @author Sébastien Pennec - */ - -public class Log4j13Calls extends TestCase { - public static final Logger logger = Logger.getLogger(Log4j12Calls.class); - - public void testLog() { - MDC.put("key", "value1"); - - logger.trace("Trace level can be noisy"); - logger.debug("Entering application"); - logger.info("Violets are blue"); - logger.warn("Here is a warning"); - logger.info("The answer is {}.", new Integer(42)); - logger.info("Number: {} and another one: {}.", new Integer(42), new Integer(24)); - - logger.error("Exiting application", new Exception("just testing")); - - MDC.remove("key"); - - MDC.clear(); - } -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/log4j-over-slf4j/compatibility/src/main/java/test/LoggerTest.java new/slf4j-2.0.18/log4j-over-slf4j/compatibility/src/main/java/test/LoggerTest.java --- old/slf4j-2.0.17/log4j-over-slf4j/compatibility/src/main/java/test/LoggerTest.java 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/log4j-over-slf4j/compatibility/src/main/java/test/LoggerTest.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,169 +0,0 @@ -package test; - -import junit.framework.TestCase; - -import org.slf4j.LoggerFactory; - -import ch.qos.logback.classic.LoggerContext; -import ch.qos.logback.classic.spi.LoggingEvent; -import ch.qos.logback.core.read.ListAppender; -import org.apache.log4j.Level; - -/** - * A class that tests the invocation of the org.apache.log4j.Logger class that - * belongs to the log4j-bridge package - * - * @author Sébastien Pennec - * @author Ceki Gülcü - */ - -public class LoggerTest extends TestCase { - - LoggerContext context; - ListAppender<LoggingEvent> appender; - ch.qos.logback.classic.Logger logbackLogger; - org.apache.log4j.Logger log4jLogger; - - public void setUp() throws Exception { - context = (LoggerContext) LoggerFactory.getILoggerFactory(); - context.shutdownAndReset(); - appender = new ListAppender<LoggingEvent>(); - appender.setContext(context); - appender.setName("listAppender"); - appender.start(); - ch.qos.logback.classic.Logger lbLogger = context - .getLogger(LoggerContext.ROOT_NAME); - lbLogger.addAppender(appender); - - log4jLogger = org.apache.log4j.Logger.getLogger(LoggerTest.class); - logbackLogger = context.getLogger(LoggerTest.class); - super.setUp(); - } - - public void tearDown() throws Exception { - appender.stop(); - context.stop(); - appender = null; - context = null; - logbackLogger = null; - log4jLogger = null; - super.tearDown(); - } - - public void testLogWithObjectMessages() { - LoggingEvent event; - - log4jLogger.debug("test"); - event = appender.list.get(0); - assertEquals("test", event.getMessage()); - appender.list.clear(); - - log4jLogger.debug(null); - event = appender.list.get(0); - assertEquals(null, event.getMessage()); - appender.list.clear(); - - DummyObject dummy = new DummyObject(); - log4jLogger.debug(dummy); - event = appender.list.get(0); - assertEquals(dummy.toString(), event.getMessage()); - appender.list.clear(); - } - - public void testIsEnabledAPI() { - assertFalse(log4jLogger.isTraceEnabled()); - assertTrue(log4jLogger.isDebugEnabled()); - assertTrue(log4jLogger.isInfoEnabled()); - assertTrue(log4jLogger.isWarnEnabled()); - assertTrue(log4jLogger.isErrorEnabled()); - } - - public void testPrintAPI() { - Exception e = new Exception("just testing"); - - log4jLogger.trace(null); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.debug(null); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.debug("debug message"); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.info(null); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.info("info message"); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.warn(null); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.warn("warn message"); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.error(null); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.error("error message"); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.debug(null, e); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.debug("debug message", e); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.info(null, e); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.info("info message", e); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.warn(null, e); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.warn("warn message", e); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.error(null, e); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - log4jLogger.error("error message", e); - assertEquals(1, appender.list.size()); - appender.list.clear(); - - } - - public void testLogAPI() { - log4jLogger.log("x", Level.TRACE, "x", null); - assertEquals(0, appender.list.size()); - - log4jLogger.log("x", Level.DEBUG, "x", null); - log4jLogger.log("x", Level.INFO, "x", null); - log4jLogger.log("x", Level.WARN, "x", null); - log4jLogger.log("x", Level.ERROR, "x", null); - log4jLogger.log("x", Level.FATAL, "x", null); - - assertEquals(5, appender.list.size()); - appender.list.clear(); - - } - -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/log4j-over-slf4j/pom.xml new/slf4j-2.0.18/log4j-over-slf4j/pom.xml --- old/slf4j-2.0.17/log4j-over-slf4j/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/log4j-over-slf4j/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/osgi-over-slf4j/pom.xml new/slf4j-2.0.18/osgi-over-slf4j/pom.xml --- old/slf4j-2.0.17/osgi-over-slf4j/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/osgi-over-slf4j/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/parent/pom.xml new/slf4j-2.0.18/parent/pom.xml --- old/slf4j-2.0.17/parent/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/parent/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-bom</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../pom.xml</relativePath> </parent> @@ -26,7 +26,7 @@ <properties> <!-- yyyy-MM-dd'T'HH:mm:ss'Z' --> - <project.build.outputTimestamp>2025-02-25T16:36:00Z</project.build.outputTimestamp> + <project.build.outputTimestamp>2026-05-12T18:15:00Z</project.build.outputTimestamp> <latest.1.version>1.7.36</latest.1.version> <!-- java.util.ServiceLoader requires Java 6 --> <jdk.version>8</jdk.version> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/pom.xml new/slf4j-2.0.18/pom.xml --- old/slf4j-2.0.17/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -6,7 +6,7 @@ <groupId>org.slf4j</groupId> <artifactId>slf4j-bom</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <packaging>pom</packaging> <url>http://www.slf4j.org</url> @@ -22,6 +22,7 @@ </license> </licenses> + <scm> <url>https://github.com/qos-ch/slf4j</url> <connection>scm:git:https://github.com/qos-ch/slf4j.git</connection> @@ -48,6 +49,10 @@ <module>slf4j-migrator</module> </modules> + <properties> + <central-publishing-maven-plugin.version>0.9.0</central-publishing-maven-plugin.version> + </properties> + <dependencyManagement> <dependencies> @@ -218,6 +223,18 @@ </configuration> </plugin> + + <plugin> + <groupId>org.sonatype.central</groupId> + <artifactId>central-publishing-maven-plugin</artifactId> + <version>${central-publishing-maven-plugin.version}</version> + <extensions>true</extensions> + <configuration> + <publishingServerId>central</publishingServerId> + <excludeArtifacts>integration</excludeArtifacts> + </configuration> + </plugin> + </plugins> </build> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-api/pom.xml new/slf4j-2.0.18/slf4j-api/pom.xml --- old/slf4j-2.0.17/slf4j-api/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-api/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-api/src/main/java/org/slf4j/MDC.java new/slf4j-2.0.18/slf4j-api/src/main/java/org/slf4j/MDC.java --- old/slf4j-2.0.17/slf4j-api/src/main/java/org/slf4j/MDC.java 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-api/src/main/java/org/slf4j/MDC.java 2026-05-12 20:32:21.000000000 +0200 @@ -63,7 +63,7 @@ public class MDC { static final String NULL_MDCA_URL = "http://www.slf4j.org/codes.html#null_MDCA"; - private static final String MDC_APAPTER_CANNOT_BE_NULL_MESSAGE = "MDCAdapter cannot be null. See also " + NULL_MDCA_URL; + private static final String MDC_ADAPTER_CANNOT_BE_NULL_MESSAGE = "MDCAdapter cannot be null. See also " + NULL_MDCA_URL; static final String NO_STATIC_MDC_BINDER_URL = "http://www.slf4j.org/codes.html#no_static_mdc_binder"; static MDCAdapter MDC_ADAPTER; @@ -132,7 +132,7 @@ throw new IllegalArgumentException("key parameter cannot be null"); } if (getMDCAdapter() == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); + throw new IllegalStateException(MDC_ADAPTER_CANNOT_BE_NULL_MESSAGE); } getMDCAdapter().put(key, val); } @@ -187,9 +187,7 @@ throw new IllegalArgumentException("key parameter cannot be null"); } - if (getMDCAdapter() == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); - } + mdcAdapterNullCheck(); return getMDCAdapter().get(key); } @@ -208,9 +206,7 @@ throw new IllegalArgumentException("key parameter cannot be null"); } - if (getMDCAdapter() == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); - } + mdcAdapterNullCheck(); getMDCAdapter().remove(key); } @@ -218,9 +214,7 @@ * Clear all entries in the MDC of the underlying implementation. */ public static void clear() { - if (getMDCAdapter() == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); - } + mdcAdapterNullCheck(); getMDCAdapter().clear(); } @@ -232,9 +226,7 @@ * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { - if (getMDCAdapter() == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); - } + mdcAdapterNullCheck(); return getMDCAdapter().getCopyOfContextMap(); } @@ -250,9 +242,7 @@ * @since 1.5.1 */ public static void setContextMap(Map<String, String> contextMap) { - if (getMDCAdapter() == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); - } + mdcAdapterNullCheck(); getMDCAdapter().setContextMap(contextMap); } @@ -280,7 +270,7 @@ */ static void setMDCAdapter(MDCAdapter anMDCAdapter) { if(anMDCAdapter == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); + throw new IllegalStateException(MDC_ADAPTER_CANNOT_BE_NULL_MESSAGE); } MDC_ADAPTER = anMDCAdapter; } @@ -293,28 +283,24 @@ * @since 2.0.0 */ static public void pushByKey(String key, String value) { - if (getMDCAdapter() == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); - } + mdcAdapterNullCheck(); getMDCAdapter().pushByKey(key, value); } /** - * Pop the stack referenced by 'key' and return the value possibly null. + * Pop the <b>stack</b> referenced by 'key' and return the value possibly null. * * @param key identifies the deque(stack) * @return the value just popped. May be null/ * @since 2.0.0 */ static public String popByKey(String key) { - if (getMDCAdapter() == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); - } + mdcAdapterNullCheck(); return getMDCAdapter().popByKey(key); } /** - * Returns a copy of the deque(stack) referenced by 'key'. May be null. + * Returns a copy of the <b>deque(stack)</b> referenced by 'key'. May be null. * * @param key identifies the stack * @return copy of stack referenced by 'key'. May be null. @@ -322,9 +308,13 @@ * @since 2.0.0 */ public Deque<String> getCopyOfDequeByKey(String key) { + mdcAdapterNullCheck(); + return getMDCAdapter().getCopyOfDequeByKey(key); + } + + private static void mdcAdapterNullCheck() { if (getMDCAdapter() == null) { - throw new IllegalStateException(MDC_APAPTER_CANNOT_BE_NULL_MESSAGE); + throw new IllegalStateException(MDC_ADAPTER_CANNOT_BE_NULL_MESSAGE); } - return getMDCAdapter().getCopyOfDequeByKey(key); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-api/src/main/java/org/slf4j/spi/DefaultLoggingEventBuilder.java new/slf4j-2.0.18/slf4j-api/src/main/java/org/slf4j/spi/DefaultLoggingEventBuilder.java --- old/slf4j-2.0.17/slf4j-api/src/main/java/org/slf4j/spi/DefaultLoggingEventBuilder.java 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-api/src/main/java/org/slf4j/spi/DefaultLoggingEventBuilder.java 2026-05-12 20:32:21.000000000 +0200 @@ -169,10 +169,10 @@ } private void logViaLocationAwareLoggerAPI(LocationAwareLogger locationAwareLogger, LoggingEvent aLoggingEvent) { - String msg = aLoggingEvent.getMessage(); List<Marker> markerList = aLoggingEvent.getMarkers(); + Marker firstMarker = (markerList != null && !markerList.isEmpty()) ? markerList.get(0) : null; String mergedMessage = mergeMarkersAndKeyValuePairsAndMessage(aLoggingEvent); - locationAwareLogger.log(null, aLoggingEvent.getCallerBoundary(), aLoggingEvent.getLevel().toInt(), + locationAwareLogger.log(firstMarker, aLoggingEvent.getCallerBoundary(), aLoggingEvent.getLevel().toInt(), mergedMessage, aLoggingEvent.getArgumentArray(), aLoggingEvent.getThrowable()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-api/src/main/java/org/slf4j/spi/MDCAdapter.java new/slf4j-2.0.18/slf4j-api/src/main/java/org/slf4j/spi/MDCAdapter.java --- old/slf4j-2.0.17/slf4j-api/src/main/java/org/slf4j/spi/MDCAdapter.java 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-api/src/main/java/org/slf4j/spi/MDCAdapter.java 2026-05-12 20:32:21.000000000 +0200 @@ -93,7 +93,7 @@ public void setContextMap(Map<String, String> contextMap); /** - * Push a value into the deque(stack) referenced by 'key'. + * Push a value into the <b>deque(stack)</b> referenced by 'key'. * * @param key identifies the appropriate stack * @param value the value to push into the stack @@ -102,7 +102,7 @@ public void pushByKey(String key, String value); /** - * Pop the stack referenced by 'key' and return the value possibly null. + * Pop the <b>stack</b> referenced by 'key' and return the value possibly null. * * @param key identifies the deque(stack) * @return the value just popped. May be null/ @@ -111,7 +111,7 @@ public String popByKey(String key); /** - * Returns a copy of the deque(stack) referenced by 'key'. May be null. + * Returns a copy of the <b>deque(stack)</b> referenced by 'key'. May be null. * * @param key identifies the stack * @return copy of stack referenced by 'key'. May be null. @@ -122,7 +122,7 @@ /** - * Clear the deque(stack) referenced by 'key'. + * Clear the <b>deque(stack)</b> referenced by 'key'. * * @param key identifies the stack * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-ext/pom.xml new/slf4j-2.0.18/slf4j-ext/pom.xml --- old/slf4j-2.0.17/slf4j-ext/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-ext/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-jdk-platform-logging/pom.xml new/slf4j-2.0.18/slf4j-jdk-platform-logging/pom.xml --- old/slf4j-2.0.17/slf4j-jdk-platform-logging/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-jdk-platform-logging/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -8,7 +8,7 @@ <parent> <artifactId>slf4j-parent</artifactId> <groupId>org.slf4j</groupId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-jdk14/pom.xml new/slf4j-2.0.18/slf4j-jdk14/pom.xml --- old/slf4j-2.0.17/slf4j-jdk14/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-jdk14/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-log4j12/pom.xml new/slf4j-2.0.18/slf4j-log4j12/pom.xml --- old/slf4j-2.0.17/slf4j-log4j12/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-log4j12/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -8,7 +8,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> @@ -24,7 +24,7 @@ <relocation> <groupId>org.slf4j</groupId> <artifactId>slf4j-reload4j</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> </relocation> </distributionManagement> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-migrator/pom.xml new/slf4j-2.0.18/slf4j-migrator/pom.xml --- old/slf4j-2.0.17/slf4j-migrator/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-migrator/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-nop/pom.xml new/slf4j-2.0.18/slf4j-nop/pom.xml --- old/slf4j-2.0.17/slf4j-nop/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-nop/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-reload4j/pom.xml new/slf4j-2.0.18/slf4j-reload4j/pom.xml --- old/slf4j-2.0.17/slf4j-reload4j/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-reload4j/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> @@ -51,7 +51,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.19.1</version> <configuration> <forkCount>1</forkCount> <reuseForks>false</reuseForks> @@ -61,7 +60,7 @@ <exclude>**/AllTest.java</exclude> <exclude>**/PackageTest.java</exclude> </excludes> - <argLine>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001</argLine> + <!--<argLine>-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001</argLine> --> <!--<argLine>XXadd-opens log4j/org.apache.log4j=org.slf4j.log4j12</argLine>--> </configuration> </plugin> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-simple/pom.xml new/slf4j-2.0.18/slf4j-simple/pom.xml --- old/slf4j-2.0.17/slf4j-simple/pom.xml 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-simple/pom.xml 2026-05-12 20:32:21.000000000 +0200 @@ -7,7 +7,7 @@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>2.0.17</version> + <version>2.0.18</version> <relativePath>../parent/pom.xml</relativePath> </parent> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-simple/src/main/java/org/slf4j/simple/SimpleLogger.java new/slf4j-2.0.18/slf4j-simple/src/main/java/org/slf4j/simple/SimpleLogger.java --- old/slf4j-2.0.17/slf4j-simple/src/main/java/org/slf4j/simple/SimpleLogger.java 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-simple/src/main/java/org/slf4j/simple/SimpleLogger.java 2026-05-12 20:32:21.000000000 +0200 @@ -448,7 +448,7 @@ case LOG_LEVEL_INFO: return "INFO"; case LOG_LEVEL_WARN: - return "WARN"; + return CONFIG_PARAMS.warnLevelString; case LOG_LEVEL_ERROR: return "ERROR"; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-simple/src/test/java/org/slf4j/simple/ConfigParamsTest.java new/slf4j-2.0.18/slf4j-simple/src/test/java/org/slf4j/simple/ConfigParamsTest.java --- old/slf4j-2.0.17/slf4j-simple/src/test/java/org/slf4j/simple/ConfigParamsTest.java 1970-01-01 01:00:00.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-simple/src/test/java/org/slf4j/simple/ConfigParamsTest.java 2026-05-12 20:32:21.000000000 +0200 @@ -0,0 +1,53 @@ +package org.slf4j.simple; + +import org.junit.BeforeClass; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.event.Level; + +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.List; + +import static org.junit.Assert.assertTrue; + +/** + * Test class to verify configuration parameters of SimpleLogger + * + * @since 2.0.18 + */ +public class ConfigParamsTest { + + + private ListAppendingOutputStream prepareSink(List<String> outputList) { + return new ListAppendingOutputStream(outputList); + } + + @BeforeClass + static public void resetConfigParams() { + SimpleLogger.CONFIG_PARAMS.init(); + } + + public Logger createLogger(ListAppendingOutputStream outputStream, Level level, String warnLevelString) { + SimpleLogger.CONFIG_PARAMS.outputChoice = new OutputChoice(new PrintStream(outputStream)); + + SimpleLogger.CONFIG_PARAMS.warnLevelString = warnLevelString; + + SimpleLogger logger = new SimpleLogger(ConfigParamsTest.class.getName()); + logger.currentLogLevel = SimpleLoggerConfiguration.stringToLevel(level.toString()); + return logger; + } + + @Test + public void simpleTest(){ + String WARN_LEVEL_STRING = "WXYZ"; + ArrayList<String> outputList = new ArrayList<>(); + Logger configuredLogger = createLogger(prepareSink(outputList), Level.TRACE, WARN_LEVEL_STRING); + + configuredLogger.warn("This is a test"); + + String str0 = outputList.get(0); + assertTrue(str0.contains(WARN_LEVEL_STRING)); + + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-simple/src/test/java/org/slf4j/simple/ListAppendingOutputStream.java new/slf4j-2.0.18/slf4j-simple/src/test/java/org/slf4j/simple/ListAppendingOutputStream.java --- old/slf4j-2.0.17/slf4j-simple/src/test/java/org/slf4j/simple/ListAppendingOutputStream.java 1970-01-01 01:00:00.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-simple/src/test/java/org/slf4j/simple/ListAppendingOutputStream.java 2026-05-12 20:32:21.000000000 +0200 @@ -0,0 +1,25 @@ +package org.slf4j.simple; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.List; + +public class ListAppendingOutputStream extends OutputStream { + + private final StringBuilder stringBuilder = new StringBuilder(); + private final List<String> targetList; + + ListAppendingOutputStream(List<String> list) {this.targetList = list;} + + + @Override + public void write(int b) throws IOException { + stringBuilder.append((char) b); + } + + @Override + public void flush() { + targetList.add(stringBuilder.toString()); + stringBuilder.delete(0, stringBuilder.length()); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/slf4j-2.0.17/slf4j-simple/src/test/java/org/slf4j/simple/LoggerTestSuite.java new/slf4j-2.0.18/slf4j-simple/src/test/java/org/slf4j/simple/LoggerTestSuite.java --- old/slf4j-2.0.17/slf4j-simple/src/test/java/org/slf4j/simple/LoggerTestSuite.java 2025-02-25 17:36:36.000000000 +0100 +++ new/slf4j-2.0.18/slf4j-simple/src/test/java/org/slf4j/simple/LoggerTestSuite.java 2026-05-12 20:32:21.000000000 +0200 @@ -5,8 +5,6 @@ import org.slf4j.Logger; import org.slf4j.event.Level; -import java.io.IOException; -import java.io.OutputStream; import java.util.ArrayList; import java.util.List; @@ -16,179 +14,157 @@ public abstract class LoggerTestSuite { - public static class ListAppendingOutputStream extends OutputStream { - private final StringBuilder word = new StringBuilder(); - private int index = 0; - private final List<String> list; - - private ListAppendingOutputStream(List<String> list) {this.list = list;} - - - @Override - public void write(int b) throws IOException { - word.append((char) b); - } - - @Override - public void flush() { - list.add(word.toString()); - word.delete(0, word.length()); - index++; - } - } - - private ListAppendingOutputStream prepareSink(List<String> source) { - return new ListAppendingOutputStream(source); - + private ListAppendingOutputStream prepareSink(List<String> outputList) { + return new ListAppendingOutputStream(outputList); } @Test public void testTrace() { - ArrayList<String> loggingEvents = new ArrayList<>(); - Logger configuredLogger = createLogger(prepareSink(loggingEvents), Level.TRACE); + ArrayList<String> outputList = new ArrayList<>(); + Logger configuredLogger = createLogger(prepareSink(outputList), Level.TRACE); assertTrue("Trace level should be enabled for this test", configuredLogger.isTraceEnabled()); configuredLogger.trace("Simple trace message"); - assertEquals("Trace message should've been captured", 1, loggingEvents.size()); - assertTrue("Message should be logged in trace level", isTraceMessage(loggingEvents.get(0))); + assertEquals("Trace message should've been captured", 1, outputList.size()); + assertTrue("Message should be logged in trace level", isTraceMessage(outputList.get(0))); assertEquals("Supplied trace message wasn't found in the log", "Simple trace message", - extractMessage(loggingEvents.get(0))); + extractMessage(outputList.get(0))); - loggingEvents.clear(); + outputList.clear(); configuredLogger.debug("Simple debug message"); configuredLogger.info("Simple info message"); configuredLogger.warn("Simple warn message"); configuredLogger.error("Simple error message"); - assertEquals("The other levels should have been captured", 4, loggingEvents.size()); + assertEquals("The other levels should have been captured", 4, outputList.size()); } @Test public void testDebug() { - ArrayList<String> loggingEvents = new ArrayList<>(); - Logger configuredLogger = createLogger(prepareSink(loggingEvents), Level.DEBUG); + ArrayList<String> outputList = new ArrayList<>(); + Logger configuredLogger = createLogger(prepareSink(outputList), Level.DEBUG); configuredLogger.trace("Simple trace message"); - assertEquals("Lower levels should have been ignored", 0, loggingEvents.size()); + assertEquals("Lower levels should have been ignored", 0, outputList.size()); assertTrue("Debug level should be enabled for this test", configuredLogger.isDebugEnabled()); configuredLogger.debug("Simple debug message"); - assertEquals("Debug message should've been captured", 1, loggingEvents.size()); - assertTrue("Message should be logged in debug level", isDebugMessage(loggingEvents.get(0))); + assertEquals("Debug message should've been captured", 1, outputList.size()); + assertTrue("Message should be logged in debug level", isDebugMessage(outputList.get(0))); assertEquals("Supplied debug message wasn't found in the log", "Simple debug message", - extractMessage(loggingEvents.get(0))); + extractMessage(outputList.get(0))); - loggingEvents.clear(); + outputList.clear(); configuredLogger.info("Simple info message"); configuredLogger.warn("Simple warn message"); configuredLogger.error("Simple error message"); - assertEquals("The other levels should have been captured", 3, loggingEvents.size()); + assertEquals("The other levels should have been captured", 3, outputList.size()); } @Test public void testInfo() { - ArrayList<String> loggingEvents = new ArrayList<>(); - Logger configuredLogger = createLogger(prepareSink(loggingEvents), Level.INFO); + ArrayList<String> outputList = new ArrayList<>(); + Logger configuredLogger = createLogger(prepareSink(outputList), Level.INFO); configuredLogger.trace("Simple trace message"); configuredLogger.debug("Simple debug message"); - assertEquals("Lower levels should have been ignored", 0, loggingEvents.size()); + assertEquals("Lower levels should have been ignored", 0, outputList.size()); assertTrue("Info level should be enabled for this test", configuredLogger.isInfoEnabled()); configuredLogger.info("Simple info message"); - assertEquals("Info message should've been captured", 1, loggingEvents.size()); - assertTrue("Message should be logged in debug level", isInfoMessage(loggingEvents.get(0))); + assertEquals("Info message should've been captured", 1, outputList.size()); + assertTrue("Message should be logged in debug level", isInfoMessage(outputList.get(0))); assertEquals("Supplied info message wasn't found in the log", "Simple info message", - extractMessage(loggingEvents.get(0))); + extractMessage(outputList.get(0))); - loggingEvents.clear(); + outputList.clear(); configuredLogger.warn("Simple warn message"); configuredLogger.error("Simple error message"); - assertEquals("The other levels should have been captured", 2, loggingEvents.size()); + assertEquals("The other levels should have been captured", 2, outputList.size()); } @Test public void testWarn() { - ArrayList<String> loggingEvents = new ArrayList<>(); - Logger configuredLogger = createLogger(prepareSink(loggingEvents), Level.WARN); + ArrayList<String> outputList = new ArrayList<>(); + Logger configuredLogger = createLogger(prepareSink(outputList), Level.WARN); configuredLogger.trace("Simple trace message"); configuredLogger.debug("Simple debug message"); configuredLogger.info("Simple info message"); - assertEquals("Lower levels should have been ignored", 0, loggingEvents.size()); + assertEquals("Lower levels should have been ignored", 0, outputList.size()); assertTrue("Warn level should be enabled for this test", configuredLogger.isWarnEnabled()); configuredLogger.warn("Simple warn message"); - assertEquals("Warn message should've been captured", 1, loggingEvents.size()); - assertTrue("Message should be logged in warn level", isWarnMessage(loggingEvents.get(0))); + assertEquals("Warn message should've been captured", 1, outputList.size()); + assertTrue("Message should be logged in warn level", isWarnMessage(outputList.get(0))); assertEquals("Supplied warn message wasn't found in the log", "Simple warn message", - extractMessage(loggingEvents.get(0))); + extractMessage(outputList.get(0))); - loggingEvents.clear(); + outputList.clear(); configuredLogger.error("Simple error message"); - assertEquals("The other levels should have been captured", 1, loggingEvents.size()); + assertEquals("The other levels should have been captured", 1, outputList.size()); } @Test public void testError() { - ArrayList<String> loggingEvents = new ArrayList<>(); - Logger configuredLogger = createLogger(prepareSink(loggingEvents), Level.ERROR); + ArrayList<String> outputList = new ArrayList<>(); + Logger configuredLogger = createLogger(prepareSink(outputList), Level.ERROR); configuredLogger.trace("Simple trace message"); configuredLogger.debug("Simple debug message"); configuredLogger.info("Simple info message"); configuredLogger.warn("Simple warn message"); - assertEquals("Lower levels should have been ignored", 0, loggingEvents.size()); + assertEquals("Lower levels should have been ignored", 0, outputList.size()); assertTrue("Error level should be enabled for this test", configuredLogger.isErrorEnabled()); configuredLogger.error("Simple error message"); - assertEquals("Error message should've been captured", 1, loggingEvents.size()); - assertTrue("Message should be logged in error level", isErrorMessage(loggingEvents.get(0))); + assertEquals("Error message should've been captured", 1, outputList.size()); + assertTrue("Message should be logged in error level", isErrorMessage(outputList.get(0))); assertEquals("Supplied error message wasn't found in the log", "Simple error message", - extractMessage(loggingEvents.get(0))); + extractMessage(outputList.get(0))); } @Test public void testFormatting() { - ArrayList<String> loggingEvents = new ArrayList<>(); - Logger configuredLogger = createLogger(prepareSink(loggingEvents), Level.INFO); + ArrayList<String> outputList = new ArrayList<>(); + Logger configuredLogger = createLogger(prepareSink(outputList), Level.INFO); configuredLogger.info("Some {} string", "formatted"); - assertEquals("The formatted message should've been captured", 1, loggingEvents.size()); - assertEquals("Message should've been formatted", "Some formatted string", extractMessage(loggingEvents.get(0))); + assertEquals("The formatted message should've been captured", 1, outputList.size()); + assertEquals("Message should've been formatted", "Some formatted string", extractMessage(outputList.get(0))); } @Test public void testException() { - ArrayList<String> loggingEvents = new ArrayList<>(); - Logger configuredLogger = createLogger(prepareSink(loggingEvents), Level.INFO); + ArrayList<String> outputList = new ArrayList<>(); + Logger configuredLogger = createLogger(prepareSink(outputList), Level.INFO); Exception exception = new RuntimeException("My error"); configuredLogger.info("Logging with an exception", exception); - assertEquals("The formatted message should've been captured", 1, loggingEvents.size()); + assertEquals("The formatted message should've been captured", 1, outputList.size()); assertEquals("Message should've been formatted", "My error", - extractExceptionMessage(loggingEvents.get(0))); + extractExceptionMessage(outputList.get(0))); assertEquals("Message should've been formatted", "java.lang.RuntimeException", - extractExceptionType(loggingEvents.get(0))); + extractExceptionType(outputList.get(0))); } ++++++ slf4j2-build.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/common.xml new/common.xml --- old/common.xml 2025-03-12 19:59:04.851503270 +0100 +++ new/common.xml 2026-05-13 17:00:38.116895011 +0200 @@ -3,7 +3,7 @@ <project name="common" basedir="."> <property file="build.properties"/> - <property name="project.version" value="2.0.17"/> + <property name="project.version" value="2.0.18"/> <property name="project.groupId" value="org.slf4j"/> <property name="project.url" value="http://www.slf4j.org/"/>
