Skip to content
Permalink
Browse files

[feature] Default CI log level for slf4j-simple to error to prevent n…

…oise (#5118)

* [feature] Log "debounce" filter to remove spam.

* [log] slf4j-simple should be optional

This also sets the default log level to ERROR during CI builds for many
mvn invocations. This should reduce noise in the logs.

* [log] Rely only on mvn loglevel=error for now

* [cli] Clean up unused dependency

* [log] Change level to error/warn in more CI
  • Loading branch information
jimschubert committed Jan 29, 2020
1 parent f37951a commit 1ac0f141a6a14d1563eb248258d688e2cca29bf8
Showing with 17 additions and 17 deletions.
  1. +6 −6 .travis.yml
  2. +2 −2 CI/.drone.yml
  3. +1 −1 CI/bitrise.yml
  4. +4 −4 CI/circle_parallel.sh
  5. +1 −1 appveyor.yml
  6. +1 −0 bin/openapi3/run-all-petstore
  7. +1 −2 bin/utils/ensure-up-to-date
  8. +1 −1 circle.yml
@@ -133,13 +133,13 @@ script:
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
# run integration tests defined in maven pom.xml
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
- mvn --quiet --batch-mode --show-version clean install
- mvn --quiet --batch-mode --show-version verify -Psamples
- mvn --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test maven plugin
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test gradle plugin
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk)
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
@@ -29,8 +29,8 @@ steps:
- name: java11-test
image: openjdk:11.0
commands:
- ./mvnw clean install
- ./mvnw --quiet verify -Psamples.droneio
- ./mvnw -quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- ./mvnw --quiet verify -Psamples.droneio -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test all generators with fake petstore spec (2.0, 3.0)
- /bin/bash bin/utils/test-fake-petstore-for-all.sh
# generate test scripts
@@ -28,7 +28,7 @@ workflows:
set -e
mvn package
mvn package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
title: Build openapi-generator
- script@1.1.5:
title: Update Swift4 samples
@@ -11,8 +11,8 @@ if [ "$NODE_INDEX" = "1" ]; then
echo "Running node $NODE_INDEX to test 'samples.circleci' defined in pom.xml ..."
#cp CI/pom.xml.circleci pom.xml
java -version
mvn --quiet verify -Psamples.circleci
mvn --quiet javadoc:javadoc -Psamples.circleci
mvn --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error

elif [ "$NODE_INDEX" = "2" ]; then
# run ensure-up-to-date sample script on SNAPSHOT version only
@@ -47,13 +47,13 @@ elif [ "$NODE_INDEX" = "2" ]; then
sudo apt-get -y build-dep libcurl4-gnutls-dev
sudo apt-get -y install libcurl4-gnutls-dev
# run integration tests
mvn --quiet verify -Psamples.misc
mvn --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
else
echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..."
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
java -version
#cp CI/pom.xml.circleci.java7 pom.xml
mvn --quiet verify -Psamples.circleci.jdk7
mvn --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
fi


@@ -48,7 +48,7 @@ build_script:
- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln
- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# install openapi-generator locally
- mvn clean install --quiet
- mvn clean install --quiet -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# run the locally installed openapi-generator-gradle-plugin
- gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --info
test_script:
@@ -10,6 +10,7 @@ sleep 10

successes=0
failures=0
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn"
for SCRIPT in $(ls -l ./bin/openapi3/*.sh | grep -v all)
do
if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then
@@ -93,8 +93,7 @@ declare -a always_iterate=(
"${root}/bin/utils/export_generators_readme.sh"
)

export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"

export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn"
if [ "true" = "$batch_mode" ]; then
if [ ! -f "$executable" ]; then
(cd "${root}" && mvn -B clean package -DskipTests=true -Dmaven.javadoc.skip=true)
@@ -66,7 +66,7 @@ jobs:
- run: sleep 30
- run: cat /etc/hosts
# Test
- run: mvn --quiet clean install
- run: mvn --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run: ./CI/circle_parallel.sh
# Save dependency cache
- save_cache:

0 comments on commit 1ac0f14

Please sign in to comment.
You can’t perform that action at this time.