Liquibase Log Level

This category is where most discussions regarding Liquibase will typically take place.

Using liquibase 4.11.0 and maven 3.8.5

    <dependency>
        <groupId>org.liquibase</groupId>
        <artifactId>liquibase-core</artifactId>
        <version>4.11.0</version>
    </dependency>

I cannot get liquibase to shut up when running tests. Tried:

< properties>
<liquibase.logging>severe</liquibase.logging>

did not work tried:

                <plugin>
                    <groupId>org.liquibase</groupId>
                    <artifactId>liquibase-core</artifactId>
                    <version>4.11.0</version>
                    <configuration>
                        <log-level>off</log-level>
                    </configuration>
                </plugin>

did not work tried

-Dliquibase.logging=severe

and

-Dorg.slf4j.simpleLogger.defaultLogLevel=SEVERE

did not work. Tried modivying the maven simplelogger.properties file

org.slf4j.simpleLogger.warnLevelString=SEVERE

Did not work.

We used to do this:

@Override
public void run() {
    try {
        JdbcConnection connection = new JdbcConnection(jdbc.getConnection());
        Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(connection);
        Liquibase lbase = new Liquibase("database/changelog-master.xml", new ClassLoaderResourceAccessor(), database);
        setLoggingForTestContext(lbase);
        runUpdate(lbase);
    } catch (Exception e) {
    }
}

private void setLoggingForTestContext(Liquibase lbase) {
    String context = settings.getDataBaseContext();
    if (isLocalOrTestContext(context)) {
        lbase.getLog().setLogLevel(LogLevel.OFF);//<<--NO LONGER WORKS
    }
}

Now my log is getting flooded with INFO messages. PLEASE ADVISE.

INFO: ChangeSet database/updates.xml::static-test-data-insert-tank-mix-target-crops::as77566 ran successfully in 8ms
Running Changeset: database/updates.xml::static-test-data-insert-record-metadata-for-entities::USER
Jun 14, 2022 4:00:26 PM liquibase.changelog
INFO: New row inserted into RECORD_METADATA
Jun 14, 2022 4:00:26 PM liquibase.changelog
INFO: New row inserted into RECORD_METADATA
Jun 14, 2022 4:00:26 PM liquibase.changelog
INFO: New row inserted into RECORD_METADATA
… (100000000 more lines)

Does anyone have a working maven POM configuration that changes the logging level or a command line that works to just quiet ONLY the liquibase logs?

replied here My posts are getting blocked - #5 by ktaggart thanks

The changes seem to have no effect on the output from the maven process when it invokes liquibase. I’m still getting a TON of output.

I deleted my entire log configuration. This is all vanilla, there are no slf4j, logback or any other configuration in the pom.

My changes have had no effect. I tried this:

    <properties>
        <liquibase.logging>error</liquibase.logging>
    </properties>

    <build>
        <finalName>products-server</finalName>
        <plugins>
            <plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <configuration>
                    <logging>error</logging>
                </configuration>
            </plugin>

I tried running like this:
mvn verify -Dliquibase.logging=ERROR

I tried
export JAVA_OPTS=“-Dliquibase.sql.logLevel=ERROR -Dliquibase.logLevel=ERROR”

Nothing is shutting the log up!!!

PLEASE HELP

The output I am getting looks like this (thousands of lines of this):

INFO: New row inserted into RECORD_METADATA
Jul 01, 2022 2:24:41 PM liquibase.changelog
INFO: New row inserted into RECORD_METADATA
Jul 01, 2022 2:24:41 PM liquibase.changelog
INFO: ChangeSet database/updates.xml::static-test-data-insert-record-metadata-for-entities::ZGZ1IRE ran successfully in 40ms
Running Changeset: database/updates.xml::202201051503-add-is-carrier-column-to-reference-chemicals::KZHGHYR
Jul 01, 2022 2:24:41 PM liquibase.changelog
INFO: Columns IS_CARRIER(BOOLEAN) added to REFERENCE_CHEMICAL
Jul 01, 2022 2:24:41 PM liquibase.changelog
INFO: ChangeSet database/updates.xml::202201051503-add-is-carrier-column-to-reference-chemicals::KZHGHYR ran successfully in 64ms
Running Changeset: database/updates.xml::202201051612-add-is-carrier-column-to-reference-fertilizer::CHN7D1W
Jul 01, 2022 2:24:41 PM liquibase.changelog
INFO: Columns IS_CARRIER(BOOLEAN) added to REFERENCE_FERTILIZER