Open unoexperto opened 5 years ago
duplicate of #9513 ?
I've also tried to set the log level via the logback.xml file, but it suppresses all output.
logback.xml:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="io.swagger" level="warn"/>
</configuration>
Command line:
java -Dlogback.configurationFile=./logback.xml -jar ./swagger-codegen-cli-3.0.20.jar generate ...
Is this supposed to work?
does this help? #10139
This is still not resolved, please can someone address this?
Pinging this issue again. The output is far too verbose 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.
Is there a way to change logging level via command line param ?
I see that it's set to DEBUG in config. It's very verbose.
I tried to make a copy of this file and pass
-Dlogback.configurationFile=./logback.xml
but it didn't help.Thanks!