Skip to content

Commit ce1b8b2

Browse files
committed
logback-test.xml: don't output messages into the $TMPDIR/spring.log file.
In test profile showing logs on the console is enough. Fix #531
1 parent 54152eb commit ce1b8b2

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/test/resources/logback-test.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,23 @@
44
<!--
55
See for details:
66
http://docs.spring.io/spring-boot/docs/1.4.x/reference/html/howto-logging.html#howto-configure-logback-for-logging
7+
https://github.com/spring-projects/spring-boot/blob/v1.4.3.RELEASE/spring-boot/src/main/resources/org/springframework/boot/logging/logback/base.xml
78
-->
8-
<include resource="org/springframework/boot/logging/logback/base.xml"/>
9+
10+
<!--
11+
Here, instead of including org/springframework/boot/logging/logback/base.xml we're copying&pasting its content.
12+
This allows us to commenting out part of the configuration that outputs logs to a log file.
13+
-->
14+
<!-- Begin of org/springframework/boot/logging/logback/base.xml content -->
15+
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
16+
<!--<property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/spring.log}"/>-->
17+
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
18+
<!--<include resource="org/springframework/boot/logging/logback/file-appender.xml" />-->
19+
<root level="INFO">
20+
<appender-ref ref="CONSOLE" />
21+
<!--<appender-ref ref="FILE" />-->
22+
</root>
23+
<!-- End of org/springframework/boot/logging/logback/base.xml content -->
924

1025
<!-- HtmlUnit classes -->
1126
<logger name="com.gargoylesoftware.htmlunit.html.InputElementFactory" level="WARN">

0 commit comments

Comments
 (0)