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))