From felix.krull+qos at neuland-bfi.de Mon Aug 7 10:14:57 2023 From: felix.krull+qos at neuland-bfi.de (Felix Krull) Date: Mon, 7 Aug 2023 10:14:57 +0200 Subject: [logback-user] logback-classic 1.4.9 removes public method Message-ID: <750b4511-47d3-4018-8c96-c2e1d1e83c82@neuland-bfi.de> Hi, apparently logback-classic 1.4.9 removed the public method `configureByResource` from `ContextInitializer`, thereby breaking backwards compatibility? The method was removed in a commit [1] which made it into 1.4.9. It was deprecated in November of last year:  I don't think this deprecation has ever been in a major release? Even if it had, I'd say it's poor form to remove deprecated things in a patch release. This breaks Play Framework [3] which uses the method for its logging setup, making it impossible to upgrade to this patch version. Regards, Felix [1]: https://github.com/qos-ch/logback/commit/4b06e062488e4cb87f22be6ae96e4d7d6350ed6b [2]: https://github.com/qos-ch/logback/commit/86f388965204df28843039f65b0bc437aff007f5 [3]: https://www.playframework.com/ From ceki at qos.ch Mon Aug 7 10:52:31 2023 From: ceki at qos.ch (=?UTF-8?B?Q2VraSBHw7xsY8O8?=) Date: Mon, 7 Aug 2023 10:52:31 +0200 Subject: [logback-user] logback-classic 1.4.9 removes public method In-Reply-To: <750b4511-47d3-4018-8c96-c2e1d1e83c82@neuland-bfi.de> References: <750b4511-47d3-4018-8c96-c2e1d1e83c82@neuland-bfi.de> Message-ID: <7bca2359-c853-73bd-f544-154c026fd701@qos.ch> Hi Felix, The deprecated method in question was removed because it was preventing the decoupling of logback initialization from JoranConfigurator. Copying the method into the Play framework should be a relatively easy exercise. In any case, thank you for letting us know and apologies for the inconvenience. Best regards, -- Ceki Gülcü Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch On 8/7/2023 10:14 AM, Felix Krull via logback-user wrote: > Hi, > > apparently logback-classic 1.4.9 removed the public method > `configureByResource` from `ContextInitializer`, thereby breaking > backwards compatibility? The method was removed in a commit [1] which > made it into 1.4.9. It was deprecated in November of last year:  I don't > think this deprecation has ever been in a major release? Even if it had, > I'd say it's poor form to remove deprecated things in a patch release. > > This breaks Play Framework [3] which uses the method for its logging > setup, making it impossible to upgrade to this patch version. > > Regards, Felix > > > [1]: > https://github.com/qos-ch/logback/commit/4b06e062488e4cb87f22be6ae96e4d7d6350ed6b > > [2]: > https://github.com/qos-ch/logback/commit/86f388965204df28843039f65b0bc437aff007f5 > > [3]: https://www.playframework.com/ From dcmoeller at gmx.de Wed Aug 9 08:44:29 2023 From: dcmoeller at gmx.de (dcmoeller at gmx.de) Date: Wed, 9 Aug 2023 08:44:29 +0200 Subject: [logback-user] Upgrading Logback Classic from 1.3.8 to 1.3.9 causes ClassNotFoundException: ch.qos.logback.classic.spi.Configurator Message-ID: <319821d9-7521-f01b-29cd-7ff136229da0@gmx.de> Hello everybody, this morning weekly build of our software breaks with java.lang.ClassNotFoundException: ch.qos.logback.classic.spi.Configurator As we configure Gradle to apply runtimeOnly('ch.qos.logback:logback-classic:1.3+') this build receives new patch level version 1.3.9, published a few days ago. I've downloaded both versions, 1.3.8 and 1.3.9, of the lib from [1], missing class is available with 1.3.8, but missing in 1.3.9. General remark: I do not expect such a modification with patch level updates. My question: Is this a bug on your side, or have I missed some deprecation announcement explaining how to reconfigure Logback, or apply another Logback lib, or the like to avoid this problem? Thanks and regards Christian [1] https://mvnrepository.com/artifact/ch.qos.logback/logback-classic From ceki at qos.ch Wed Aug 9 11:17:47 2023 From: ceki at qos.ch (=?UTF-8?B?Q2VraSBHw7xsY8O8?=) Date: Wed, 9 Aug 2023 11:17:47 +0200 Subject: [logback-user] Upgrading Logback Classic from 1.3.8 to 1.3.9 causes ClassNotFoundException: ch.qos.logback.classic.spi.Configurator In-Reply-To: <319821d9-7521-f01b-29cd-7ff136229da0@gmx.de> References: <319821d9-7521-f01b-29cd-7ff136229da0@gmx.de> Message-ID: <1032341e-ce60-dfd2-a340-b06ba5281d29@qos.ch> Hi Christian, Thank you for bringing this issue to our attention. The class has been moved to logback-core module under ch.qos.logback.core.spi package by mistake during experimentation and will be reverted in the next version. Best regards, -- Ceki Gülcü Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch On 8/9/2023 8:44 AM, "Christian Möller via logback-user Hello everybody, > > this morning weekly build of our software breaks with > >    java.lang.ClassNotFoundException: > ch.qos.logback.classic.spi.Configurator > > As we configure Gradle to apply > >    runtimeOnly('ch.qos.logback:logback-classic:1.3+') > > this build receives new patch level version 1.3.9, published a few days > ago. > > I've downloaded both versions, 1.3.8 and 1.3.9, of the lib from [1], > missing class is available with 1.3.8, but missing in 1.3.9. > > General remark: I do not expect such a modification with patch level > updates. > > My question: Is this a bug on your side, or have I missed some > deprecation announcement explaining how to reconfigure Logback, or apply > another Logback lib, or the like to avoid this problem? > > Thanks and regards > > Christian > > [1] https://mvnrepository.com/artifact/ch.qos.logback/logback-classic From dcmoeller at gmx.de Wed Aug 9 14:02:05 2023 From: dcmoeller at gmx.de (dcmoeller at gmx.de) Date: Wed, 9 Aug 2023 14:02:05 +0200 Subject: [logback-user] Upgrading Logback Classic from 1.3.8 to 1.3.9 causes ClassNotFoundException: ch.qos.logback.classic.spi.Configurator In-Reply-To: <1032341e-ce60-dfd2-a340-b06ba5281d29@qos.ch> References: <319821d9-7521-f01b-29cd-7ff136229da0@gmx.de> <1032341e-ce60-dfd2-a340-b06ba5281d29@qos.ch> Message-ID: Hi Ceki, thanks for your quick and helpful response. Regards Christian Am 09.08.23 um 11:17 schrieb Ceki Gülcü via logback-user: > Hi Christian, > > Thank you for bringing this issue to our attention. > > The class has been moved to logback-core module under > ch.qos.logback.core.spi package by mistake during experimentation and > will be reverted in the next version. > > > Best regards, > From dcmoeller at gmx.de Fri Aug 11 12:32:24 2023 From: dcmoeller at gmx.de (dcmoeller at gmx.de) Date: Fri, 11 Aug 2023 12:32:24 +0200 Subject: [logback-user] Upgrading Logback Classic from 1.3.8 to 1.3.9 causes ClassNotFoundException: ch.qos.logback.classic.spi.Configurator In-Reply-To: <1032341e-ce60-dfd2-a340-b06ba5281d29@qos.ch> References: <319821d9-7521-f01b-29cd-7ff136229da0@gmx.de> <1032341e-ce60-dfd2-a340-b06ba5281d29@qos.ch> Message-ID: Hi Ceki, I've recognized arrival of two new versions 1.3.10 and 1.3.11 of your lib logback-classic. Unfortunately, both of them trigger following Exception with our application's test cases: java.lang.NoSuchMethodError: 'void ch.qos.logback.classic.util.ContextInitializer.configureByResource(java.net.URL)' at io.micronaut.logging.impl.LogbackUtils.configure(LogbackUtils.java:100) at io.micronaut.logging.impl.LogbackUtils.configure(LogbackUtils.java:57) at io.micronaut.management.endpoint.loggers.impl.LogbackLoggingSystem.refresh(LogbackLoggingSystem.java:134) [...] We are using Micronaut 3.9.4 in this project. Regards Christian Am 09.08.23 um 11:17 schrieb Ceki Gülcü via logback-user: > Hi Christian, > > Thank you for bringing this issue to our attention. > > The class has been moved to logback-core module under > ch.qos.logback.core.spi package by mistake during experimentation and > will be reverted in the next version. > > > Best regards, > From ceki at qos.ch Fri Aug 11 13:35:09 2023 From: ceki at qos.ch (=?UTF-8?B?Q2VraSBHw7xsY8O8?=) Date: Fri, 11 Aug 2023 13:35:09 +0200 Subject: [logback-user] Upgrading Logback Classic from 1.3.8 to 1.3.9 causes ClassNotFoundException: ch.qos.logback.classic.spi.Configurator In-Reply-To: References: <319821d9-7521-f01b-29cd-7ff136229da0@gmx.de> <1032341e-ce60-dfd2-a340-b06ba5281d29@qos.ch> Message-ID: <53193e60-38cd-0145-7d76-2e97708953d6@qos.ch> Hi Christian, The deprecated method ContextInitializer.configureByResource was removed because it was preventing the decoupling of logback initialization from JoranConfigurator class. Downstream developers, for example Micronaut developers, can circumvent this incompatibility problem by copying the code in the ContextInitializer.configureByResource method into their project. This should be a relatively easy exercise. In any case, apologies for the inconvenience. Best regards, -- Ceki Gülcü Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch On 8/11/2023 12:32 PM, "Christian Möller via logback-user Hi Ceki, > > I've recognized arrival of two new versions 1.3.10 and 1.3.11 of your > lib logback-classic. > > Unfortunately, both of them trigger following Exception with our > application's test cases: > >   java.lang.NoSuchMethodError: 'void > ch.qos.logback.classic.util.ContextInitializer.configureByResource(java.net.URL)' >     at > io.micronaut.logging.impl.LogbackUtils.configure(LogbackUtils.java:100) >     at > io.micronaut.logging.impl.LogbackUtils.configure(LogbackUtils.java:57) >     at > io.micronaut.management.endpoint.loggers.impl.LogbackLoggingSystem.refresh(LogbackLoggingSystem.java:134) >     [...] > > We are using Micronaut 3.9.4 in this project. > > Regards > > Christian > > > Am 09.08.23 um 11:17 schrieb Ceki Gülcü via logback-user: >> Hi Christian, >> >> Thank you for bringing this issue to our attention. >> >> The class has been moved to logback-core module under >> ch.qos.logback.core.spi package by mistake during experimentation and >> will be reverted in the next version. >> >> >> Best regards, >> > From m.kurz at irregular.at Sat Aug 12 15:16:47 2023 From: m.kurz at irregular.at (m.kurz at irregular.at) Date: Sat, 12 Aug 2023 06:16:47 -0700 Subject: [logback-user] logback-classic 1.4.9 removes public method In-Reply-To: <7bca2359-c853-73bd-f544-154c026fd701@qos.ch> References: <7bca2359-c853-73bd-f544-154c026fd701@qos.ch> Message-ID: Hi! Play Framework maintainer here. > Copying the method into the Play framework should be a relatively easy exercise. I was looking into this and I think there is a nicer approach: DefaultJoranConfigurator contains an identical configureByResource method: https://github.com/qos-ch/logback/blob/v_1.4.11/logback-classic/src/main/java/ch/qos/logback/classic/util/DefaultJoranConfigurator.java#L60-L73 Does something speak against using that method instead of copy/pasting and introducing duplicated code? I came up with a pull request to "fix" commit 4b06e062488e4cb87f22be6ae96e4d7d6350ed6b and remove the pasted method: https://github.com/qos-ch/logback/pull/697 Let me know what you think. BTW: Please do not remove methods and/or classes anymore in a patch release (specially if you deprecated that method only a couple of patch release before...) Thanks! Best, Matthias From ceki at qos.ch Sat Aug 12 16:18:11 2023 From: ceki at qos.ch (=?UTF-8?B?Q2VraSBHw7xsY8O8?=) Date: Sat, 12 Aug 2023 16:18:11 +0200 Subject: [logback-user] logback-classic 1.4.9 removes public method In-Reply-To: References: <7bca2359-c853-73bd-f544-154c026fd701@qos.ch> Message-ID: <3bb1ff90-53cf-4548-1caf-46650f6f135a@qos.ch> Hi Matthias, Thank you for suggesting this alternative. It has been merged. I am glad to see that the impact on the Play framework could be fixed without too much hassle. Best regards, -- Ceki Gülcü Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch On 8/12/2023 3:16 PM, m.kurz--- via logback-user wrote: > Hi! > > Play Framework maintainer here. > >> Copying the method into the Play framework should be a relatively easy exercise. > > I was looking into this and I think there is a nicer approach: > DefaultJoranConfigurator contains an identical configureByResource > method: > https://github.com/qos-ch/logback/blob/v_1.4.11/logback-classic/src/main/java/ch/qos/logback/classic/util/DefaultJoranConfigurator.java#L60-L73 > > Does something speak against using that method instead of copy/pasting > and introducing duplicated code? > I came up with a pull request to "fix" commit > 4b06e062488e4cb87f22be6ae96e4d7d6350ed6b and remove the pasted method: > https://github.com/qos-ch/logback/pull/697 > > Let me know what you think. > > BTW: Please do not remove methods and/or classes anymore in a patch > release (specially if you deprecated that method only a couple of > patch release before...) > > Thanks! > > Best, > Matthias From dcmoeller at gmx.de Tue Aug 29 09:03:14 2023 From: dcmoeller at gmx.de (dcmoeller at gmx.de) Date: Tue, 29 Aug 2023 09:03:14 +0200 Subject: [logback-user] Upgrading Logback Classic from 1.3.8 to 1.3.9 causes ClassNotFoundException: ch.qos.logback.classic.spi.Configurator In-Reply-To: <53193e60-38cd-0145-7d76-2e97708953d6@qos.ch> References: <319821d9-7521-f01b-29cd-7ff136229da0@gmx.de> <1032341e-ce60-dfd2-a340-b06ba5281d29@qos.ch> <53193e60-38cd-0145-7d76-2e97708953d6@qos.ch> Message-ID: <337237f6-cd39-2d89-5122-9685e8e67457@gmx.de> Hi Ceki, back from vacation :-) So if I get it right, upgrading LogBack from 1.3.8 to 1.3.11 might break my code because of some refactorings you do on its code base, announced by a Deprecation-flag/-warning/-annotation. Hm, I personally would *not* expect such (occasionally client-breaking) modifications to appear with patch-level updates: Within version 1.4/5.x, I think that would be more appropriate. Let's hope that all upstream frameworks/users/etc. quickly adapt their codebase(s). In the meantime, my projects have to stay with 1.3.8. Just my two cents ... :-) Regards Christian Am 11.08.23 um 13:35 schrieb Ceki Gülcü via logback-user: > Hi Christian, > > The deprecated method ContextInitializer.configureByResource was removed > because it was preventing the decoupling of logback initialization from > JoranConfigurator class. > > Downstream developers, for example Micronaut developers, can circumvent > this incompatibility problem by copying the code in the > ContextInitializer.configureByResource method into their project. This > should be a relatively easy exercise. > > In any case, apologies for the inconvenience. > > Best regards, >