Open Pe-te opened 4 years ago
The amount of logging which is currently generated is absurd. Any update on this?
@DanielKalmann Does it work for you when you hack the JAVA_OPTS into the shell script? I tried finding the corresponding file in this repo to add a pull request, but no luck. If someone knows where to find it, feel free to add it.
file: swagger-codegen old line: exec java -jar /usr/local/Cellar/swagger-codegen/3.0.18/libexec/swagger-codegen-cli.jar "$@" new line: exec java $JAVA_OPTS -jar /usr/local/Cellar/swagger-codegen/3.0.18/libexec/swagger-codegen-cli.jar "$@"
Doesn't seem to work for me.
Does it work for you when you hack the JAVA_OPTS into the shell script?
What shell script?
What shell script?
The one that is used when you use swagger-codegen, you can find it like this:
which swagger-codegen
Why does it even output DEBUG level by default?
My workaround to reduce logging is this:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>set-system-properties</goal>
</goals>
<configuration>
<properties>
<property>
<name>org.slf4j.simpleLogger.log.io.swagger.codegen.v3.AbstractGenerator</name>
<value>warn</value>
</property>
<property>
<name>org.slf4j.simpleLogger.log.io.swagger.codegen.v3.generators.DefaultCodegenConfig</name>
<value>error</value>
</property>
</properties>
</configuration>
</execution>
</executions>
</plugin>
The exact property names to use will depend on your situation.
You can identify which classes are producing your spam by using -Dorg.slf4j.simpleLogger.showLogName
and prepending them with org.slf4j.simpleLogger.log.
We would like to pass some options to the java executor to reduce logging output:
In the OpenApi generator for example this is done by setting JAVA_OPTS and then calling the script:
In swagger-codegen those JAVA_OPTS are ignored:
Seems to work when I modify the script and add the options:
macOS, homebrew, swagger-codegen version 3.0.18
I don't see any discussion about the issue, would it be okay to just add the parameter?