Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
switching logback.xml to catalina.base
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew01ait committed Dec 18, 2014
1 parent 5a26aab commit 6d123e4
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 48 deletions.
45 changes: 22 additions & 23 deletions backmeup-worker-app-console/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration> <!-- configuration is extremely flexible - it is not possible to specify a DTD -->
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>backmeup-worker_%d{yyyy-MM-dd}.log</fileNamePattern>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<!-- <fileNamePattern>${catalina.home}/logs/backmeup-service_%d{yyyy-MM-dd}.log</fileNamePattern> -->
<fileNamePattern>${catalina.base}/logs/backmeup-service_%d{yyyy-MM-dd}.log</fileNamePattern>

<!-- keep 30 days' worth of history
<maxHistory>30</maxHistory>
-->
</rollingPolicy>
<!-- keep 30 days' worth of history <maxHistory>30</maxHistory>-->
</rollingPolicy>

<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<root level="info">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
<root level="info">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
47 changes: 23 additions & 24 deletions backmeup-worker-app-gui/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration> <!-- configuration is extremely flexible - it is not possible to specify a DTD -->
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>backmeup-worker_%d{yyyy-MM-dd}.log</fileNamePattern>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<!-- keep 30 days' worth of history
<maxHistory>30</maxHistory>
-->
</rollingPolicy>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<!-- <fileNamePattern>${catalina.home}/logs/backmeup-service_%d{yyyy-MM-dd}.log</fileNamePattern> -->
<fileNamePattern>${catalina.base}/logs/backmeup-service_%d{yyyy-MM-dd}.log</fileNamePattern>

<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<!-- keep 30 days' worth of history <maxHistory>30</maxHistory>-->
</rollingPolicy>

<root level="info">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<root level="info">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
2 changes: 1 addition & 1 deletion backmeup-worker-app-servlet/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${catalina.home}/logs/backmeup-worker_%d{yyyy-MM-dd}.log</fileNamePattern>
<fileNamePattern>${catalina.base}/logs/backmeup-worker_%d{yyyy-MM-dd}.log</fileNamePattern>

<!-- keep 30 days' worth of history
<maxHistory>30</maxHistory>
Expand Down

0 comments on commit 6d123e4

Please sign in to comment.