Liquibase 的 Maven 执行

Maven Execution of Liquibase

我正在通过 Maven 执行 liquibase,就像 mvn liquibase:update 一样,正如您所看到的,我正在控制台中获取输出

[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] ------------------------------------------------------------------------

我希望将此输出或系统日志移动到日志文件中。我们该怎么做?

这是通过执行 -l,--log-file <arg> 将文件记录到所有生成输出的位置来完成的。

示例: mvn <your parameters> --log-file log.txt