Skip to content

Commit

Permalink
feat(scanner): Log the configured provenance storages
Browse files Browse the repository at this point in the history
In addition to the scan storages, also log the provenance storages at
info level.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Feb 20, 2024
1 parent 24c029f commit a22360a
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions plugins/commands/scanner/src/main/kotlin/ScannerCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a22360a

Please sign in to comment.