• Reference
  • Version · 6.0
  • Change Automation Reference

log-file

Last updated: September 29, 2026

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.

Note: When --log-level is not set, only --verbosity=verbose changes what is written to this file. It raises the log level to FINE. The quiet and normal tiers both log at SEVERE, which is the default, so --quiet and --verbosity=quiet do not change the file's contents. An explicitly set --log-level overrides the level implied by the verbosity tier.

Note: If Liquibase cannot open the log file for writing, the command still runs. Liquibase reports a warning, disables file logging for that run, and sends log output to the console instead. It does not report that logs were saved to a file it could not open.

Note: Liquibase writes the log file as UTF-8, whatever character set the JVM defaults to. The console uses UTF-8 as well, so text such as a non-ASCII changeset author or remark reaches the file exactly as it appears on screen. This applies to plain text logs and to the JSON and JSON_PRETTY log formats.

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

Compressing log files

Log files can become very large. If the log file name ends with .gz, Liquibase compresses the log as it writes it.

Compression has one tradeoff. If the Liquibase process is stopped abruptly, the compressed file never gets the end marker, also known as a trailer, that tells compression tools it is complete, and those tools report the file as damaged. Your log data is still readable. For how to read it, see Recover a compressed log file after an interrupted run.

Example command to compress a log file

liquibase --log-level=debug --log-file=../the/path/to/my/logs.gz update

In this example, Liquibase writes the log output as a compressed .gz file without requiring any additional information.

Note: If Liquibase cannot open the compressed file for writing, it writes a warning and disables file logging for that run instead of writing an uncompressed file. If an expected .gz log file is missing, check the console output for that warning.

Syntax

You can set this parameter in the following ways:

Option

Syntax

Liquibase properties file (defaults file)

liquibase.logFile: <string>

Global flow file argument

globalArgs: { log-file: "<string>" }

Global CLI parameter

liquibase --log-file=<string> update --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS environment variable)

Unix:

JAVA_OPTS=-Dliquibase.logFile=<string>

Windows:

JAVA_OPTS=-D"liquibase.logFile"=<string>

Liquibase environment variable

LIQUIBASE_LOG_FILE=<string>