Get a logger in a Settings plugin

I am writing a settings plugin for internal use. I can’t figure out how to get a logger. In a Project plugin you can get it with “project.getLogger()” (assuming you named the variable project of course).

The Settings class doesn’t offer a getLogger() method. I assume it is possible because in a settings.gradle file you can do “logger.quiet(“blah”)” just fine.

How do a get a logger from Settings?

class AwesomeSettingsPlugin implements Plugin<Settings> {

     void apply(Settings settings) {
        //How do I get a logger here :-( 

EDIT: Settings.useLogger() with a StandardOutputListener looks promising, I will give that a go

I have the same need and can not find the solution but have a look at this nice workaround :

In my case, I have defined an extension

import org.gradle.api.initialization.Settings
import org.gradle.api.logging.Logger
import org.gradle.api.logging.Logging

val Settings.logger: Logger by lazy {