2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2019 Nordix Foundation.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
20 <configuration scan="true" scanPeriod="3 seconds" debug="false">
22 <property name="logDir" value="logs/EELF" />
23 <!-- log file names -->
24 <property name="auditLog" value="audit" />
25 <property name="errorLog" value="error" />
26 <property name="debugLog" value="debug" />
27 <property name="metricsLog" value="metrics" />
28 <property name="jettyLog" value="jetty" />
30 <!-- log file names -->
31 <property name="defaultPattern" value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{InvocationId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}%n|%msg%n" />
32 <property name="logDirectory" value="${logDir}" />
35 <!-- Example evaluator filter applied against console appender -->
36 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
38 <pattern>${defaultPattern}</pattern>
42 <!-- ============================================================================ -->
43 <!-- EELF Appenders -->
44 <!-- ============================================================================ -->
46 <!-- The EELFAppender is used to record events to the general application
50 <appender name="Audit"
51 class="ch.qos.logback.core.rolling.RollingFileAppender">
52 <file>${logDirectory}/${auditLog}.log</file>
53 <filter class="org.onap.dmaap.datarouter.node.eelf.AuditFilter">
56 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
57 <fileNamePattern>${logDirectory}/${auditLog}.%i.log.zip
59 <minIndex>1</minIndex>
60 <maxIndex>9</maxIndex>
63 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
64 <maxFileSize>50MB</maxFileSize>
67 <pattern>${defaultPattern}</pattern>
71 <appender name="asyncAudit" class="ch.qos.logback.classic.AsyncAppender">
72 <queueSize>256</queueSize>
73 <appender-ref ref="Audit" />
76 <!-- ============================================================================ -->
78 <appender name="Metrics"
79 class="ch.qos.logback.core.rolling.RollingFileAppender">
80 <file>${logDirectory}/${metricsLog}.log</file>
81 <filter class="org.onap.dmaap.datarouter.node.eelf.MetricsFilter">
84 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
85 <fileNamePattern>${logDirectory}/${metricsLog}.%i.log.zip
87 <minIndex>1</minIndex>
88 <maxIndex>9</maxIndex>
91 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
92 <maxFileSize>50MB</maxFileSize>
95 <pattern>${defaultPattern}</pattern>
99 <appender name="asyncMetrics" class="ch.qos.logback.classic.AsyncAppender">
100 <queueSize>256</queueSize>
101 <appender-ref ref="Metrics" />
104 <!-- ============================================================================ -->
107 <appender name="Debug"
108 class="ch.qos.logback.core.rolling.RollingFileAppender">
109 <file>${logDirectory}/${debugLog}.log</file>
110 <filter class="org.onap.dmaap.datarouter.node.eelf.DebugFilter">
113 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
114 <fileNamePattern>${logDirectory}/${debugLog}.%i.log.zip
116 <minIndex>1</minIndex>
117 <maxIndex>9</maxIndex>
120 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
121 <maxFileSize>50MB</maxFileSize>
124 <pattern>${defaultPattern}</pattern>
128 <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender">
129 <queueSize>256</queueSize>
130 <appender-ref ref="Debug" />
133 <!-- ============================================================================ -->
135 <appender name="Error"
136 class="ch.qos.logback.core.rolling.RollingFileAppender">
137 <file>${logDirectory}/${errorLog}.log</file>
138 <filter class="org.onap.dmaap.datarouter.node.eelf.ErrorFilter">
141 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
142 <fileNamePattern>${logDirectory}/${errorLog}.%i.log.zip
144 <minIndex>1</minIndex>
145 <maxIndex>9</maxIndex>
148 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
149 <maxFileSize>50MB</maxFileSize>
152 <pattern>${defaultPattern}</pattern>
156 <appender name="asyncError" class="ch.qos.logback.classic.AsyncAppender">
157 <queueSize>256</queueSize>
158 <appender-ref ref="Error"/>
161 <!-- ============================================================================ -->
162 <appender name="Jetty"
163 class="ch.qos.logback.core.rolling.RollingFileAppender">
164 <file>${logDirectory}/${jettyLog}.log</file>
165 <filter class="org.onap.dmaap.datarouter.node.eelf.JettyFilter" />
167 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
168 <fileNamePattern>${logDirectory}/${jettyLog}.%i.log.zip
170 <minIndex>1</minIndex>
171 <maxIndex>9</maxIndex>
174 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
175 <maxFileSize>50MB</maxFileSize>
178 <pattern>${defaultPattern}</pattern>
182 <appender name="asyncJettyLog" class="ch.qos.logback.classic.AsyncAppender">
183 <queueSize>256</queueSize>
184 <appender-ref ref="Jetty" />
185 <includeCallerData>true</includeCallerData>
188 <!-- ============================================================================ -->
191 <!-- ============================================================================ -->
192 <!-- EELF loggers -->
193 <!-- ============================================================================ -->
194 <logger name="com.att.eelf" level="info" additivity="false">
195 <appender-ref ref="asyncAudit" />
198 <logger name="com.att.eelf" additivity="false">
199 <appender-ref ref="asyncMetrics" />
202 <logger name="com.att.eelf" additivity="false">
203 <appender-ref ref="asyncDebug" />
206 <logger name="com.att.eelf.error" additivity="false">
207 <appender-ref ref="asyncError" />
210 <logger name="log4j.logger.org.eclipse.jetty" additivity="false">
211 <appender-ref ref="asyncJettyLog"/>
218 <appender-ref ref="asyncAudit" />
219 <appender-ref ref="asyncMetrics" />
220 <appender-ref ref="asyncDebug" />
221 <appender-ref ref="asyncError" />
222 <appender-ref ref="asyncJettyLog" />