• Reference
  • Version · 6.0
  • Change Automation Reference

mirror-console-messages-to-log

Last updated: September 29, 2026

--mirror-console-messages-to-log is a global Boolean parameter that controls whether Liquibase also writes its console messages to the log as [liquibase.ui] records. By default, Liquibase mirrors console messages only when you write the log to a file with --log-file.

Uses

Console messages are the lines Liquibase shows while a command runs, such as the banner, each changeset as it runs, and the success message. Mirroring them into the log gives the log a complete record of the run, which helps when you send logs to an analysis tool or attach a log file to a support case.

As of Liquibase Secure 6.0, when you do not set --mirror-console-messages-to-log, Liquibase decides whether to mirror console messages based on where the log goes:

  • You set --log-file: Liquibase mirrors console messages into the log. With --log-level at INFO or more detailed, the log file then holds everything you saw on screen as well as the log records.

  • You do not set --log-file: Liquibase does not mirror console messages. The log is written to the console too, so a mirrored copy would print each message twice.

If Liquibase cannot open the log file, it writes the log to the console instead and does not mirror console messages.

Setting --mirror-console-messages-to-log explicitly overrides this in either direction. Set it to false to keep console messages out of your log file, for example to reduce its size. Set it to true to mirror console messages even when you do not set --log-file.

Note: With --mirror-console-messages-to-log=true and no --log-file, each console message appears on the console twice when --log-level is INFO or more detailed, first as the plain line and then as a timestamped [liquibase.ui] log record. Before Liquibase Secure 6.0, this was the default behavior.

To show command output on the console when you also write it to a file with --output-file, use --mirror-output-to-console instead.

Examples: mirror-console-messages-to-log

Write the log to a file and include the console messages in it:

liquibase --log-file=liquibase.log --log-level=INFO update

Write the log to a file and leave the console messages out of it:

liquibase --log-file=liquibase.log --log-level=INFO --mirror-console-messages-to-log=false update

Using --mirror-console-messages-to-log alongside --log-level

Liquibase writes mirrored console messages to the log as INFO records, and mirrored error messages as SEVERE records. The --log-level setting then decides which of them the log keeps:

  • At INFO or more detailed: The log keeps all mirrored console messages.

  • At the default log level: The log file records only SEVERE messages, so it keeps mirrored error messages and leaves out the rest.

To capture the banner, changeset messages, and success message in your log file, set both --log-file and --log-level=INFO.

Note: The update summary reaches the log through --show-summary-output rather than through mirroring. With --log-level=INFO and --log-file set, the update summary still appears in the log file when --mirror-console-messages-to-log is false.

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

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)

Unix:

JAVA_OPTS=-Dliquibase.mirrorConsoleMessagesToLog=<true|false>

Windows:

JAVA_OPTS=-D"liquibase.mirrorConsoleMessagesToLog"=<true|false>

Liquibase environment variable

LIQUIBASE_MIRROR_CONSOLE_MESSAGES_TO_LOG=<true|false>