From 700c782a1e993083a817092747b0f6179b748cb8 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 18 Jul 2016 01:34:46 -0800 Subject: [PATCH] warn only if level >= 2 --- .../kotlin/com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt b/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt index cb7dac33..533404c6 100644 --- a/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt +++ b/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinCompiler.kt @@ -104,7 +104,7 @@ class KotlinCompiler @Inject constructor( message: String, location: CompilerMessageLocation) { if (severity.isError) { System.err.println(location.dump(message)) - } else if (severity == CompilerMessageSeverity.WARNING) { + } else if (severity == CompilerMessageSeverity.WARNING && KobaltLogger.LOG_LEVEL >= 2) { warn(location.dump(message)) } else if (severity == CompilerMessageSeverity.INFO && KobaltLogger.LOG_LEVEL >= 2) { log(2, location.dump(message))