Fix gh-32075.

Notice jul isn't supported yet.

With this patch, we can set different log level for console and file appenders without falling back to customized log4j.xml or logback-spring.xml.

Related questions on stackoverflow:

  • https://stackoverflow.com/questions/51349261/how-to-set-different-logging-levels-for-console-writing-and-file-writing-in-java
  • https://stackoverflow.com/questions/51277445/how-to-specify-specific-logger-level-for-each-of-file-writing-and-console-writin

Comment From: pivotal-cla

@Dieken Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@Dieken Thank you for signing the Contributor License Agreement!

Comment From: Dieken

./gradlew publishToMavenLocal works for me, no idea why concourse-ci/status failed, I'm not authorized to check its report.

Comment From: wilkinsona

./gradlew publishToMavenLocal

This does the minimum necessary to create the jars and publish them to your local Maven repository. Please run ./gradlew build instead.

Comment From: Dieken

./gradlew publishToMavenLocal

This does the minimum necessary to create the jars and publish them to your local Maven repository. Please run ./gradlew build instead.

Thanks for your reminder, I pushed again, now the CI job passed.

Comment From: Dieken

Btw, I checked Quarkus, it has similar configuration:

  • https://quarkus.io/guides/logging#quarkus-log-logging-log-config_quarkus.log.console.level
  • https://quarkus.io/guides/logging#quarkus-log-logging-log-config_quarkus.log.file.level

This feature is especially useful for the scenario mentioned in https://github.com/spring-projects/spring-boot/issues/32075

Comment From: mhalbritter

Thank you and congrats on your first contribution!