Hi. In my plugin in addition to functional tests I have unit tests of the plugin logic. I would like to be able to change logging level to see also INFO messages (by default only LIFECYCLE+ are visible).
In my code I use standard Slf4j’s Logger. First I tried with logback.xml, but Gradle seems to use its own slf4j implementation (
OutputEventListenerBackedLogger) which wins in unit tests in runtime (although the code is Gradle agnostic) and I need (in a very ugly way) to get context from the logger and set in it (and in addition in
OutputEventRenderer) a desired level.
What is a recommended way to configure logging level in unit tests (where Gradle engine isn’t itself involved in the execution)?