blob: 125731cf6efbc08d9e077fe9ebd1357c7ee55962 [file] [log] [blame]
Sylvain Desbureaux70070412020-11-09 21:58:48 +01001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3# Copyright © 2018 Amdocs, Bell Canada, AT&T
Sylvain Desbureaux1e997192021-02-28 14:59:22 +01004# Modifications Copyright © 2021 Orange
Sylvain Desbureaux70070412020-11-09 21:58:48 +01005#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17-->
18<!DOCTYPE xml>
19<configuration scan="true" scanPeriod="30 seconds" debug="true">
20 <include resource="org/springframework/boot/logging/logback/base.xml" />
21
22 <property name="componentName" value="AAI-BAS" />
23 <property name="logDirectory" value="/var/log/onap/${componentName}" />
24
25 <!-- default EELF log file names -->
26 <property name="generalLogName" value="error" />
27 <property name="metricsLogName" value="metrics" />
28 <property name="auditLogName" value="audit" />
29 <property name="debugLogName" value="debug" />
30
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010031 <property name="errorLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{RequestId}|%thread|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{TargetEntity}|%mdc{TargetServiceName}|%.-5level|%logger|%mdc{ClassName}|%msg%n" />
Sylvain Desbureaux70070412020-11-09 21:58:48 +010032
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010033 <property name="auditLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{BeginTimestamp}|%mdc{EndTimestamp}|%mdc{RequestId}|%mdc{ServiceInstanceId}|%thread|%mdc{ServerFQDN}|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{StatusCode}|%mdc{ResponseCode}|%mdc{ResponseDescription}|%logger|%.-5level|||%mdc{ElapsedTime}|%mdc{RemoteHost}|%mdc{ClientAddress}|%mdc{ClassName}|||%msg%n" />
Sylvain Desbureaux70070412020-11-09 21:58:48 +010034
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010035 <property name="metricsLogPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{BeginTimestamp}|%mdc{EndTimestamp}|%mdc{RequestId}|%mdc{ServiceInstanceId}|%thread|%mdc{ServerFQDN}|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{TargetEntity}|%mdc{TargetServiceName}|%mdc{StatusCode}|%mdc{ResponseCode}|%mdc{ResponseDescription}|%logger|%.-5level|||%mdc{ElapsedTime}|%mdc{RemoteHost}|%mdc{ClientAddress}|%mdc{ClassName}|||%msg%n" />
Sylvain Desbureaux70070412020-11-09 21:58:48 +010036
37 <!-- ============================================================================ -->
38 <!-- EELF Appenders -->
39 <!-- ============================================================================ -->
40
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010041 <appender name="EELF" class="ch.qos.logback.core.rolling.RollingFileAppender">
Sylvain Desbureaux70070412020-11-09 21:58:48 +010042 <file>${logDirectory}/${generalLogName}.log</file>
43 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010044 <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
Sylvain Desbureaux70070412020-11-09 21:58:48 +010045 <maxHistory>60</maxHistory>
46 </rollingPolicy>
47 <encoder>
48 <pattern>${errorLogPattern}</pattern>
49 </encoder>
50 </appender>
51 <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
52 <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
53 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
54 <level>INFO</level>
55 </filter>
56 <queueSize>256</queueSize>
57 <appender-ref ref="EELF" />
58 </appender>
59
60 <!-- EELF Audit Appender. This appender is used to record audit engine related logging events. The audit logger and appender
61 are specializations of the EELF application root logger and appender. This can be used to segregate Policy engine events
62 from other components, or it can be eliminated to record these events as part of the application root log. -->
63
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010064 <appender name="EELFAudit" class="ch.qos.logback.core.rolling.RollingFileAppender">
Sylvain Desbureaux70070412020-11-09 21:58:48 +010065 <file>${logDirectory}/${auditLogName}.log</file>
66 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010067 <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
Sylvain Desbureaux70070412020-11-09 21:58:48 +010068 <maxHistory>60</maxHistory>
69 </rollingPolicy>
70 <encoder>
71 <pattern>${auditLogPattern}</pattern>
72 </encoder>
73 </appender>
74 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
75 <queueSize>256</queueSize>
76 <appender-ref ref="EELFAudit" />
77 </appender>
78
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010079 <appender name="EELFMetrics" class="ch.qos.logback.core.rolling.RollingFileAppender">
Sylvain Desbureaux70070412020-11-09 21:58:48 +010080 <file>${logDirectory}/${metricsLogName}.log</file>
81 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010082 <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
Sylvain Desbureaux70070412020-11-09 21:58:48 +010083 <maxHistory>60</maxHistory>
84 </rollingPolicy>
85 <encoder>
86 <pattern>${metricsLogPattern}</pattern>
87 </encoder>
88 </appender>
89
90 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
91 <queueSize>256</queueSize>
92 <appender-ref ref="EELFMetrics" />
93 </appender>
94
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010095 <appender name="EELFDebug" class="ch.qos.logback.core.rolling.RollingFileAppender">
96 <file>${logDirectory}/${debugLogName}.log</file>
Sylvain Desbureaux70070412020-11-09 21:58:48 +010097 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
Sylvain Desbureaux1e997192021-02-28 14:59:22 +010098 <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
Sylvain Desbureaux70070412020-11-09 21:58:48 +010099 <maxHistory>60</maxHistory>
100 </rollingPolicy>
101 <encoder>
102 <pattern>${errorLogPattern}</pattern>
103 </encoder>
104 </appender>
105
106 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
107 <!-- allow only events with a level below INFO, that is TRACE and DEBUG -->
108 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
109 <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
Sylvain Desbureaux1e997192021-02-28 14:59:22 +0100110 <expression>e.level.toInt() &lt; INFO.toInt()</expression>
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100111 </evaluator>
112 <OnMismatch>DENY</OnMismatch>
113 <OnMatch>NEUTRAL</OnMatch>
114 </filter>
115 <queueSize>256</queueSize>
116 <appender-ref ref="EELFDebug" />
117 <includeCallerData>false</includeCallerData>
118 </appender>
119
Sylvain Desbureaux1e997192021-02-28 14:59:22 +0100120 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
121 <encoder>
122 <pattern>${errorLogPattern}</pattern>
123 </encoder>
124 </appender>
125 <appender name="AsyncSysOut" class="ch.qos.logback.classic.AsyncAppender">
126 <appender-ref ref="STDOUT" />
127 </appender>
128
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100129 <!-- ============================================================================ -->
130 <!-- Default / root appenders -->
131 <!-- This determines the logging level for 3rd party code -->
132 <!-- ============================================================================ -->
133
134 <root level="INFO">
135 <appender-ref ref="asyncEELF" />
Sylvain Desbureaux1e997192021-02-28 14:59:22 +0100136 <appender-ref ref="asyncEELFDebug" />
137 <appender-ref ref="AsyncSysOut" />
138 </root>
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100139
140 <!-- ============================================================================ -->
141 <!-- EELF loggers -->
142 <!-- ============================================================================ -->
143
144 <logger name="com.att.eelf" level="INFO" additivity="false">
Sylvain Desbureaux1e997192021-02-28 14:59:22 +0100145 <appender-ref ref="asyncEELF" />
146 <appender-ref ref="AsyncSysOut" />
147 </logger>
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100148
149 <!-- The level of this logger determines the contents of the debug log -->
150 <logger name="com.att.eelf.debug" level="INFO" additivity="false">
Sylvain Desbureaux1e997192021-02-28 14:59:22 +0100151 <appender-ref ref="asyncEELFDebug" />
152 <appender-ref ref="AsyncSysOut" />
153 </logger>
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100154
155 <logger name="com.att.eelf.audit" level="INFO" additivity="false">
Sylvain Desbureaux1e997192021-02-28 14:59:22 +0100156 <appender-ref ref="asyncEELFAudit" />
157 <appender-ref ref="AsyncSysOut" />
158 </logger>
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100159
160 <logger name="com.att.eelf.metrics" level="INFO" additivity="false">
Sylvain Desbureaux1e997192021-02-28 14:59:22 +0100161 <appender-ref ref="asyncEELFMetrics" />
162 <appender-ref ref="AsyncSysOut" />
163 </logger>
Sylvain Desbureaux70070412020-11-09 21:58:48 +0100164
165 <!-- ============================================================================ -->
166 <!-- Non-EELF loggers -->
167 <!-- ============================================================================ -->
168
169 <!-- ATT packages including DMAAP message routing -->
170 <logger name="com.att" level="INFO" />
171
172 <!-- Spring related loggers -->
173 <logger name="org.springframework" level="WARN" />
174 <logger name="org.springframework.beans" level="WARN" />
175 <logger name="org.springframework.web" level="WARN" />
176
177 <!-- Other Loggers that may help troubleshoot -->
178 <logger name="org.apache" level="WARN" />
179 <logger name="org.apache.commons" level="WARN" />
180
181 <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. May aid in troubleshooting) -->
182 <logger name="org.apache.camel" level="WARN" />
183 <logger name="org.apache.cxf" level="WARN" />
184 <logger name="org.apache.camel.processor.interceptor" level="WARN" />
185 <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
186 <logger name="org.apache.cxf.service" level="WARN" />
187 <logger name="org.restlet" level="WARN" />
188 <logger name="org.apache.camel.component.restlet" level="WARN" />
189
190 <!-- logback internals logging -->
191 <logger name="ch.qos.logback.classic" level="WARN" />
192 <logger name="ch.qos.logback.core" level="WARN" />
193
194</configuration>