Skip to content

Commit

Permalink
Conditionally log debug statement about missing factory
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Dec 30, 2024
1 parent 3b22087 commit e9d35e5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ public <T> Factory<T> beanInstanceFactory(Supplier<Factory<T>> fallbackSupplier,
private <T> Factory<T> createFactory(Supplier<InstanceHandle<T>> handleSupplier, Supplier<Factory<T>> fallbackSupplier,
Class<T> 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 {
Expand Down

0 comments on commit e9d35e5

Please sign in to comment.