In a Mojo, I get a Logger by using getLog()
.
Assume I add a dependency to my maven plugin and call a method there. This dependency uses log4j.
Can I redirect the logging to the Maven logging?
EDIT:
I did not specify the version. I need a solution for log4j in version 1.2.17.
Excluding log4j and then using the dependency
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>1.7.30</version>
</dependency>
seems to do the trick.