[PL] Introduce new CLI parameter: -Xpartial-linkage-loglevel

The parameter controls the level of logs produced during the compile time by the partial linkage: 'info', 'warn' (default for now), and 'error'.
This commit is contained in:
Dmitriy Dolovov
2023-03-20 12:11:13 +01:00
committed by Space Team
parent d8902816d0
commit 831611d577
9 changed files with 57 additions and 6 deletions
@@ -0,0 +1,21 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.config
enum class PartialLinkageLogLevel {
INFO, WARNING, ERROR;
companion object {
val DEFAULT = WARNING
fun resolveLogLevel(key: String): PartialLinkageLogLevel = when (key.uppercase()) {
"INFO" -> INFO
"WARNING" -> WARNING
"ERROR" -> ERROR
else -> error("Unknown partial linkage compile-time log level '$key'")
}
}
}