logback-classic 1.4.9 removes public method

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/4b06e062488e4cb87f22be6ae96e4d7d635... [2]: https://github.com/qos-ch/logback/commit/86f388965204df28843039f65b0bc437aff... [3]: https://www.playframework.com/

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/4b06e062488e4cb87f22be6ae96e4d7d635...
[2]: https://github.com/qos-ch/logback/commit/86f388965204df28843039f65b0bc437aff...

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/jav... 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

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/jav...
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
participants (3)
-
Ceki Gülcü
-
Felix Krull
-
m.kurz@irregular.at