mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-10 21:22:03 +00:00
Allow increasing mvnd.log.level via CLI
This commit is contained in:
@@ -385,6 +385,9 @@ public class DaemonMavenCli
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround for https://github.com/mvndaemon/mvnd/issues/39
|
||||
ch.qos.logback.classic.Logger mvndLogger = (ch.qos.logback.classic.Logger) slf4jLoggerFactory.getLogger("org.jboss.fuse.mvnd");
|
||||
mvndLogger.setLevel(ch.qos.logback.classic.Level.toLevel(System.getProperty("mvnd.log.level", "INFO")));
|
||||
}
|
||||
|
||||
private void version( CliRequest cliRequest ) throws ExitException
|
||||
|
@@ -59,7 +59,7 @@ public class ModuleAndPluginNativeIT {
|
||||
/* Build #1: with "Hello" output to target/hello.txt */
|
||||
{
|
||||
final ClientOutput output = Mockito.mock(ClientOutput.class);
|
||||
client.execute(output, "clean", "install", "-e").assertSuccess();
|
||||
client.execute(output, "clean", "install", "-e", "-Dmvnd.log.level=DEBUG").assertSuccess();
|
||||
|
||||
Assertions.assertThat(helloPath).exists();
|
||||
Assertions.assertThat(helloPath).usingCharset(StandardCharsets.UTF_8).hasContent("Hello");
|
||||
@@ -74,7 +74,9 @@ public class ModuleAndPluginNativeIT {
|
||||
Files.write(mojoPath, mojoSource.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
final ClientOutput output = Mockito.mock(ClientOutput.class);
|
||||
client.execute(output, "clean", "install", "-e").assertSuccess();
|
||||
client.execute(output,
|
||||
// "clean", workaround for https://github.com/mvndaemon/mvnd/issues/40
|
||||
"install", "-e", "-Dmvnd.log.level=DEBUG").assertSuccess();
|
||||
|
||||
Assertions.assertThat(helloPath).exists();
|
||||
Assertions.assertThat(helloPath).usingCharset(StandardCharsets.UTF_8).hasContent("Hi");
|
||||
|
Reference in New Issue
Block a user