log-file
To log execution details of any command, use the log-file
parameter. The log-file
parameter sends logging messages of what Liquibase does during runtime to a file.
Uses
By default, Liquibase sends command output to STDOUT
(the console). However, you can use log-file
to record this information in a permanent location.
If you want to set the log level for your log file, you also need to specify the log-level parameter. If you don't specify the log-level
parameter, the default log value will be SEVERE
.
Example: log-file
liquibase --log-level=debug --log-file=../the/path/to/my/logs update
Example: log-file
and output-file
To get the log and output information from a command, use the log-file
and output-file
parameters simultaneously:
liquibase --output-file=mysnapshot.json --log-level=debug --log-file=liquibase.log snapshot
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.