Tschaen, Brendan | 08d7b63 | 2020-04-02 19:49:13 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | ============LICENSE_START========================================== |
| 4 | org.onap.music |
| 5 | =================================================================== |
| 6 | Copyright (c) 2017 AT&T Intellectual Property |
| 7 | =================================================================== |
| 8 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | you may not use this file except in compliance with the License. |
| 10 | You may obtain a copy of the License at |
| 11 | |
| 12 | http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | |
| 14 | Unless required by applicable law or agreed to in writing, software |
| 15 | distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | See the License for the specific language governing permissions and |
| 18 | limitations under the License. |
| 19 | |
| 20 | ============LICENSE_END============================================= |
| 21 | ==================================================================== |
| 22 | --> |
| 23 | |
| 24 | <configuration scan="true" scanPeriod="3 seconds"> |
| 25 | <!--<jmxConfigurator /> --> |
| 26 | <!-- directory path for all other type logs --> |
| 27 | <property name="logDir" value="/opt/app/music/logs" /> |
| 28 | |
| 29 | <!-- directory path for debugging type logs --> |
| 30 | <property name="debugDir" value="debug-logs" /> |
| 31 | |
| 32 | <!-- specify the component name --> |
| 33 | <!-- <property name="componentName" value="EELF"></property> --> |
| 34 | <property name="componentName" value="MUSIC"></property> |
| 35 | |
| 36 | <!-- log file names --> |
| 37 | <property name="generalLogName" value="music" /> |
| 38 | <property name="securityLogName" value="security" /> |
| 39 | <property name="errorLogName" value="error" /> |
| 40 | <property name="metricsLogName" value="metrics" /> |
| 41 | <property name="auditLogName" value="audit" /> |
| 42 | <property name="debugLogName" value="debug" /> |
| 43 | <property name="defaultPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n" /> |
| 44 | <!-- <property name="applicationLoggerPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %msg%n" /> --> |
| 45 | <property name="applicationLoggerPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5level %X{keyspace} [transactionId:%X{transactionId}] - %msg%n" /> |
| 46 | <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" /> |
| 47 | <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" /> |
| 48 | <!-- <property name="errorLoggerPattern" value= "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %msg%n " /> --> |
| 49 | <property name="errorLoggerPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5level %X{keyspace} - %msg%n" /> |
| 50 | <property name="debugLoggerPattern" value="%date{ISO8601,UTC}|%X{RequestId}| %msg%n" ></property> |
| 51 | <property name="logDirectory" value="${logDir}/${componentName}" /> |
| 52 | <property name="debugLogDirectory" value="${debugDir}/${componentName}" /> |
| 53 | <!-- Example evaluator filter applied against console appender --> |
| 54 | <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
| 55 | <!-- <encoder> |
| 56 | <pattern>${defaultPattern}</pattern> |
| 57 | </encoder> --> |
| 58 | <!-- <filter class="org.onap.music.eelf.logging.CustomLoggingFilter" />--> |
| 59 | <encoder> |
| 60 | <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %X{keyspace} %msg%n</pattern> |
| 61 | </encoder> |
| 62 | </appender> |
| 63 | |
| 64 | <!-- ============================================================================ --> |
| 65 | <!-- EELF Appenders --> |
| 66 | <!-- ============================================================================ --> |
| 67 | |
| 68 | <appender name="EELF" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 69 | <file>${logDirectory}/${generalLogName}.log</file> |
| 70 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 71 | <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
| 72 | <maxFileSize>1GB</maxFileSize> |
| 73 | <maxHistory>5</maxHistory> |
| 74 | <totalSizeCap>5GB</totalSizeCap> |
| 75 | </rollingPolicy> |
| 76 | <encoder> |
| 77 | <pattern>${applicationLoggerPattern}</pattern> |
| 78 | </encoder> |
| 79 | </appender> |
| 80 | |
| 81 | <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender"> |
| 82 | <queueSize>256</queueSize> |
| 83 | <includeCallerData>true</includeCallerData> |
| 84 | <appender-ref ref="EELF" /> |
| 85 | </appender> |
| 86 | |
| 87 | <!-- Sift Appender --> |
| 88 | <appender name="KSEELF" class="ch.qos.logback.classic.sift.SiftingAppender"> |
| 89 | <!-- <discriminator class="org.onap.music.eelf.logging.AuxDiscriminator"> --> |
| 90 | <discriminator> |
| 91 | <key>keyspace</key> |
| 92 | <defaultValue>unknown</defaultValue> |
| 93 | </discriminator> |
| 94 | <sift> |
| 95 | <appender name="EELFSift" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 96 | <file>${logDirectory}/${generalLogName}-keyspace.log</file> |
| 97 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 98 | <fileNamePattern>${logDirectory}/${generalLogName}-${keyspace}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
| 99 | <maxHistory>30</maxHistory> |
| 100 | </rollingPolicy> |
| 101 | <encoder> |
| 102 | <pattern>${applicationLoggerPattern}</pattern> |
| 103 | </encoder> |
| 104 | </appender> |
| 105 | </sift> |
| 106 | </appender> |
| 107 | |
| 108 | <appender name="asyncKSEELF" class="ch.qos.logback.classic.AsyncAppender"> |
| 109 | <queueSize>256</queueSize> |
| 110 | <includeCallerData>true</includeCallerData> |
| 111 | <appender-ref ref="KSEELF" /> |
| 112 | </appender> |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | <!-- <appender name="EELF" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 118 | <file>${logDirectory}/${generalLogName}.log</file> |
| 119 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 120 | <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
| 121 | <maxFileSize>1GB</maxFileSize> |
| 122 | <maxHistory>5</maxHistory> |
| 123 | <totalSizeCap>5GB</totalSizeCap> |
| 124 | </rollingPolicy> |
| 125 | <encoder> |
| 126 | <pattern>${applicationLoggerPattern}</pattern> |
| 127 | </encoder> |
| 128 | </appender> |
| 129 | |
| 130 | <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender"> |
| 131 | <queueSize>256</queueSize> |
| 132 | <includeCallerData>true</includeCallerData> |
| 133 | <appender-ref ref="EELF" /> |
| 134 | </appender> --> |
| 135 | |
| 136 | <!-- EELF Security Appender. This appender is used to record security events |
| 137 | to the security log file. Security events are separate from other loggers |
| 138 | in EELF so that security log records can be captured and managed in a secure |
| 139 | way separate from the other logs. This appender is set to never discard any |
| 140 | events. --> |
| 141 | <appender name="EELFSecurity" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 142 | <file>${logDirectory}/${securityLogName}.log</file> |
| 143 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 144 | <fileNamePattern>${logDirectory}/${securityLogName}.%i.log.zip</fileNamePattern> |
| 145 | <minIndex>1</minIndex> |
| 146 | <maxIndex>9</maxIndex> |
| 147 | </rollingPolicy> |
| 148 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 149 | <maxFileSize>5MB</maxFileSize> |
| 150 | </triggeringPolicy> |
| 151 | <encoder> |
| 152 | <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n </pattern> |
| 153 | </encoder> |
| 154 | </appender> |
| 155 | |
| 156 | <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender"> |
| 157 | <queueSize>256</queueSize> |
| 158 | <discardingThreshold>0</discardingThreshold> |
| 159 | <appender-ref ref="EELFSecurity" /> |
| 160 | </appender> |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | <!-- EELF Audit Appender. This appender is used to record audit engine |
| 166 | related logging events. The audit logger and appender are specializations |
| 167 | of the EELF application root logger and appender. This can be used to segregate |
| 168 | Policy engine events from other components, or it can be eliminated to record |
| 169 | these events as part of the application root log. --> |
| 170 | |
| 171 | <appender name="EELFAudit" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 172 | <file>${logDirectory}/${auditLogName}.log</file> |
| 173 | <rollingPolicy |
| 174 | class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 175 | <fileNamePattern>${logDirectory}/${auditLogName}.%i.log.zip</fileNamePattern> |
| 176 | <minIndex>1</minIndex> |
| 177 | <maxIndex>9</maxIndex> |
| 178 | </rollingPolicy> |
| 179 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 180 | <maxFileSize>5MB</maxFileSize> |
| 181 | </triggeringPolicy> |
| 182 | <encoder> |
| 183 | <pattern>${auditLoggerPattern}</pattern> |
| 184 | </encoder> |
| 185 | </appender> |
| 186 | <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> |
| 187 | <queueSize>256</queueSize> |
| 188 | <appender-ref ref="EELFAudit" /> |
| 189 | </appender> |
| 190 | |
| 191 | <appender name="EELFMetrics" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 192 | <file>${logDirectory}/${metricsLogName}.log</file> |
| 193 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 194 | <fileNamePattern>${logDirectory}/${metricsLogName}.%i.log.zip |
| 195 | </fileNamePattern> |
| 196 | <minIndex>1</minIndex> |
| 197 | <maxIndex>9</maxIndex> |
| 198 | </rollingPolicy> |
| 199 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 200 | <maxFileSize>5MB</maxFileSize> |
| 201 | </triggeringPolicy> |
| 202 | <encoder> |
| 203 | <!-- <pattern>"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n"</pattern> --> |
| 204 | <pattern>${metricsLoggerPattern}</pattern> |
| 205 | </encoder> |
| 206 | </appender> |
| 207 | |
| 208 | |
| 209 | <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> |
| 210 | <queueSize>256</queueSize> |
| 211 | <appender-ref ref="EELFMetrics"/> |
| 212 | </appender> |
| 213 | |
| 214 | <appender name="EELFError" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 215 | <file>${logDirectory}/${errorLogName}.log</file> |
| 216 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 217 | <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip</fileNamePattern> |
| 218 | <minIndex>1</minIndex> |
| 219 | <maxIndex>9</maxIndex> |
| 220 | </rollingPolicy> |
| 221 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 222 | <maxFileSize>5MB</maxFileSize> |
| 223 | </triggeringPolicy> |
| 224 | <encoder> |
| 225 | <pattern>${errorLoggerPattern}</pattern> |
| 226 | </encoder> |
| 227 | </appender> |
| 228 | |
| 229 | <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender"> |
| 230 | <queueSize>256</queueSize> |
| 231 | <appender-ref ref="EELFError"/> |
| 232 | </appender> |
| 233 | |
| 234 | <appender name="EELFDebug" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 235 | <file>${debugLogDirectory}/${debugLogName}.log</file> |
| 236 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 237 | <fileNamePattern>${debugLogDirectory}/${debugLogName}.%i.log.zip</fileNamePattern> |
| 238 | <minIndex>1</minIndex> |
| 239 | <maxIndex>9</maxIndex> |
| 240 | </rollingPolicy> |
| 241 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 242 | <maxFileSize>5MB</maxFileSize> |
| 243 | </triggeringPolicy> |
| 244 | <encoder> |
| 245 | <pattern>${debugLoggerPattern}</pattern> |
| 246 | </encoder> |
| 247 | </appender> |
| 248 | |
| 249 | <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> |
| 250 | <queueSize>256</queueSize> |
| 251 | <appender-ref ref="EELFDebug" /> |
| 252 | <includeCallerData>true</includeCallerData> |
| 253 | </appender> |
| 254 | |
| 255 | |
| 256 | <!-- ============================================================================ --> |
| 257 | <!-- EELF loggers --> |
| 258 | <!-- ============================================================================ --> |
| 259 | <logger name="com.att.eelf" level="{{.Values.logback.applicationLogLevel}}" additivity="false"> |
| 260 | <appender-ref ref="asyncEELF" /> |
| 261 | <appender-ref ref="asyncKSEELF" /> |
| 262 | </logger> |
| 263 | |
| 264 | <logger name="com.att.eelf.security" level="{{.Values.logback.securityLogLevel}}" additivity="false"> |
| 265 | <appender-ref ref="asyncEELFSecurity" /> |
| 266 | </logger> |
| 267 | |
| 268 | |
| 269 | <logger name="com.att.eelf.audit" level="{{.Values.logback.auditLogLevel}}" additivity="false"> |
| 270 | <appender-ref ref="asyncEELFAudit" /> |
| 271 | </logger> |
| 272 | |
| 273 | <logger name="com.att.eelf.metrics" level="{{.Values.logback.metricsLogLevel}}" additivity="false"> |
| 274 | <appender-ref ref="asyncEELFMetrics" /> |
| 275 | </logger> |
| 276 | |
| 277 | |
| 278 | <logger name="com.att.eelf.error" level="{{.Values.logback.errorLogLevel}}" additivity="false"> |
| 279 | <appender-ref ref="asyncEELFError" /> |
| 280 | </logger> |
| 281 | |
| 282 | <logger name="com.att.eelf.debug" level="debug" additivity="false"> |
| 283 | <appender-ref ref="asyncEELFDebug" /> |
| 284 | |
| 285 | </logger> |
| 286 | |
| 287 | <!-- Springboot??? --> |
| 288 | <!-- <logger name="org.springframework.web" level="DEBUG"> |
| 289 | <appender-ref ref="asyncEELF" /> |
| 290 | </logger> --> |
| 291 | |
| 292 | <root level="{{.Values.logback.rootLogLevel}}"> |
| 293 | <appender-ref ref="asyncEELF" /> |
| 294 | <appender-ref ref="asyncKSEELF" /> |
| 295 | <appender-ref ref="STDOUT" /> |
| 296 | </root> |
| 297 | |
| 298 | <!-- Conductor Specific additions to squash WARNING and INFO --> |
| 299 | <logger name="com.datastax.driver.core.Cluster" level="ERROR"/> |
| 300 | <logger name="org.onap.music.main.MusicCore" level="ERROR"/> |
| 301 | </configuration> |
| 302 | |