All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bennyhuo.kotlin.trimindent.compiler.Logger.kt Maven / Gradle / Ivy

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