From e9d35e5f75c668e22c6fcfcc76bda79f4d23f04d Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Mon, 30 Dec 2024 13:39:59 +0200 Subject: [PATCH] Conditionally log debug statement about missing factory --- .../java/io/quarkus/arc/runtime/BeanContainerImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/BeanContainerImpl.java b/extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/BeanContainerImpl.java index e9a2256497b99..0babdbf8c064a 100644 --- a/extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/BeanContainerImpl.java +++ b/extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/BeanContainerImpl.java @@ -44,9 +44,11 @@ public Factory beanInstanceFactory(Supplier> fallbackSupplier, private Factory createFactory(Supplier> handleSupplier, Supplier> fallbackSupplier, Class type, Annotation... qualifiers) { if (handleSupplier == null) { - LOGGER.debugf( - "No matching bean found for type %s and qualifiers %s. The bean might have been marked as unused and removed during build.", - type, Arrays.toString(qualifiers)); + if (LOGGER.isDebugEnabled()) { + LOGGER.debugf( + "No matching bean found for type %s and qualifiers %s. The bean might have been marked as unused and removed during build.", + type, Arrays.toString(qualifiers)); + } if (fallbackSupplier != null) { return fallbackSupplier.get(); } else {