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

You can set this parameter in the following ways:

Option Syntax
Liquibase properties file
liquibase.outputLineSeparator: <string>
Global flow file argument (example)
stages:
  Default:
    actions:
      - type: liquibase
        command: update
        globalArgs: { output-line-separator: "<string>" }
Global CLI parameter
liquibase
 --output-line-separator=<string> update
 --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS Environment Variable)

JAVA_OPTS=-Dliquibase.outputLineSeparator=<string>
Liquibase Environment Variables
LIQUIBASE_OUTPUT_LINE_SEPARATOR=<string>

For more information, see Working with Command Parameters.

Related links