log-channels

The --log-channels parameter controls which "channels" are logged when running Liquibase commands.

Uses

The channel is shown in each log entry in the second set of brackets. For example, in [2022-05-20 12:52:34] FINE [liquibase.database] Connection has been created the channel is liquibase.database.

Channels are hierarchical, so the above message will be shown if log-channels is set to liquibase or liquibase.database

The default value is liquibase, and multiple channels can be specified by comma separating them. For example, --log-channels=liquibase,com.microsoft.

To enable all logging, regardless of the channel use --log-channels=all

The level the specified channels are logged at is controlled by the log-level setting, even if that level is OFF.

Syntax

For more information, see Working with Command Parameters. You can set this parameter in the following ways:

Option Syntax
Liquibase properties file
liquibase.logChannels: <string>
Global CLI parameter
liquibase
 --log-channels=<string> update
 --changelog-file=mychangelog.xml

JVM system property

JAVA_OPTS Environment Variable

macOS/Linux:
JAVA_OPTS=-Dliquibase.logChannels=<string>
Windows:
set JAVA_OPTS=-Dliquibase.logChannels=<string>
Liquibase Environment Variables macOS/Linux:
LIQUIBASE_LOG_CHANNELS=<string>
Windows:
set LIQUIBASE_LOG_CHANNELS=<string>

Note: These commands only apply to the current shell. To set permanent environment variables, see Liquibase Environment Variables.