Skip to content

Commit

Permalink
logging config for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pgalbraith committed Sep 29, 2018
1 parent d1dd1da commit 8f35958
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE XML>
<configuration>
<property name="LOG_HOME" value="target/test-logs" />
<property name="LOG_FILE_NAME" value="/crawler4j.log" />

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

<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${LOG_HOME}/${LOG_FILE_NAME}</file>
<append>false</append>
<encoder>
<pattern>%date %-5level [%thread] - [%logger] - %msg%n</pattern>
</encoder>
</appender>

<logger name="com.github.tomakehurst" level="ERROR"/>
<logger name="org.apache.http" level="WARN" />
<logger name="org.eclipse.jetty" level="ERROR" />

<root level="DEBUG">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>

0 comments on commit 8f35958

Please sign in to comment.