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)