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

godot.annotation.processor.utils.LoggerWrapper.kt Maven / Gradle / Ivy

There is a newer version: 0.10.0-4.3.0
Show newest version
package godot.annotation.processor.utils

import com.google.devtools.ksp.processing.KSPLogger
import com.google.devtools.ksp.symbol.KSNode
import godot.entrygenerator.model.GodotJvmSourceElement
import godot.entrygenerator.utils.Logger

internal class LoggerWrapper(
    private val kspLogger: KSPLogger
) : Logger {
    override fun logging(sourceElement: GodotJvmSourceElement, message: String) = kspLogger.logging(message, sourceElement.symbolProcessorSource as? KSNode)

    override fun info(sourceElement: GodotJvmSourceElement, message: String) = kspLogger.info(message, sourceElement.symbolProcessorSource as? KSNode)

    override fun warn(sourceElement: GodotJvmSourceElement, message: String) = kspLogger.warn(message, sourceElement.symbolProcessorSource as? KSNode)

    override fun error(sourceElement: GodotJvmSourceElement, message: String) = kspLogger.error(message, sourceElement.symbolProcessorSource as? KSNode)

    override fun exception(e: Throwable) = kspLogger.exception(e)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy