OptionalbatchOptional batch separator to emit after each statement (e.g., "GO" for SQL Server)
OptionaldefaultOptional default schema name to use for Flyway migrations for replacing schema names with the placeholder ${flyway:defaultSchema}
OptionaldescriptionOptional description to include as a comment at the start of the log
OptionalfilterOptional user ID to filter SQL logging - only log SQL executed by this user
OptionalfilterArray of patterns to filter SQL statements. Supports both regex (RegExp objects) and simple wildcard patterns (strings). How these patterns are applied depends on filterType.
String patterns support:
RegExp examples:
OptionalfilterDetermines how filterPatterns are applied:
Note: If filterPatterns is empty/undefined, all SQL is logged regardless of filterType.
OptionalformatWhether to format output as a flyway migration file with schema placeholders
OptionallogWhether to log record change metadata wrapper SQL (default: false). When false, only core spCreate/spUpdate/spDelete calls are logged
OptionalprettyWhether to pretty print SQL statements with proper formatting
OptionalretainWhether to retain log files that contain no SQL statements (default: false). When false, empty log files are automatically deleted on dispose
OptionalsessionOptional friendly name for this logging session (for UI display)
OptionalstatementWhich types of statements to log: 'queries' (all), 'mutations' (only data changes), 'both' (default)
OptionalvariableWhen set, enables variable-count-based batch separation instead of emitting the batch separator after every statement. The logger tracks how many SQL variable declarations (DECLARE @...) have accumulated in the current batch. When the running count reaches this threshold, a batch separator is emitted before the next statement and the counter resets.
This prevents SQL Server's 10,000-variable-per-batch limit from being hit on large migration files while avoiding the verbosity of one GO per statement.
Requires batchSeparator to also be set. Recommended value: 200.
Set to 0 or leave undefined to use the legacy per-statement behavior.
OptionalverboseWhether to output verbose debug information to console (default: false)
Configuration options for SQL logging sessions