From 4e934d084e72f1b73c0ce85b0469f3a49f5ae1bc Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Mon, 23 Dec 2024 20:09:33 +0100 Subject: [PATCH] Silence useless log just saying "Hibernate Reactive" --- .../reactive/deployment/HibernateReactiveProcessor.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/hibernate-reactive/deployment/src/main/java/io/quarkus/hibernate/reactive/deployment/HibernateReactiveProcessor.java b/extensions/hibernate-reactive/deployment/src/main/java/io/quarkus/hibernate/reactive/deployment/HibernateReactiveProcessor.java index f006d1835105e..e46f4b04b27bd 100644 --- a/extensions/hibernate-reactive/deployment/src/main/java/io/quarkus/hibernate/reactive/deployment/HibernateReactiveProcessor.java +++ b/extensions/hibernate-reactive/deployment/src/main/java/io/quarkus/hibernate/reactive/deployment/HibernateReactiveProcessor.java @@ -23,6 +23,7 @@ import java.util.OptionalInt; import java.util.Properties; import java.util.Set; +import java.util.logging.Level; import java.util.stream.Collectors; import jakarta.persistence.SharedCacheMode; @@ -30,6 +31,7 @@ import org.hibernate.cfg.AvailableSettings; import org.hibernate.loader.BatchFetchStyle; +import org.hibernate.reactive.provider.impl.ReactiveIntegrator; import org.jboss.logging.Logger; import io.quarkus.arc.deployment.AdditionalBeanBuildItem; @@ -48,6 +50,7 @@ import io.quarkus.deployment.builditem.CombinedIndexBuildItem; import io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem; import io.quarkus.deployment.builditem.LaunchModeBuildItem; +import io.quarkus.deployment.builditem.LogCategoryBuildItem; import io.quarkus.deployment.builditem.SystemPropertyBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; @@ -231,6 +234,11 @@ PersistenceProviderSetUpBuildItem setUpPersistenceProviderAndWaitForVertxPool(Hi return new PersistenceProviderSetUpBuildItem(); } + @BuildStep + void silenceLogging(BuildProducer logCategories) { + logCategories.produce(new LogCategoryBuildItem(ReactiveIntegrator.class.getName(), Level.WARNING)); + } + /** * This is mostly copied from * io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#handleHibernateORMWithNoPersistenceXml