Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | # Copyright © 2018 Amdocs, Bell Canada, AT&T |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 4 | # Modifications Copyright © 2021 Orange |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 5 | # |
| 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 Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 31 | <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 Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 32 | |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 33 | <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 Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 34 | |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 35 | <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 Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 36 | |
| 37 | <!-- ============================================================================ --> |
| 38 | <!-- EELF Appenders --> |
| 39 | <!-- ============================================================================ --> |
| 40 | |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 41 | <appender name="EELF" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 42 | <file>${logDirectory}/${generalLogName}.log</file> |
| 43 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 44 | <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 45 | <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 Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 64 | <appender name="EELFAudit" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 65 | <file>${logDirectory}/${auditLogName}.log</file> |
| 66 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 67 | <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 68 | <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 Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 79 | <appender name="EELFMetrics" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 80 | <file>${logDirectory}/${metricsLogName}.log</file> |
| 81 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 82 | <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 83 | <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 Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 95 | <appender name="EELFDebug" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 96 | <file>${logDirectory}/${debugLogName}.log</file> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 97 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 98 | <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip</fileNamePattern> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 99 | <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 Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 110 | <expression>e.level.toInt() < INFO.toInt()</expression> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 111 | </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 Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 120 | <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 Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 129 | <!-- ============================================================================ --> |
| 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 Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 136 | <appender-ref ref="asyncEELFDebug" /> |
| 137 | <appender-ref ref="AsyncSysOut" /> |
| 138 | </root> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 139 | |
| 140 | <!-- ============================================================================ --> |
| 141 | <!-- EELF loggers --> |
| 142 | <!-- ============================================================================ --> |
| 143 | |
| 144 | <logger name="com.att.eelf" level="INFO" additivity="false"> |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 145 | <appender-ref ref="asyncEELF" /> |
| 146 | <appender-ref ref="AsyncSysOut" /> |
| 147 | </logger> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 148 | |
| 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 Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 151 | <appender-ref ref="asyncEELFDebug" /> |
| 152 | <appender-ref ref="AsyncSysOut" /> |
| 153 | </logger> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 154 | |
| 155 | <logger name="com.att.eelf.audit" level="INFO" additivity="false"> |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 156 | <appender-ref ref="asyncEELFAudit" /> |
| 157 | <appender-ref ref="AsyncSysOut" /> |
| 158 | </logger> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 159 | |
| 160 | <logger name="com.att.eelf.metrics" level="INFO" additivity="false"> |
Sylvain Desbureaux | 1e99719 | 2021-02-28 14:59:22 +0100 | [diff] [blame^] | 161 | <appender-ref ref="asyncEELFMetrics" /> |
| 162 | <appender-ref ref="AsyncSysOut" /> |
| 163 | </logger> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 164 | |
| 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> |