Home > Mobile >  Maven Execution of Liquibase
Maven Execution of Liquibase

Time:05-21

I am executing liquibase through Maven like mvn liquibase:update and as you can see I am getting output in the console

[INFO] Scanning for projects... 
[INFO]
[INFO] -------< LiquibaseInstanaExperiment:LiquibaseInstanaExperiment >--------
[INFO] Building LiquibaseInstanaExperiment 0.0.1-SNAPSHOT
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- liquibase-maven-plugin:3.3.2:update (default-cli) @ LiquibaseInstanaExperiment ---
[INFO] ------------------------------------------------------------------------
[INFO] Parsing Liquibase Properties File
[INFO]   File: C:\Users\RaghavGupta\Downloads\LiquibaseInstanaExperiment/liquibase.properties
[INFO]   'referencePassword' in properties file is not being used by this task.
[INFO]   'referenceUsername' in properties file is not being used by this task.
[INFO]   'referenceUrl' in properties file is not being used by this task.
[INFO] ------------------------------------------------------------------------
[INFO] Executing on Database: jdbc:postgresql://52.118.184.180:5432/postgres
INFO 5/19/22, 2:27 PM: liquibase: Successfully acquired change log lock
INFO 5/19/22, 2:28 PM: liquibase: Reading from databasechangelog
INFO 5/19/22, 2:28 PM: liquibase: Successfully released change log lock
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  22.277 s
[INFO] Finished at: 2022-05-19T14:28:12 05:30
[INFO] ------------------------------------------------------------------------

I want this output or system logs to move into a log file. How do we do that?

CodePudding user response:

This is done by executing -l,--log-file <arg> to log the file to where all build output will go.

Example: mvn <your parameters> --log-file log.txt

  • Related