oshai/kotlin-logging

Gradle logging

jpink opened this issue · 2 comments

jpink commented

I want to use KotlinLogging in Gradle Plugin. How to route logging messages to Gradle Logging API? Probably using SLF4J?

You can create Logger using org.gradle.api.logging.Logging.getLogger(my.Plugin::class.java) or you can use project.logger property directly.

Thank you for reporting an issue. See the wiki for documentation and slack for questions.

oshai commented

According to docs:

Gradle routes all logging via SLF4J. You can use either an SLF4J Logger or a Gradle Logger to perform logging.

https://docs.gradle.org/current/javadoc/org/gradle/api/logging/Logging.html

So I think using slf4j module (regular jvm) should work.