loggingliquibasedropwizard

stop liqibasew from logging migration results in prod


Stack: Java 21 dropwizard slf4j

How do I stop liquibase logging out of the migration (nothing changed)?

I use dropwizard YAML for the config

so far tried:

UPDATE SUMMARY
Run:                          0
Previously run:              29
Filtered out:                 0
-------------------------------
Total change sets:           29

thanks


Solution

  • Not sure how you're running your migration, but I disabled the output like this.

    updateCommand.addArgumentValue(ShowSummaryArgument.SHOW_SUMMARY, UpdateSummaryEnum.OFF);
    
    CommandScope updateCommand = new CommandScope(UpdateCommandStep.COMMAND_NAME);
    updateCommand.addArgumentValue(DbUrlConnectionCommandStep.DATABASE_ARG, migrator.getDatabase());
    updateCommand.addArgumentValue(UpdateCommandStep.CHANGELOG_FILE_ARG, changeLog);
    updateCommand.addArgumentValue(ShowSummaryArgument.SHOW_SUMMARY, UpdateSummaryEnum.OFF);
    updateCommand.execute();