Standalone TCA with EELF Logger
[dcaegen2/analytics/tca-gen2.git] / eelf-logger / eelf-logger-logback-impl / src / main / resources / eelf-required-appenders.xml
1 <!--
2   ~ ================================================================================
3   ~ Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
4   ~ ================================================================================
5   ~ Licensed under the Apache License, Version 2.0 (the "License");
6   ~ you may not use this file except in compliance with the License.
7   ~ You may obtain a copy of the License at
8   ~
9   ~      http://www.apache.org/licenses/LICENSE-2.0
10   ~
11   ~ Unless required by applicable law or agreed to in writing, software
12   ~ distributed under the License is distributed on an "AS IS" BASIS,
13   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   ~ See the License for the specific language governing permissions and
15   ~ limitations under the License.
16   ~ ============LICENSE_END=========================================================
17   ~
18   -->
19
20 <included>
21
22     <!--
23      ============================= AUDIT LOG APPENDER ================================
24      -->
25     <appender name="auditLogAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
26
27         <filter class="org.onap.dcae.utils.eelf.logger.logback.filter.MarkerFilter">
28             <markers>AUDIT_LOG</markers>
29             <onMatch>ACCEPT</onMatch>
30             <onMismatch>DENY</onMismatch>
31         </filter>
32
33         <file>${logDirectory}/${auditLogName}.log</file>
34
35         <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
36             <fileNamePattern>${logDirectory}/${auditLogName}.%i.log.zip</fileNamePattern>
37             <minIndex>${minFileIndex}</minIndex>
38             <maxIndex>${maxFileIndex}</maxIndex>
39         </rollingPolicy>
40
41         <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
42             <maxFileSize>${maxFileSize}</maxFileSize>
43         </triggeringPolicy>
44
45         <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
46             <layout class="org.onap.dcae.utils.eelf.logger.logback.layout.AuditLogLayout"/>
47         </encoder>
48
49     </appender>
50
51
52     <!--
53      ============================= METRIC LOG APPENDER ================================
54      -->
55     <appender name="metricLogAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
56
57         <filter class="org.onap.dcae.utils.eelf.logger.logback.filter.MarkerFilter">
58             <markers>METRIC_LOG</markers>
59             <onMatch>ACCEPT</onMatch>
60             <onMismatch>DENY</onMismatch>
61         </filter>
62
63         <file>${logDirectory}/${metricLogName}.log</file>
64
65         <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
66             <fileNamePattern>${logDirectory}/${metricLogName}.%i.log.zip</fileNamePattern>
67             <minIndex>${minFileIndex}</minIndex>
68             <maxIndex>${maxFileIndex}</maxIndex>
69         </rollingPolicy>
70
71         <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
72             <maxFileSize>${maxFileSize}</maxFileSize>
73         </triggeringPolicy>
74
75         <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
76             <layout class="org.onap.dcae.utils.eelf.logger.logback.layout.MetricLogLayout"/>
77         </encoder>
78
79     </appender>
80
81
82     <!--
83      ============================= ERROR LOG APPENDER ================================
84     -->
85     <appender name="errorLogAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
86
87         <filter class="org.onap.dcae.utils.eelf.logger.logback.filter.MarkerFilter">
88             <markers>ERROR_LOG</markers>
89             <onMatch>ACCEPT</onMatch>
90             <onMismatch>DENY</onMismatch>
91         </filter>
92
93         <file>${logDirectory}/${errorLogName}.log</file>
94
95         <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
96             <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip</fileNamePattern>
97             <minIndex>${minFileIndex}</minIndex>
98             <maxIndex>${maxFileIndex}</maxIndex>
99         </rollingPolicy>
100
101         <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
102             <maxFileSize>${maxFileSize}</maxFileSize>
103         </triggeringPolicy>
104
105         <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
106             <layout class="org.onap.dcae.utils.eelf.logger.logback.layout.ErrorLogLayout"/>
107         </encoder>
108
109     </appender>
110
111
112 </included>