From bbcb36ede2db1f44b4f48c2f983d6fc0d7ba61a4 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Thu, 12 Oct 2023 12:49:32 -0700 Subject: [PATCH] Reduce logging when documenting multiple packages --- lib/src/generator/generator_frontend.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/src/generator/generator_frontend.dart b/lib/src/generator/generator_frontend.dart index bb4f02a9ed..6dfff94a6c 100644 --- a/lib/src/generator/generator_frontend.dart +++ b/lib/src/generator/generator_frontend.dart @@ -59,7 +59,11 @@ class GeneratorFrontEnd implements Generator { packageGraph, packageGraph.defaultPackage); var indexAccumulator = []; + var multiplePackages = packageGraph.localPackages.length > 1; for (var package in packageGraph.localPackages) { + if (multiplePackages) { + logInfo('Generating docs for package ${package.name}...'); + } for (var category in filterNonDocumented(package.categories)) { logInfo('Generating docs for category ${category.name} from ' '${category.package.fullyQualifiedName}...'); @@ -68,8 +72,10 @@ class GeneratorFrontEnd implements Generator { } for (var lib in filterNonDocumented(package.libraries)) { - logInfo('Generating docs for library ${lib.name} from ' - '${lib.element.source.uri}...'); + if (!multiplePackages) { + logInfo('Generating docs for library ${lib.name} from ' + '${lib.element.source.uri}...'); + } if (!lib.isAnonymous && !lib.hasDocumentation) { packageGraph.warnOnElement(lib, PackageWarning.noLibraryLevelDocs); }