Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle logging #352

Closed
jpink opened this issue Aug 17, 2023 · 2 comments
Closed

Gradle logging #352

jpink opened this issue Aug 17, 2023 · 2 comments

Comments

@jpink
Copy link

jpink commented Aug 17, 2023

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.

@github-actions
Copy link

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

@oshai
Copy link
Owner

oshai commented Aug 21, 2023

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.

@oshai oshai closed this as completed Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants