Skip to content

Commit

Permalink
Redirect test output to file to reduce build log noise
Browse files Browse the repository at this point in the history
  • Loading branch information
maallen authored and aurambaj committed Dec 8, 2022
1 parent a3c12f3 commit 2129219
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@
<argLine>-Dspring.config.additional-location=optional:file:https://${user.home}/.l10n/config/cli/
-Dspring.profiles.active=${user.name},test -Xmx1024m
</argLine>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
</configuration>
</plugin>

Expand Down
2 changes: 2 additions & 0 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@
<argLine>-Dspring.config.additional-location=optional:file:https://${user.home}/.l10n/config/common/
-Dspring.profiles.active=${user.name},test -Duser.timezone=UTC
</argLine>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
</configuration>
</plugin>
</plugins>
Expand Down
16 changes: 16 additions & 0 deletions common/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<include resource="org/springframework/boot/logging/logback/base.xml"/>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%msg%n</pattern>
</encoder>
</appender>

<logger name="com.box.l10n.mojito.common" level="INFO" >
<appender-ref ref="STDOUT"/>
</logger>


</configuration>
2 changes: 2 additions & 0 deletions restclient/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
<argLine>-Dspring.config.additional-location=optional:file:https://${user.home}/.l10n/config/restclient/
-Dspring.profiles.active=${user.name},test -Xmx1024m
</argLine>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
</configuration>
</plugin>
</plugins>
Expand Down
16 changes: 16 additions & 0 deletions restclient/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<include resource="org/springframework/boot/logging/logback/base.xml"/>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%msg%n</pattern>
</encoder>
</appender>

<logger name="com.box.l10n.mojito.restclient" level="INFO" >
<appender-ref ref="STDOUT"/>
</logger>


</configuration>
3 changes: 2 additions & 1 deletion webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
<argLine>-Dspring.config.additional-location=optional:file:https://${user.home}/.l10n/config/webapp/
-Dspring.profiles.active=${user.name},test -Xmx1024m -Duser.timezone=UTC
</argLine>

<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
<rerunFailingTestsCount>1</rerunFailingTestsCount>

<!--<excludedGroups>com.box.l10n.mojito.test.category.BoxSDKTest</excludedGroups>-->
Expand Down
16 changes: 16 additions & 0 deletions webapp/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<include resource="org/springframework/boot/logging/logback/base.xml"/>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%msg%n</pattern>
</encoder>
</appender>

<logger name="com.box.l10n.mojito.webapp" level="INFO" >
<appender-ref ref="STDOUT"/>
</logger>


</configuration>

0 comments on commit 2129219

Please sign in to comment.