Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | # Copyright © 2018 Amdocs, Bell Canada |
| 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 | |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 18 | <configuration scan="{{ .Values.log.scan.enabled }}" debug="{{ .Values.log.debug }}"> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 19 | |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 20 | <property name="componentName" value='{{default "UNSET_COMPONENT" .Values.log.componentName}}'/> |
| 21 | <property name="subcomponentName" value='{{default "UNSET_SUBCOMPONENT" .Values.log.subcomponentName}}'/> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 22 | |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 23 | <property name="logDir" value="{{ .Values.log.logDir }}" /> |
| 24 | <property name="queueSize" value="{{ .Values.log.queueSize }}"/> |
| 25 | |
| 26 | <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}"/> |
| 27 | <property name="p_lvl" value="%level"/> |
| 28 | <property name="p_log" value="%logger"/> |
| 29 | <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/> |
| 30 | <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/> |
| 31 | <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/> |
| 32 | <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/> |
| 33 | <property name="p_thr" value="%thread"/> |
| 34 | <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 35 | |
| 36 | <property name="errorLogName" value="error" /> |
| 37 | <property name="metricsLogName" value="metrics" /> |
| 38 | <property name="auditLogName" value="audit" /> |
| 39 | <property name="debugLogName" value="debug" /> |
| 40 | |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 41 | <property name="errorPattern" value="${p_tim}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n" /> |
| 42 | <property name="debugPattern" value="${p_tim}|%X{RequestId}|%msg%n\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n" /> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 43 | <property name="auditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||||||%msg%n" /> |
| 44 | <property name="metricPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|||||%msg%n" /> |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 45 | |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 46 | <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" /> |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 47 | |
| 48 | <!-- Console (human-readable) logging --> |
| 49 | <property name="consolePattern" value="%nopexception${p_log}\t${p_tim}\t${p_lvl}\t%message\t${p_mdc}\t%rootException\t${p_mak}\t${p_thr}%n"/> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 50 | |
| 51 | <appender name="EELFAudit" |
| 52 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 53 | <file>${logDirectory}/${auditLogName}.log</file> |
| 54 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 55 | <fileNamePattern>${logDirectory}/${auditLogName}.log.%d</fileNamePattern> |
| 56 | </rollingPolicy> |
| 57 | <encoder> |
| 58 | <pattern>${auditPattern}</pattern> |
| 59 | </encoder> |
| 60 | </appender> |
| 61 | |
| 62 | <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 63 | <queueSize>${queueSize}</queueSize> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 64 | <appender-ref ref="EELFAudit" /> |
| 65 | </appender> |
| 66 | |
| 67 | <appender name="EELFMetrics" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 68 | <file>${logDirectory}/${metricsLogName}.log</file> |
| 69 | <rollingPolicy |
| 70 | class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 71 | <fileNamePattern>${logDirectory}/${metricsLogName}.log.%d</fileNamePattern> |
| 72 | </rollingPolicy> |
| 73 | <encoder> |
| 74 | <pattern>${metricPattern}</pattern> |
| 75 | </encoder> |
| 76 | </appender> |
| 77 | |
| 78 | <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 79 | <queueSize>${queueSize}</queueSize> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 80 | <appender-ref ref="EELFMetrics"/> |
| 81 | </appender> |
| 82 | |
| 83 | <appender name="EELFError" |
| 84 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 85 | <file>${logDirectory}/${errorLogName}.log</file> |
| 86 | <rollingPolicy |
| 87 | class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 88 | <fileNamePattern>${logDirectory}/${errorLogName}.log.%d</fileNamePattern> |
| 89 | </rollingPolicy> |
| 90 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 91 | <level>INFO</level> |
| 92 | </filter> |
| 93 | <encoder> |
| 94 | <pattern>${errorPattern}</pattern> |
| 95 | </encoder> |
| 96 | </appender> |
| 97 | |
| 98 | <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender"> |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 99 | <queueSize>${queueSize}</queueSize> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 100 | <appender-ref ref="EELFError"/> |
| 101 | </appender> |
| 102 | |
| 103 | <appender name="EELFDebug" |
| 104 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 105 | <file>${logDirectory}/${debugLogName}.log</file> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 106 | <rollingPolicy |
| 107 | class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 108 | <fileNamePattern>${logDirectory}/${debugLogName}.log.%d</fileNamePattern> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 109 | </rollingPolicy> |
| 110 | <encoder> |
| 111 | <pattern>${debugPattern}</pattern> |
| 112 | </encoder> |
| 113 | </appender> |
| 114 | |
| 115 | <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 116 | <queueSize>${queueSize}</queueSize> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 117 | <appender-ref ref="EELFDebug" /> |
| 118 | <includeCallerData>true</includeCallerData> |
| 119 | </appender> |
| 120 | |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 121 | <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
| 122 | <encoder> |
| 123 | <pattern>${consolePattern}</pattern> |
| 124 | </encoder> |
| 125 | </appender> |
| 126 | |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 127 | <logger name="com.att.eelf.audit" level="info" additivity="false"> |
| 128 | <appender-ref ref="asyncEELFAudit" /> |
| 129 | </logger> |
| 130 | |
| 131 | <logger name="com.att.eelf.metrics" level="info" additivity="false"> |
| 132 | <appender-ref ref="asyncEELFMetrics" /> |
| 133 | </logger> |
| 134 | |
| 135 | <logger name="com.att.eelf.error" level="debug" additivity="false"> |
| 136 | <appender-ref ref="asyncEELFError" /> |
| 137 | </logger> |
| 138 | |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 139 | <root level="{{ .Values.log.root.level }}"> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 140 | <appender-ref ref="asyncEELFDebug" /> |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 141 | <appender-ref ref="STDOUT" /> |
Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 142 | </root> |
| 143 | |
Dominik Mizyn | bc5ec3f | 2020-08-31 12:05:19 +0200 | [diff] [blame^] | 144 | </configuration> |