blob: f42956287434fa4a573541b8164998b75b10c260 [file] [log] [blame]
Jorge Hernandez9e69cc22017-06-26 08:05:30 -05001<!--
2 ============LICENSE_START=======================================================
3 feature-eelf
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ============LICENSE_END=========================================================
19 -->
20
21<configuration scan="true" scanPeriod="30 seconds" debug="false">
22
23 <property name="errorLogName" value="error" />
24 <property name="metricsLogName" value="metrics" />
25 <property name="auditLogName" value="audit" />
26 <property name="debugLogName" value="debug" />
27 <property name="networkLogName" value="network" />
28
29 <property name="defaultPattern"
30 value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
31 <property name="defaultMetricPattern"
32 value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
33 <property name="defaultAuditPattern"
34 value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
35 <property name="defaultErrorPattern"
36 value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDesciption}|%msg%n" />
37 <property name="networkPattern" value="[%d|%t]%m%n" />
38 <property name="debugPattern" value="[%date|%level|%logger{0}|%thread] %msg%n" />
39
40 <property name="logDirectory" value="logs/Policy" />
41 <property name="debugLogDirectory" value="logs/Policy" />
42
43 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
44 <encoder>
45 <pattern>${defaultPattern}</pattern>
46 </encoder>
47 </appender>
48
49 <appender name="EELFAudit"
50 class="ch.qos.logback.core.rolling.RollingFileAppender">
51 <file>${logDirectory}/${auditLogName}.log</file>
52 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
53 <fileNamePattern>${logDirectory}/${auditLogName}.%i.log.zip
54 </fileNamePattern>
55 <minIndex>1</minIndex>
56 <maxIndex>5</maxIndex>
57 </rollingPolicy>
58 <triggeringPolicy
59 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
60 <maxFileSize>10MB</maxFileSize>
61 </triggeringPolicy>
62 <encoder>
63 <pattern>${defaultAuditPattern}</pattern>
64 </encoder>
65 </appender>
66
67 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
68 <appender-ref ref="EELFAudit" />
69 </appender>
70
71 <appender name="EELFMetrics"
72 class="ch.qos.logback.core.rolling.RollingFileAppender">
73 <file>${logDirectory}/${metricsLogName}.log</file>
74 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
75 <fileNamePattern>${logDirectory}/${metricsLogName}.%i.log.zip
76 </fileNamePattern>
77 <minIndex>1</minIndex>
78 <maxIndex>5</maxIndex>
79 </rollingPolicy>
80 <triggeringPolicy
81 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
82 <maxFileSize>15MB</maxFileSize>
83 </triggeringPolicy>
84 <encoder>
85 <pattern>${defaultMetricPattern}</pattern>
86 </encoder>
87 </appender>
88
89
90 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
91 <appender-ref ref="EELFMetrics" />
92 </appender>
93
94 <appender name="EELFError"
95 class="ch.qos.logback.core.rolling.RollingFileAppender">
96 <file>${logDirectory}/${errorLogName}.log</file>
97 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
98 <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip
99 </fileNamePattern>
100 <minIndex>1</minIndex>
101 <maxIndex>5</maxIndex>
102 </rollingPolicy>
103 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
104 <level>ERROR</level>
105 </filter>
106 <triggeringPolicy
107 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
108 <maxFileSize>20MB</maxFileSize>
109 </triggeringPolicy>
110 <encoder>
111 <pattern>${defaultErrorPattern}</pattern>
112 </encoder>
113 </appender>
114
115 <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
116 <appender-ref ref="EELFError" />
117 </appender>
118
119 <appender name="EELFDebug"
120 class="ch.qos.logback.core.rolling.RollingFileAppender">
121 <file>${debugLogDirectory}/${debugLogName}.log</file>
122 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
123 <fileNamePattern>${debugLogDirectory}/${debugLogName}.%i.log.zip
124 </fileNamePattern>
125 <minIndex>1</minIndex>
126 <maxIndex>5</maxIndex>
127 </rollingPolicy>
128 <triggeringPolicy
129 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
130 <maxFileSize>20MB</maxFileSize>
131 </triggeringPolicy>
132 <encoder>
133 <pattern>${debugPattern}</pattern>
134 </encoder>
135 </appender>
136
137 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
138 <appender-ref ref="EELFDebug" />
139 </appender>
140
141 <appender name="NetworkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
142 <file>${logDirectory}/${networkLogName}.log</file>
143 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
144 <fileNamePattern>logs/network.log.%i.zip</fileNamePattern>
145 <minIndex>1</minIndex>
146 <maxIndex>5</maxIndex>
147 </rollingPolicy>
148 <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
149 <maxFileSize>15MB</maxFileSize>
150 </triggeringPolicy>
151 <encoder>
152 <pattern>${networkPattern}</pattern>
153 </encoder>
154 </appender>
155
156 <appender name="AsyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
157 <appender-ref ref="NetworkOut" />
158 </appender>
159
160 <logger name="com.att.eelf.audit" level="info" additivity="false">
161 <appender-ref ref="asyncEELFAudit" />
162 </logger>
163
164 <logger name="com.att.eelf.metrics" level="info" additivity="false">
165 <appender-ref ref="asyncEELFMetrics" />
166 </logger>
167
168 <logger name="com.att.eelf.error" level="error" additivity="false">
169 <appender-ref ref="asyncEELFError" />
170 </logger>
171
172 <logger name="com.att.eelf.debug" level="info" additivity="false">
173 <appender-ref ref="asyncEELFDebug" />
174 </logger>
175
176 <logger name="network" level="INFO" additivity="false">
177 <appender-ref ref="AsyncNetworkOut" />
178 </logger>
179
180 <root level="INFO">
181 <appender-ref ref="asyncEELFDebug" />
182 <appender-ref ref="asyncEELFError" />
183 </root>
184
185</configuration>