Skip to content

Commit

Permalink
remove spring test custom conf in logback-test.xml, springboot3 is mu…
Browse files Browse the repository at this point in the history
…ch more reasonable with its logs (#109)

Add comments for why we still have this file
  • Loading branch information
jonenst authored Oct 19, 2023
1 parent 66e5010 commit 4a8f5fd
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<configuration>
<!-- configure nicer logs for tests
spring boot default format:
2023-10-19T12:33:32.067+02:00 INFO 950066 - - - [ main] o.s.b.t.m.w.SpringBootMockServletContext : Initializing Spring TestDispatcherServlet ''
this conf format:
12:49:58.755 [main] INFO org.springframework.boot.test.mock.web.SpringBootMockServletContext - Initializing Spring TestDispatcherServlet ''
I guess they chose a very tabular format and show dates and PID because for
log files on servers it's useful, but not so for tests.. also the format
changes midtest when springboot configures the loggers so it's not coherent
TODO: is there a better way to do this ? Or should sprinboot test do this themselves??
-->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n
Expand All @@ -8,8 +21,4 @@
<root level="info">
<appender-ref ref="STDOUT"/>
</root>

<logger name="org.springframework.test" level="warn"/>
<logger name="org.springframework.boot.test" level="warn"/>

</configuration>

0 comments on commit 4a8f5fd

Please sign in to comment.