Skip to content

Commit 951c6ac

Browse files
committed
Enable debug logging for tests
For easier debugging. Disable them in maven for less output. Does not work properly, because some classes change the log level like AppConfiguratorTest, GitopsPlaygroundCliTest, GitopsPlaygroundCliMainScriptedTest, GitopsPlaygroundCliMainTest.
1 parent e6db8fc commit 951c6ac

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,17 @@
366366
<configuration>
367367
<!-- Needed to allow unit tests to do reflection, e.g. for SystemLambda's withEnvironmentVariable -->
368368
<argLine>--add-opens java.base/java.util=ALL-UNNAMED</argLine>
369+
<systemProperties>
370+
<property>
371+
<name>ROOT_LOG_LEVEL</name>
372+
<value>OFF</value>
373+
</property>
374+
<property>
375+
<name>APP_LOG_LEVEL</name>
376+
<value>OFF</value>
377+
</property>
378+
</systemProperties>
379+
369380
</configuration>
370381
</plugin>
371382
<plugin>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<configuration>
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<withJansi>true</withJansi>
4+
<encoder>
5+
<pattern>%cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - %msg%n</pattern>
6+
</encoder>
7+
</appender>
8+
9+
<root level="${ROOT_LOG_LEVEL:-info}">
10+
<appender-ref ref="STDOUT" />
11+
</root>
12+
13+
<!-- Enable debug logging for the entire com.cloudogu.gitops package -->
14+
<logger name="com.cloudogu.gitops" level="${APP_LOG_LEVEL:-debug}"/>
15+
16+
<!-- You can also enable debug for specific packages if needed -->
17+
<!-- <logger name="org.eclipse.jgit" level="debug"/> -->
18+
</configuration>

0 commit comments

Comments
 (0)