Skip to content

Commit

Permalink
For unit tests only std out logging, no files
Browse files Browse the repository at this point in the history
  • Loading branch information
EHJ-52n committed Dec 6, 2016
1 parent 8cf8e60 commit d542e33
Showing 1 changed file with 4 additions and 41 deletions.
45 changes: 4 additions & 41 deletions feeder/src/test/resources/logback.xml
@@ -1,48 +1,11 @@
<configuration scan="true" scanPeriod="30 seconds">

<!-- refer to http://logback.qos.ch/manual/appenders.html -->

<property name="logFile" value="logs/sos-importer-feeder" />

<!--
the following assumptions are made by the Adminstrator:
* The name of a file appender is FILE
* The name of a console appender is STDOUT
* The appender named FILE is of type ch.qos.logback.core.rolling.RollingFileAppender
and has a maxHistory and a timeBasedFileNamingAndTriggeringPolicy > maxFileSize
property
* All variables in the file property of the FILE appender are fully resolvable
by the properties defined in this file and the Java system properties.
Additional appenders can be defined freely.
-->

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logFile}.log</file>

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${logFile}/%d{yyyy-MM-dd}-%i.log</fileNamePattern>
<!-- keep ${config.logger.history.max} days' worth of history -->
<maxHistory>${config.logger.history.max}</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>${config.logger.maxFileSize}</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>%date %level [%thread] [%file:%line] %msg%n</pattern>
</encoder>
</appender>

<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0} - %msg%n</pattern>
</encoder>
</appender>

<logger name="org.n52" level="INFO" />

<root level="INFO">
<appender-ref ref="FILE" />
<!-- <appender-ref ref="STDOUT" /> -->
<logger name="org.n52" level="TRACE" />
<root level="TRACE">
<appender-ref ref="STDOUT" />
</root>
</configuration>

0 comments on commit d542e33

Please sign in to comment.