From 0e7a41e7c3f763773750534a5e40ad5e72632303 Mon Sep 17 00:00:00 2001 From: Peter Palaga Date: Thu, 17 Aug 2023 13:03:13 +0200 Subject: [PATCH] QuarkusCxfProcessor is too noisy: "Generated class ..." fix #953 --- .../cxf/deployment/QuarkusCxfProcessor.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/extensions/core/deployment/src/main/java/io/quarkiverse/cxf/deployment/QuarkusCxfProcessor.java b/extensions/core/deployment/src/main/java/io/quarkiverse/cxf/deployment/QuarkusCxfProcessor.java index 752c6fc90..569c31cd0 100644 --- a/extensions/core/deployment/src/main/java/io/quarkiverse/cxf/deployment/QuarkusCxfProcessor.java +++ b/extensions/core/deployment/src/main/java/io/quarkiverse/cxf/deployment/QuarkusCxfProcessor.java @@ -208,21 +208,27 @@ void generateClasses( .map(ServiceSeiBuildItem::getSei) .distinct() .forEach(sei -> { - LOGGER.infof("Generating ancillary classes for service %s", sei); + LOGGER.debugf("Generating ancillary classes for service %s", sei); /* * This is a fake build time server start, so it does not matter much that we * use a fake path */ final String path = "/QuarkusCxfProcessor/dummy-" + rnd.nextLong(); + final int oldCnt = capture.getGeneratedClassesCount(); CxfDeploymentUtils.createServer(sei, path, bus); + LOGGER.infof("Generated %d ancillary classes for service %s", + (capture.getGeneratedClassesCount() - oldCnt), sei); }); clients.stream() .map(ClientSeiBuildItem::getSei) .distinct() .forEach(sei -> { - LOGGER.infof("Generating ancillary classes for client %s", sei); + LOGGER.debugf("Generating ancillary classes for client %s", sei); + final int oldCnt = capture.getGeneratedClassesCount(); CxfDeploymentUtils.createClient(sei, bus); + LOGGER.infof("Generated %d ancillary classes for client %s", + (capture.getGeneratedClassesCount() - oldCnt), sei); }); reflectiveClasses.produce( @@ -659,12 +665,16 @@ public void capture(String name, byte[] bytes) { if (!generatedClasses.contains(dotName)) { final String slashName = name.indexOf('/') >= 0 ? name : name.replace('.', '/'); classOutput.getSourceWriter(slashName); - LOGGER.infof("Generated class %s", dotName); + LOGGER.debugf("Generated class %s", dotName); classOutput.write(slashName, bytes); generatedClasses.add(dotName); } } + public int getGeneratedClassesCount() { + return generatedClasses.size(); + } + public String[] getGeneratedClasses() { return generatedClasses.toArray(new String[0]); }