forked from praekeltfoundation/puppet-marathon
-
Notifications
You must be signed in to change notification settings - Fork 1
/
logback.xml.erb
26 lines (23 loc) · 870 Bytes
/
logback.xml.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file><%= @log_file %></file>
<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern><%= @log_archive_pattern %></fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
</appender>
<% @log_levels.each do |key, level| -%>
<logger name="<%= key %>" level="<%= level %>"/>
<% end %>
<root level="<%= @log_level %>">
<appender-ref ref="FILE" />
</root>
</configuration>