output-line-separator

The output-line-separator global parameter determines the string that separates lines in STDOUT, such as when you use the update-sql command or the future-rollback-sql command. By default, it is set to the line separator used by the operating system:

  • Mac/Linux: LF (line feed; encoded as \n)
  • Windows: CR LF (carriage return line feed; encoded as \r\n)

Uses

If you want to use a different character than your operating system’s default string as a line separator in Liquibase, you can set output-line-separator to a string value of any length. For example, you can set it to multiple newlines or a substring between two newlines.

If you want STDOUT to display all text in a single line, you can set output-line-separator to a non-newline character. The character you set delimits each substring in STDOUT.

Syntax

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

Option Syntax
Liquibase properties file
liquibase.outputLineSeparator: <string>
Global CLI parameter
liquibase
 --output-line-separator=<string> update
 --changelog-file=mychangelog.xml

JVM system property

JAVA_OPTS Environment Variable

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

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

Related links