-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PYTHON] there is logging problem and some commands exit prematurely #12135
Comments
Version 3.0.43 is better; it continues and generates code despite the load class failure. |
This is caused by a mismatch between logback 1.4.x and slf4j 1.7.x Logback 1.3.x and 1.4.x require slf4j 2.x, due to a change in the binding behavior. The fix is EITHER upgrade slf4j to 2.0.7 I am going to provide a quick PR with the upgrade for slf4j. |
PR: #12194 |
Apologies, my fix will not address any of the underlying generation errors, but it will allow the logging output to be seen when using the tool. On a larger scale, it seems 3.0.42, by upgrading from Java 8 to Java 11 might not be so minor of a release after all, so it may be useful to make it easier for people to jump back to 3.0.41 if they are experiencing problems. |
Fix #12135 - Upgrading slf4j to latest
swagger-codegen-cli-3.0.46.jar / Windows 10 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". |
macos homebrew swagger-codegen/3.0.46. Same error |
@pluberd @deniskniazev-municorn See this comment for how to compensate. |
Problem solved. Version 3.0.50 works fine. Thank you, kind stranger. |
It was solved in 3.0.47. |
Description
The program aborts before completing some commands when a logging library is absent.
Swagger-codegen version
3.0.42
Swagger declaration file content or URL
I cached them from https://developer.ebay.com/; there is nothing special about them; any contract will exhibit the problem.
Command line used for generation
Steps to reproduce
I'm currently using macOS Ventura Intel and openjdk@11.
I've used the program for a few years and have upgraded regularly. Today the upgrade proceeded normally, but afterwards, the program malfunctioned.
All commands that I tried displayed the following. See the prior section for examples.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
The more severe consequence is that some commands, e.g. generate, abort prematurely, so essential work can be accomplished.
Related issues/PRs
Searching on 'slf4j' yields many results. The gist is the problem has arisen and then been fixed several times.
Suggest a fix/enhancement
I don't know Java, so I can't help myself or others.
This might be a good starting point.
https://www.slf4j.org/codes.html#StaticLoggerBinder
Since this problem recurs, add a unit test.
The text was updated successfully, but these errors were encountered: