diff --git a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/DatasourceProcessor.java b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/DatasourceProcessor.java index c2dcd99ffe..b0f72df4b6 100644 --- a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/DatasourceProcessor.java +++ b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/DatasourceProcessor.java @@ -4,8 +4,7 @@ import java.util.ArrayList; import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import io.quarkus.agroal.spi.JdbcDataSourceBuildItem; import io.quarkus.deployment.annotations.BuildProducer; @@ -19,14 +18,14 @@ public class DatasourceProcessor { - private static final Logger log = LoggerFactory.getLogger(DatasourceProcessor.class); + private static final Logger log = Logger.getLogger(DatasourceProcessor.class); @BuildStep public SchemaContributorBuildItem registerDatasources( List datasources, BuildProducer systemPropProducer, BuildProducer generatedResourceBuildItemBuildProducer) { - log.info("Processing {} datasource annotations into decls", datasources.size()); + log.infof("Processing %d datasource annotations into decls", datasources.size()); List decls = new ArrayList<>(); List namedDatasources = new ArrayList<>(); for (var ds : datasources) { diff --git a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/EnumProcessor.java b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/EnumProcessor.java index 1a140ffda7..04a1db79a6 100644 --- a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/EnumProcessor.java +++ b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/EnumProcessor.java @@ -12,7 +12,6 @@ import java.util.Collection; import java.util.List; import java.util.Set; -import java.util.function.Consumer; import org.jboss.jandex.AnnotationInstance; import org.jboss.jandex.ClassInfo; @@ -21,8 +20,7 @@ import org.jboss.jandex.FieldInfo; import org.jboss.jandex.PrimitiveType; import org.jboss.jandex.Type; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.annotations.ExecutionTime; @@ -40,14 +38,14 @@ public class EnumProcessor { - private static final Logger log = LoggerFactory.getLogger(EnumProcessor.class); + private static final Logger log = Logger.getLogger(EnumProcessor.class); public static final Set INT_TYPES = Set.of(INT, LONG, BYTE, SHORT); @BuildStep @Record(ExecutionTime.RUNTIME_INIT) SchemaContributorBuildItem handleEnums(CombinedIndexBuildItem index, FTLRecorder recorder) { var enumAnnotations = index.getIndex().getAnnotations(FTLDotNames.ENUM); - log.info("Processing {} enum annotations into decls", enumAnnotations.size()); + log.infof("Processing %d enum annotations into decls", enumAnnotations.size()); return new SchemaContributorBuildItem(moduleBuilder -> { try { var decls = extractEnumDecls(index, enumAnnotations, recorder, moduleBuilder); diff --git a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/JVMCodeGenerator.java b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/JVMCodeGenerator.java index 10268429ab..47a4f1ef44 100644 --- a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/JVMCodeGenerator.java +++ b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/JVMCodeGenerator.java @@ -11,8 +11,7 @@ import java.util.stream.Stream; import org.eclipse.microprofile.config.Config; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import io.quarkus.bootstrap.prebuild.CodeGenException; import io.quarkus.deployment.CodeGenContext; @@ -29,7 +28,7 @@ public abstract class JVMCodeGenerator implements CodeGenProvider { public static final String PACKAGE_PREFIX = "ftl."; public static final String TYPE_MAPPER = "TypeAliasMapper"; - private static final Logger log = LoggerFactory.getLogger(JVMCodeGenerator.class); + private static final Logger log = Logger.getLogger(JVMCodeGenerator.class); @Override public String providerId() { diff --git a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/ModuleProcessor.java b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/ModuleProcessor.java index 3240faaf44..41f230d260 100644 --- a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/ModuleProcessor.java +++ b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/ModuleProcessor.java @@ -15,8 +15,7 @@ import java.util.stream.Collectors; import org.jboss.jandex.DotName; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import org.tomlj.Toml; import org.tomlj.TomlParseResult; @@ -47,7 +46,7 @@ public class ModuleProcessor { - private static final Logger log = LoggerFactory.getLogger(ModuleProcessor.class); + private static final Logger log = Logger.getLogger(ModuleProcessor.class); private static final String FEATURE = "ftl-java-runtime"; @@ -88,7 +87,7 @@ ModuleNameBuildItem moduleName(ApplicationInfoBuildItem applicationInfoBuildItem if (value != null) { return new ModuleNameBuildItem(value); } else { - log.error("module name not found in {}", toml); + log.errorf("module name not found in %s", toml); } } if (source.getParent() == null) { @@ -123,7 +122,7 @@ public void generateSchema(CombinedIndexBuildItem index, i.getSchemaContributor().accept(moduleBuilder); } - log.info("Generating module '{}' schema from {} decls", moduleName, moduleBuilder.getDeclsCount()); + log.infof("Generating module '%s' schema from %d decls", moduleName, moduleBuilder.getDeclsCount()); Path output = outputTargetBuildItem.getOutputDirectory().resolve(SCHEMA_OUT); try (var out = Files.newOutputStream(output)) { moduleBuilder.writeTo(out); diff --git a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/SubscriptionProcessor.java b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/SubscriptionProcessor.java index 247fb594bc..bfd17e2121 100644 --- a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/SubscriptionProcessor.java +++ b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/SubscriptionProcessor.java @@ -8,8 +8,7 @@ import org.jboss.jandex.AnnotationTarget; import org.jboss.jandex.DotName; import org.jboss.jandex.MethodInfo; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import io.quarkus.arc.deployment.AdditionalBeanBuildItem; import io.quarkus.deployment.annotations.BuildProducer; @@ -25,14 +24,14 @@ public class SubscriptionProcessor { - private static final Logger log = LoggerFactory.getLogger(SubscriptionProcessor.class); + private static final Logger log = Logger.getLogger(SubscriptionProcessor.class); @BuildStep SubscriptionMetaAnnotationsBuildItem subscriptionAnnotations(CombinedIndexBuildItem combinedIndexBuildItem, ModuleNameBuildItem moduleNameBuildItem) { Collection subscriptionAnnotations = combinedIndexBuildItem.getComputingIndex() .getAnnotations(Subscription.class); - log.info("Processing {} subscription annotations into decls", subscriptionAnnotations.size()); + log.infof("Processing %s subscription annotations into decls", subscriptionAnnotations.size()); Map annotations = new HashMap<>(); for (var subscriptions : subscriptionAnnotations) { if (subscriptions.target().kind() != AnnotationTarget.Kind.CLASS) { @@ -65,7 +64,7 @@ public void registerSubscriptions(CombinedIndexBuildItem index, for (var metaSub : subscriptionMetaAnnotationsBuildItem.getAnnotations().entrySet()) { for (var subscription : index.getIndex().getAnnotations(metaSub.getKey())) { if (subscription.target().kind() != AnnotationTarget.Kind.METHOD) { - log.warn("Subscription annotation on non-method target: {}", subscription.target()); + log.warnf("Subscription annotation on non-method target: %s", subscription.target()); continue; } var method = subscription.target().asMethod(); diff --git a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/TopicsProcessor.java b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/TopicsProcessor.java index 91efb23bc2..dda47644dd 100644 --- a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/TopicsProcessor.java +++ b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/TopicsProcessor.java @@ -8,8 +8,7 @@ import org.jboss.jandex.DotName; import org.jboss.jandex.Type; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import io.quarkus.deployment.GeneratedClassGizmoAdaptor; import io.quarkus.deployment.annotations.BuildProducer; @@ -27,12 +26,12 @@ public class TopicsProcessor { public static final DotName TOPIC = DotName.createSimple(Topic.class); - private static final Logger log = LoggerFactory.getLogger(TopicsProcessor.class); + private static final Logger log = Logger.getLogger(TopicsProcessor.class); @BuildStep TopicsBuildItem handleTopics(CombinedIndexBuildItem index, BuildProducer generatedTopicProducer) { var topicDefinitions = index.getComputingIndex().getAnnotations(TopicDefinition.class); - log.info("Processing {} topic definition annotations into decls", topicDefinitions.size()); + log.infof("Processing %d topic definition annotations into decls", topicDefinitions.size()); Map topics = new HashMap<>(); Set names = new HashSet<>(); for (var topicDefinition : topicDefinitions) { diff --git a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/TypeAliasProcessor.java b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/TypeAliasProcessor.java index 7b40b1f4c2..8016651076 100644 --- a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/TypeAliasProcessor.java +++ b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/TypeAliasProcessor.java @@ -8,8 +8,7 @@ import org.jboss.jandex.AnnotationValue; import org.jboss.jandex.Type; import org.jboss.jandex.TypeVariable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import io.quarkus.arc.deployment.AdditionalBeanBuildItem; import io.quarkus.deployment.annotations.BuildProducer; @@ -18,7 +17,7 @@ public class TypeAliasProcessor { - private static final Logger log = LoggerFactory.getLogger(TypeAliasProcessor.class); + private static final Logger log = Logger.getLogger(TypeAliasProcessor.class); @BuildStep public void processTypeAlias(CombinedIndexBuildItem index, @@ -26,7 +25,7 @@ public void processTypeAlias(CombinedIndexBuildItem index, BuildProducer additionalBeanBuildItem, BuildProducer typeAliasBuildItemBuildProducer) { Collection typeAliasAnnotations = index.getIndex().getAnnotations(FTLDotNames.TYPE_ALIAS); - log.info("Processing {} type alias annotations into decls", typeAliasAnnotations.size()); + log.infof("Processing %d type alias annotations into decls", typeAliasAnnotations.size()); var beans = new AdditionalBeanBuildItem.Builder().setUnremovable(); for (var mapper : typeAliasAnnotations) { boolean exported = mapper.target().hasAnnotation(FTLDotNames.EXPORT); diff --git a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/VerbProcessor.java b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/VerbProcessor.java index 9b3480a0c5..0fc435ecdc 100644 --- a/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/VerbProcessor.java +++ b/jvm-runtime/ftl-runtime/common/deployment/src/main/java/xyz/block/ftl/deployment/VerbProcessor.java @@ -12,8 +12,7 @@ import org.jboss.jandex.AnnotationValue; import org.jboss.jandex.DotName; import org.jboss.jandex.Type; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import io.quarkus.arc.deployment.AdditionalBeanBuildItem; import io.quarkus.arc.deployment.GeneratedBeanBuildItem; @@ -43,7 +42,7 @@ public class VerbProcessor { public static final DotName VERB_CLIENT_SOURCE = DotName.createSimple(VerbClientSource.class); public static final DotName VERB_CLIENT_EMPTY = DotName.createSimple(VerbClientEmpty.class); public static final String TEST_ANNOTATION = "xyz.block.ftl.java.test.FTLManaged"; - private static final Logger log = LoggerFactory.getLogger(VerbProcessor.class); + private static final Logger log = Logger.getLogger(VerbProcessor.class); @BuildStep VerbClientBuildItem handleVerbClients(CombinedIndexBuildItem index, BuildProducer generatedClients, @@ -51,7 +50,7 @@ VerbClientBuildItem handleVerbClients(CombinedIndexBuildItem index, BuildProduce ModuleNameBuildItem moduleNameBuildItem, LaunchModeBuildItem launchModeBuildItem) { var clientDefinitions = index.getComputingIndex().getAnnotations(VerbClientDefinition.class); - log.info("Processing {} verb clients", clientDefinitions.size()); + log.infof("Processing %d verb clients", clientDefinitions.size()); Map clients = new HashMap<>(); for (var clientDefinition : clientDefinitions) { var iface = clientDefinition.target().asClass(); @@ -236,7 +235,7 @@ public void verbsAndCron(CombinedIndexBuildItem index, List typeAliasBuildItems // included to force typealias processing before this ) { Collection verbAnnotations = index.getIndex().getAnnotations(FTLDotNames.VERB); - log.info("Processing {} verb annotations into decls", verbAnnotations.size()); + log.infof("Processing %d verb annotations into decls", verbAnnotations.size()); var beans = AdditionalBeanBuildItem.builder().setUnremovable(); for (var verb : verbAnnotations) { boolean exported = verb.target().hasAnnotation(FTLDotNames.EXPORT); @@ -248,7 +247,7 @@ public void verbsAndCron(CombinedIndexBuildItem index, } Collection cronAnnotations = index.getIndex().getAnnotations(FTLDotNames.CRON); - log.info("Processing {} cron job annotations into decls", cronAnnotations.size()); + log.infof("Processing %d cron job annotations into decls", cronAnnotations.size()); for (var cron : cronAnnotations) { var method = cron.target().asMethod(); String className = method.declaringClass().name().toString();