Skip to content

Instantly share code, notes, and snippets.

@GlavS
Last active January 20, 2023 15:06
Show Gist options
  • Save GlavS/4c90ae5e3307938ef2e2804313ec5aed to your computer and use it in GitHub Desktop.
Save GlavS/4c90ae5e3307938ef2e2804313ec5aed to your computer and use it in GitHub Desktop.
For Spring Boot users who is sometimes as tired of verbose logging output, especially when running tests, as I am. It is a working way to turn off loggigng messages (completely or filter them to some less verbose level, e.g. ERROR).
resources/application.yml:
spring:
main:
banner-mode: off
logging:
level:
root: error # or "off" for permanent silence
resources/logback.xml:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<logger name="org.springframework" level="ERROR"/> <!--or "OFF" as in file above-->
</configuration>
<!--Name file as "logback-test.xml" if using in test package-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment