Spring Boot: How to disable console logging using properties

To disable console logging, add the following properties to application.properties file:

# Empty this property to disable console logging

# Specify the path to the main log file so you will still have your logs somewhere

If you want to enable console logging in your IDE, here are two ways to re-enable it:

  • Add an alias to the log file /path/to/folder/application.log in your Run Configuration
  • Override the property “logging.pattern.console” in your Run Configuration

Tested with Spring Boot 2.1.4

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.