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 |
| 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 |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 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. |
| 16 | --> |
| 17 | <!DOCTYPE xml> |
| 18 | <configuration scan="true" scanPeriod="30 seconds" debug="true"> |
| 19 | <include resource="org/springframework/boot/logging/logback/base.xml" /> |
| 20 | |
| 21 | <property name="componentName" value="AAI-BAS" /> |
| 22 | <property name="logDirectory" value="/var/log/onap/${componentName}" /> |
| 23 | |
| 24 | <!-- default EELF log file names --> |
| 25 | <property name="generalLogName" value="error" /> |
| 26 | <property name="metricsLogName" value="metrics" /> |
| 27 | <property name="auditLogName" value="audit" /> |
| 28 | <property name="debugLogName" value="debug" /> |
| 29 | |
| 30 | <property name="errorLogPattern" |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame^] | 31 | 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 | |
| 33 | <property name="auditLogPattern" |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame^] | 34 | 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] | 35 | |
| 36 | <property name="metricsLogPattern" |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame^] | 37 | 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] | 38 | |
| 39 | <!-- ============================================================================ --> |
| 40 | <!-- EELF Appenders --> |
| 41 | <!-- ============================================================================ --> |
| 42 | |
| 43 | <appender name="EELF" |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame^] | 44 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 45 | <file>${logDirectory}/${generalLogName}.log</file> |
| 46 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 47 | <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip |
| 48 | </fileNamePattern> |
| 49 | <maxHistory>60</maxHistory> |
| 50 | </rollingPolicy> |
| 51 | <encoder> |
| 52 | <pattern>${errorLogPattern}</pattern> |
| 53 | </encoder> |
| 54 | </appender> |
| 55 | <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender"> |
| 56 | <!-- deny all events with a level below INFO, that is TRACE and DEBUG --> |
| 57 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 58 | <level>INFO</level> |
| 59 | </filter> |
| 60 | <queueSize>256</queueSize> |
| 61 | <appender-ref ref="EELF" /> |
| 62 | </appender> |
| 63 | |
| 64 | <!-- EELF Audit Appender. This appender is used to record audit engine related logging events. The audit logger and appender |
| 65 | are specializations of the EELF application root logger and appender. This can be used to segregate Policy engine events |
| 66 | from other components, or it can be eliminated to record these events as part of the application root log. --> |
| 67 | |
| 68 | <appender name="EELFAudit" |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame^] | 69 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 70 | <file>${logDirectory}/${auditLogName}.log</file> |
| 71 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 72 | <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip |
| 73 | </fileNamePattern> |
| 74 | <maxHistory>60</maxHistory> |
| 75 | </rollingPolicy> |
| 76 | <encoder> |
| 77 | <pattern>${auditLogPattern}</pattern> |
| 78 | </encoder> |
| 79 | </appender> |
| 80 | <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> |
| 81 | <queueSize>256</queueSize> |
| 82 | <appender-ref ref="EELFAudit" /> |
| 83 | </appender> |
| 84 | |
| 85 | <appender name="EELFMetrics" |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame^] | 86 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 87 | <file>${logDirectory}/${metricsLogName}.log</file> |
| 88 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 89 | <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip |
| 90 | </fileNamePattern> |
| 91 | <maxHistory>60</maxHistory> |
| 92 | </rollingPolicy> |
| 93 | <encoder> |
| 94 | <pattern>${metricsLogPattern}</pattern> |
| 95 | </encoder> |
| 96 | </appender> |
| 97 | |
| 98 | <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> |
| 99 | <queueSize>256</queueSize> |
| 100 | <appender-ref ref="EELFMetrics" /> |
| 101 | </appender> |
| 102 | |
| 103 | <appender name="EELFDebug" |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame^] | 104 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 105 | <file> |
| 106 | ${logDirectory}/${debugLogName}.log |
| 107 | </file> |
| 108 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 109 | <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip |
| 110 | </fileNamePattern> |
| 111 | <maxHistory>60</maxHistory> |
| 112 | </rollingPolicy> |
| 113 | <encoder> |
| 114 | <pattern>${errorLogPattern}</pattern> |
| 115 | </encoder> |
| 116 | </appender> |
| 117 | |
| 118 | <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> |
| 119 | <!-- allow only events with a level below INFO, that is TRACE and DEBUG --> |
| 120 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 121 | <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> |
guillaume.lambert | 30ec390 | 2021-09-14 12:32:24 +0200 | [diff] [blame^] | 122 | <expression> |
| 123 | e.level.toInt() < INFO.toInt() |
| 124 | </expression> |
Sylvain Desbureaux | 7007041 | 2020-11-09 21:58:48 +0100 | [diff] [blame] | 125 | </evaluator> |
| 126 | <OnMismatch>DENY</OnMismatch> |
| 127 | <OnMatch>NEUTRAL</OnMatch> |
| 128 | </filter> |
| 129 | <queueSize>256</queueSize> |
| 130 | <appender-ref ref="EELFDebug" /> |
| 131 | <includeCallerData>false</includeCallerData> |
| 132 | </appender> |
| 133 | |
| 134 | <!-- ============================================================================ --> |
| 135 | <!-- Default / root appenders --> |
| 136 | <!-- This determines the logging level for 3rd party code --> |
| 137 | <!-- ============================================================================ --> |
| 138 | |
| 139 | <root level="INFO"> |
| 140 | <appender-ref ref="asyncEELF" /> |
| 141 | <appender-ref ref="asyncEELFDebug" /> |
| 142 | </root> |
| 143 | |
| 144 | <!-- ============================================================================ --> |
| 145 | <!-- EELF loggers --> |
| 146 | <!-- ============================================================================ --> |
| 147 | |
| 148 | <logger name="com.att.eelf" level="INFO" additivity="false"> |
| 149 | <appender-ref ref="asyncEELF" /> |
| 150 | </logger> |
| 151 | |
| 152 | <!-- The level of this logger determines the contents of the debug log --> |
| 153 | <logger name="com.att.eelf.debug" level="INFO" additivity="false"> |
| 154 | <appender-ref ref="asyncEELFDebug" /> |
| 155 | </logger> |
| 156 | |
| 157 | <logger name="com.att.eelf.audit" level="INFO" additivity="false"> |
| 158 | <appender-ref ref="asyncEELFAudit" /> |
| 159 | </logger> |
| 160 | |
| 161 | <logger name="com.att.eelf.metrics" level="INFO" additivity="false"> |
| 162 | <appender-ref ref="asyncEELFMetrics" /> |
| 163 | </logger> |
| 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> |