2 ============LICENSE_START==========================================
4 ===================================================================
5 Copyright (c) 2017 AT&T Intellectual Property
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
11 http://www.apache.org/licenses/LICENSE-2.0
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.
19 ============LICENSE_END=============================================
20 ====================================================================
22 <configuration scan="true" scanPeriod="3 seconds">
23 <!--<jmxConfigurator /> -->
24 <!-- directory path for all other type logs -->
25 <property name="logDir" value="/opt/app/music/logs" />
27 <!-- directory path for debugging type logs -->
28 <property name="debugDir" value="debug-logs" />
30 <!-- specify the component name -->
31 <!-- <property name="componentName" value="EELF"></property> -->
32 <property name="componentName" value="MUSIC"></property>
34 <!-- log file names -->
35 <property name="generalLogName" value="music" />
36 <property name="securityLogName" value="security" />
37 <property name="errorLogName" value="error" />
38 <property name="metricsLogName" value="metrics" />
39 <property name="auditLogName" value="audit" />
40 <property name="debugLogName" value="debug" />
41 <property name="defaultPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n" />
42 <property name="applicationLoggerPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %msg%n" />
43 <property name="auditLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%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{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" />
44 <property name="metricsLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%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{Unused}|%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" />
45 <property name="errorLoggerPattern" value= "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %msg%n " />
46 <property name="debugLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestId}| %msg%n" ></property>
47 <property name="logDirectory" value="${logDir}/${componentName}" />
48 <property name="debugLogDirectory" value="${debugDir}/${componentName}" />
49 <!-- Example evaluator filter applied against console appender -->
50 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
52 <pattern>${defaultPattern}</pattern>
56 %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
61 <!-- ============================================================================ -->
62 <!-- EELF Appenders -->
63 <!-- ============================================================================ -->
65 class="ch.qos.logback.core.rolling.RollingFileAppender">
66 <file>${logDirectory}/${generalLogName}.log</file>
68 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
69 <fileNamePattern>${logDirectory}/${generalLogName}.%i.log.zip
71 <minIndex>1</minIndex>
72 <maxIndex>9</maxIndex>
75 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
76 <maxFileSize>5MB</maxFileSize>
79 <pattern>${applicationLoggerPattern}</pattern>
83 <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
84 <queueSize>256</queueSize>
85 <includeCallerData>true</includeCallerData>
86 <appender-ref ref="EELF" />
89 <!-- EELF Security Appender. This appender is used to record security events
90 to the security log file. Security events are separate from other loggers
91 in EELF so that security log records can be captured and managed in a secure
92 way separate from the other logs. This appender is set to never discard any
94 <appender name="EELFSecurity"
95 class="ch.qos.logback.core.rolling.RollingFileAppender">
96 <file>${logDirectory}/${securityLogName}.log</file>
98 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
99 <fileNamePattern>${logDirectory}/${securityLogName}.%i.log.zip
101 <minIndex>1</minIndex>
102 <maxIndex>9</maxIndex>
105 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
106 <maxFileSize>5MB</maxFileSize>
109 <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n </pattern>
113 <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender">
114 <queueSize>256</queueSize>
115 <discardingThreshold>0</discardingThreshold>
116 <appender-ref ref="EELFSecurity" />
122 <!-- EELF Audit Appender. This appender is used to record audit engine
123 related logging events. The audit logger and appender are specializations
124 of the EELF application root logger and appender. This can be used to segregate
125 Policy engine events from other components, or it can be eliminated to record
126 these events as part of the application root log. -->
128 <appender name="EELFAudit"
129 class="ch.qos.logback.core.rolling.RollingFileAppender">
130 <file>${logDirectory}/${auditLogName}.log</file>
132 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
133 <fileNamePattern>${logDirectory}/${auditLogName}.%i.log.zip
135 <minIndex>1</minIndex>
136 <maxIndex>9</maxIndex>
139 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
140 <maxFileSize>5MB</maxFileSize>
143 <pattern>${auditLoggerPattern}</pattern>
146 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
147 <queueSize>256</queueSize>
148 <appender-ref ref="EELFAudit" />
151 <appender name="EELFMetrics"
152 class="ch.qos.logback.core.rolling.RollingFileAppender">
153 <file>${logDirectory}/${metricsLogName}.log</file>
155 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
156 <fileNamePattern>${logDirectory}/${metricsLogName}.%i.log.zip
158 <minIndex>1</minIndex>
159 <maxIndex>9</maxIndex>
162 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
163 <maxFileSize>5MB</maxFileSize>
166 <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} -
167 %msg%n"</pattern> -->
168 <pattern>${metricsLoggerPattern}</pattern>
173 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
174 <queueSize>256</queueSize>
175 <appender-ref ref="EELFMetrics"/>
178 <appender name="EELFError"
179 class="ch.qos.logback.core.rolling.RollingFileAppender">
180 <file>${logDirectory}/${errorLogName}.log</file>
182 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
183 <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip
185 <minIndex>1</minIndex>
186 <maxIndex>9</maxIndex>
189 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
190 <maxFileSize>5MB</maxFileSize>
193 <pattern>${errorLoggerPattern}</pattern>
197 <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
198 <queueSize>256</queueSize>
199 <appender-ref ref="EELFError"/>
202 <appender name="EELFDebug"
203 class="ch.qos.logback.core.rolling.RollingFileAppender">
204 <file>${debugLogDirectory}/${debugLogName}.log</file>
206 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
207 <fileNamePattern>${debugLogDirectory}/${debugLogName}.%i.log.zip
209 <minIndex>1</minIndex>
210 <maxIndex>9</maxIndex>
213 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
214 <maxFileSize>5MB</maxFileSize>
217 <pattern>${debugLoggerPattern}</pattern>
221 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
222 <queueSize>256</queueSize>
223 <appender-ref ref="EELFDebug" />
224 <includeCallerData>true</includeCallerData>
228 <!-- ============================================================================ -->
229 <!-- EELF loggers -->
230 <!-- ============================================================================ -->
231 <logger name="com.att.eelf" level="info" additivity="false">
232 <appender-ref ref="asyncEELF" />
235 <logger name="com.att.eelf.security" level="info" additivity="false">
236 <appender-ref ref="asyncEELFSecurity" />
241 <logger name="com.att.eelf.audit" level="info" additivity="false">
242 <appender-ref ref="asyncEELFAudit" />
246 <logger name="com.att.eelf.metrics" level="info" additivity="false">
247 <appender-ref ref="asyncEELFMetrics" />
252 <logger name="com.att.eelf.error" level="error" additivity="false">
253 <appender-ref ref="asyncEELFError" />
257 <logger name="com.att.eelf.debug" level="debug" additivity="false">
258 <appender-ref ref="asyncEELFDebug" />
263 <appender-ref ref="asyncEELF" />
264 <appender-ref ref="STDOUT" />
267 <!-- Conductor Specific additions to squash WARNING and INFO -->
268 <logger name="com.datastax.driver.core.Cluster" level="ERROR"/>
269 <logger name="org.onap.music.main.MusicCore" level="ERROR"/>