Viz: use separate log config file

This commit is contained in:
2019-01-24 22:59:59 -08:00
parent ef446acc1b
commit 3a15cfeb3d
2 changed files with 33 additions and 1 deletions

View File

@ -43,8 +43,9 @@ run {
}
task runViz(type: JavaExec) {
description = "Run the visualizer log processor"
dependsOn classes
systemProperty 'logback.configurationFile', 'src/main/resources/logback.xml'
systemProperty 'logback.configurationFile', 'src/main/resources/logback-viz.xml'
classpath sourceSets.main.runtimeClasspath
main = 'Viz'
}

View File

@ -0,0 +1,31 @@
<configuration>
<logger name="com.espertech.esper" level="WARN" />
<logger name="org.thymeleaf" level="WARN" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- On Windows machines setting withJansi to true enables ANSI
color code interpretation by the Jansi library. This requires
org.fusesource.jansi:jansi:1.8 on the class path. Note that
Unix-based operating systems such as Linux and Mac OS X
support ANSI color codes by default. -->
<withJansi>true</withJansi>
<encoder>
<pattern>%highlight(%-5level) %cyan(%logger{15}) - %msg %n</pattern>
</encoder>
</appender>
<!-- The primary log file. For all runtime messages. -->
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>logs/viz-converter.log</file>
<append>false</append>
<encoder>
<pattern>%date %-5level %logger{35}: %msg%n</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>