diff --git a/java/kotlin-extractor2/src/main/kotlin/KotlinExtractor.kt b/java/kotlin-extractor2/src/main/kotlin/KotlinExtractor.kt index 6904867ec71..9be80725c76 100644 --- a/java/kotlin-extractor2/src/main/kotlin/KotlinExtractor.kt +++ b/java/kotlin-extractor2/src/main/kotlin/KotlinExtractor.kt @@ -141,9 +141,9 @@ OLD: KE1 val globalExtensionState = KotlinExtractorGlobalState() */ doAnalysis(compression, trapDir, srcDir, loggerBase, dtw, compilation, invocationExtractionProblems, kotlinArgs) + loggerBase.printLimitedDiagnosticCounts(dtw) /* OLD: KE1 - loggerBase.printLimitedDiagnosticCounts(tw) logPeakMemoryUsage(logger, "after extractor") */ logger.info("Extraction completed") diff --git a/java/kotlin-extractor2/src/main/kotlin/utils/Logger.kt b/java/kotlin-extractor2/src/main/kotlin/utils/Logger.kt index 2bc8bc076b8..6fd69207b27 100644 --- a/java/kotlin-extractor2/src/main/kotlin/utils/Logger.kt +++ b/java/kotlin-extractor2/src/main/kotlin/utils/Logger.kt @@ -278,22 +278,19 @@ class LoggerBase(val diagnosticCounter: DiagnosticCounter): BasicLogger { } } -/* -OLD: KE1 fun printLimitedDiagnosticCounts(dtw: DiagnosticTrapWriter) { - for ((caller, info) in diagnosticCounter.diagnosticInfo) { - val severity = info.first - val count = info.second + for ((caller, count) in diagnosticCounter.diagnosticInfo) { + val callDescription = caller.first + val severity = caller.second if (count >= diagnosticCounter.diagnosticLimit) { val message = "Total of $count diagnostics (reached limit of ${diagnosticCounter.diagnosticLimit}) from $caller." if (verbosity >= 1) { - emitDiagnostic(dtw, severity, "Limit", message, message, null, dtw.unknownLocation) + emitDiagnostic(dtw, null, severity, "Limit", message, message, null, dtw.unknownLocation) } } } } -*/ override fun flush() { logStream.flush()