From a22360a6d9193c75d855207e142a2ccd6b120f62 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 20 Feb 2024 17:29:24 +0100 Subject: [PATCH] feat(scanner): Log the configured provenance storages In addition to the scan storages, also log the provenance storages at info level. Signed-off-by: Sebastian Schuberth --- .../scanner/src/main/kotlin/ScannerCommand.kt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt b/plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt index c595b43ff1afc..6d08d573f2a26 100644 --- a/plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt +++ b/plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt @@ -193,14 +193,19 @@ class ScannerCommand : OrtCommand( val scanStorages = ScanStorages.createFromConfig(ortConfig.scanner) val workingTreeCache = DefaultWorkingTreeCache() - logger.info { - val readers = scanStorages.readers.map { it.javaClass.simpleName } - "Using the following scan storages for reading results: $readers" - } + with(scanStorages) { + logger.info { + val storages = listOf(packageProvenanceStorage, nestedProvenanceStorage).map { it.javaClass.simpleName } + "Using the following provenance storages: $storages" + } - logger.info { - val writers = scanStorages.writers.map { it.javaClass.simpleName } - "Using the following scan storages for writing results: $writers" + logger.info { + "Using the following scan storages for reading results: " + readers.map { it.javaClass.simpleName } + } + + logger.info { + "Using the following scan storages for writing results: " + writers.map { it.javaClass.simpleName } + } } try {