filter-log-messages

Note: This parameter is deprecated in new versions of Liquibase.

The filter-log-messages parameter is a Boolean that defines whether Liquibase should filter the log messages for potentially insecure data. The default value is true.

Uses

Liquibase log messages represent the records of events that occur when running commands. With log messages, you can typically find the reason for errors or exceptions and troubleshoot a problem. However, before Liquibase sends all the information to STDERR or the log file, you can prevent sensitive data from being logged in the verbose log messages by using the filter-log-messages parameter.

You can also use the filter-log-messages parameter along with the log-level parameter, which sets the amount of messages generated when running Liquibase commands.

Although, there may be cases when you need to set the filter-log-messages parameter to false:

  • If you are trying to debug something related to a password or key and the filtered log messages can be helpful
  • If you want to improve performance without checking log message strings. For example, when you use the FINE logging or other times when there are a lot of log messages.

Syntax

You can set this parameter in the following ways:

Option Syntax
Liquibase properties file
liquibase.filterLogMessages: <true|false>
Global flow file argument (example)
stages:
  Default:
    actions:
      - type: liquibase
        command: update
        globalArgs: { filter-log-messages: "<true|false>" }
Global CLI parameter
liquibase
 --filter-log-messages=<true|false> update
 --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.filterLogMessages=<true|false>
Liquibase Environment Variables
LIQUIBASE_FILTER_LOG_MESSAGES=<true|false>

For more information, see Working with Command Parameters.