Skip to content

Commit

Permalink
Logback needs to be configured with XML now
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoellnitz committed Sep 25, 2022
1 parent 84d5283 commit 0321dd7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 47 deletions.
47 changes: 0 additions & 47 deletions src/test/resources/logback.groovy

This file was deleted.

53 changes: 53 additions & 0 deletions src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2022 Martin Goellnitz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!DOCTYPE configuration>
<configuration>

<import class="ch.qos.logback.core.ConsoleAppender"/>
<import class="ch.qos.logback.core.FileAppender"/>
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>

<variable name="LOG_PATTERN" value="%-5level %logger{35}.%msg%n"/>

<appender name="CONSOLE" class="ConsoleAppender">
<encoder class="PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>

<appender name="FILE" class="FileAppender">
<file>build/dinistiq-test.log</file>
<append>false</append>
<encoder class="PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>

<logger name="dinistiq" level="DEBUG">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</logger>

<root level="WARN">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>

</configuration>

0 comments on commit 0321dd7

Please sign in to comment.