Skip to content

Commit

Permalink
Reduce Agroal pool logging
Browse files Browse the repository at this point in the history
In Quarkus LangChain4j, we ended up with log entries like:
2024-09-04 15:59:04,507 INFO  [io.agr.pool] (executor-thread-1) Datasource '<default>': Pool interceptors: [io.quarkiverse.langchain4j.pgvector.PgVectorAgroalPoolInterceptor_X57UyAR6Zcr9HEqaFpEAQVtGhO8_Synthetic_ClientProxy@762e5bc7 (priority 0)]

It's not something the user should be bothered with.
  • Loading branch information
gsmet committed Sep 4, 2024
1 parent 4df321c commit c75211d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import java.util.logging.Level;
import java.util.stream.Collectors;

import javax.sql.XADataSource;
Expand Down Expand Up @@ -55,6 +56,7 @@
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.LogCategoryBuildItem;
import io.quarkus.deployment.builditem.RemovedResourceBuildItem;
import io.quarkus.deployment.builditem.SslNativeConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
Expand Down Expand Up @@ -421,4 +423,9 @@ void registerRowSetSupport(
"com.sun.rowset.providers.RIOptimisticProvider",
"com.sun.rowset.providers.RIXMLProvider").build());
}

@BuildStep
void reduceLogging(BuildProducer<LogCategoryBuildItem> logCategories) {
logCategories.produce(new LogCategoryBuildItem("io.agroal.pool", Level.WARNING));
}
}

0 comments on commit c75211d

Please sign in to comment.