From 7d471dafa3cdf5e7c5b32b4cf7e05e7cf2f97248 Mon Sep 17 00:00:00 2001 From: Alexander Likhachev Date: Fri, 18 Nov 2022 13:47:28 +0100 Subject: [PATCH] [IC] Lower logging level inside RecoverableCompilationTransaction #KT-49785 In Progress --- .../kotlin/incremental/CompilationTransaction.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/CompilationTransaction.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/CompilationTransaction.kt index c6089e1cd6a..07c8cdc305e 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/CompilationTransaction.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/CompilationTransaction.kt @@ -6,9 +6,9 @@ package org.jetbrains.kotlin.incremental import org.jetbrains.kotlin.build.report.BuildReporter +import org.jetbrains.kotlin.build.report.debug import org.jetbrains.kotlin.build.report.metrics.BuildTime import org.jetbrains.kotlin.build.report.metrics.measure -import org.jetbrains.kotlin.build.report.warn import org.jetbrains.kotlin.compilerRunner.OutputItemsCollector import org.jetbrains.kotlin.konan.file.use import java.io.Closeable @@ -60,7 +60,7 @@ class RecoverableCompilationTransaction( if (Files.exists(outputFile)) { stashFile(outputFile) } else { - reporter.warn { "Marking the $outputFile file as newly added" } + reporter.debug { "Marking the $outputFile file as newly added" } fileRelocationRegistry[outputFile] = null } } @@ -68,8 +68,8 @@ class RecoverableCompilationTransaction( override fun deleteFile(outputFile: Path) { if (fileRelocationIsAlreadyRegisteredFor(outputFile)) { - reporter.warn { "Deleting $outputFile" } if (Files.exists(outputFile)) { + reporter.debug { "Deleting $outputFile" } Files.delete(outputFile) } return @@ -81,7 +81,7 @@ class RecoverableCompilationTransaction( private fun stashFile(outputFile: Path) { val relocatedFilePath = getNextRelocatedFilePath() - reporter.warn { "Moving $outputFile to the stash as $relocatedFilePath" } + reporter.debug { "Moving $outputFile to the stash as $relocatedFilePath" } fileRelocationRegistry[outputFile] = relocatedFilePath Files.move(outputFile, relocatedFilePath) } @@ -91,7 +91,7 @@ class RecoverableCompilationTransaction( private fun fileRelocationIsAlreadyRegisteredFor(outputFile: Path) = outputFile in fileRelocationRegistry private fun revertChanges() { - reporter.warn { "Reverting changes" } + reporter.debug { "Reverting changes" } reporter.measure(BuildTime.RESTORE_OUTPUT_FROM_BACKUP) { for ((originPath, relocatedPath) in fileRelocationRegistry) { if (relocatedPath == null) { @@ -106,7 +106,7 @@ class RecoverableCompilationTransaction( } private fun cleanupStash() { - reporter.warn { "Cleaning up stash" } + reporter.debug { "Cleaning up stash" } reporter.measure(BuildTime.CLEAN_BACKUP_STASH) { Files.walk(stashDir).use { it.sorted(Comparator.reverseOrder())