com.bennyhuo.kotlin.trimindent.compiler.Logger.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trimindent-compiler Show documentation
Show all versions of trimindent-compiler Show documentation
Compile-time trim indent for Kotlin String literals.
The newest version!
package com.bennyhuo.kotlin.trimindent.compiler
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
class Logger(private val messageCollector: MessageCollector) {
fun info(message: Any?) {
println(CompilerMessageSeverity.INFO, message)
}
fun warn(message: Any?) {
println(CompilerMessageSeverity.WARNING, message)
}
fun error(message: Any?) {
println(CompilerMessageSeverity.ERROR, message)
}
fun println(level: CompilerMessageSeverity, message: Any?) {
messageCollector.report(level, "[TrimIndent] ${message.toString()}")
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy