mirror-output-to-console
--mirror-output-to-console
is a global Boolean parameter. When set to true
, Liquibase mirrors command output to both the specified output file and the console. When set to false
, Liquibase either sends command output to the output file (if it exists) or the console (if no output file exists). It is available in Liquibase Pro 4.28.0 and later. The default value is false
.
Uses
By default, when you run a command, Liquibase generates human-readable output and sends it to the console (STDOUT). However, if you use the --output-file
parameter to specify a file to store command output, Liquibase sends it only to the output file and not to the console.
However, you may wish to send your command output to both the console and your output file. To do this, set --mirror-output-to-console
to true
. This allows you to receive and process Liquibase operational information in multiple channels in ways that benefit your workflow.
If you don't specify a value for --output-file
in the first place, Liquibase just sends command output to the console, so there is no reason to use --mirror-output-to-console
.
Tip: You can also use the --mirror-console-messages-to-log
parameter to send command output to a log file.
Syntax
You can set this parameter in the following ways:
Option | Syntax |
---|---|
Liquibase properties file (defaults file) |
|
Global flow file argument (example) |
|
Global CLI parameter |
|
JVM system property (JAVA_OPTS Environment Variable) |
|
Liquibase Environment Variables |
|
For more information, see Working with Command Parameters.