mirror-console-messages-to-log

--mirror-console-messages-to-log is a global Boolean parameter. When set to true, the console messages are mirrored to the logs as [liquibase.ui] to provide a more complete picture of Liquibase operations to log analysis tools. Set to false to change this behavior. The default value is true.

Uses

If you want Liquibase to record all console output that would be sent to STDOUT or your log-file, you can leave --mirror-console-messages-to-log at its default value of true. The console messages can provide helpful context to your logs about how you're using Liquibase. Keeping this setting enabled can make it easier to find the source of an error, especially if you use Structured Logging in Liquibase Pro to send your Liquibase output to external log analysis tools like AWS Cloudwatch and ElasticSearch.

However, if you want to exclude the console messages from your structured logs, for example to reduce their file size, you can set --mirror-console-messages-to-log to false.

Tip: You can also use the --mirror-output-to-console parameter to send command output to an output file.

Syntax

You can set this parameter in the following ways:

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

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.mirrorConsoleMessagesToLog=<true|false>
Liquibase Environment Variables
LIQUIBASE_MIRROR_CONSOLE_MESSAGES_TO_LOG=<true|false>

For more information, see Working with Command Parameters.

Related links