Flyway Loggers Setting
Published 15 January 2025
Description
Allows you to override Flyway's logging auto-detection and specify an exact logger, or comma-separated list of loggers, to use. This can be useful when a dependency comes with a logger you do not wish to use.
Valid Options
auto
- Auto detect the logger (default behavior)console
- Use stdout/stderr (only available when using CLI)slf4j
- Use the slf4j loggerlog4j2
- Use the log4j2 loggerapache-commons
- Use the Apache Commons logger
Alternatively you can provide the fully qualified class name for any other logger to use that.
Type
String array
Default
["auto"]
Notes
If you are using Flyway within Java and have multiple instances of the Flyway object with different configurations, you must ensure they all have the same loggers configured. Other scenarios are unsupported.
Usage
Flyway Desktop
This can't be configured via Flyway Desktop.
Command-line
./flyway -loggers=auto
TOML Configuration File
[flyway]
loggers = ["auto"]
Configuration File
flyway.loggers=auto
Environment Variable
FLYWAY_LOGGERS=auto
API
Flyway.configure()
.loggers("auto")
.load()
Gradle
flyway {
loggers = 'auto'
}
Maven
<configuration>
<loggers>auto</lockRetryCount>
</configuration>