blob: fcc9f250d934feaf4d3e38fff179be459f793672 [file] [log] [blame]
Li Zi5cc26172018-08-31 02:01:53 +00001<?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 Mizynbc5ec3f2020-08-31 12:05:19 +020018<configuration scan="{{ .Values.log.scan.enabled }}" debug="{{ .Values.log.debug }}">
Li Zi5cc26172018-08-31 02:01:53 +000019
Dominik Mizynbc5ec3f2020-08-31 12:05:19 +020020 <property name="componentName" value='{{default "UNSET_COMPONENT" .Values.log.componentName}}'/>
21 <property name="subcomponentName" value='{{default "UNSET_SUBCOMPONENT" .Values.log.subcomponentName}}'/>
Li Zi5cc26172018-08-31 02:01:53 +000022
Dominik Mizynbc5ec3f2020-08-31 12:05:19 +020023 <property name="logDir" value="{{ .Values.log.logDir }}" />
24 <property name="queueSize" value="{{ .Values.log.queueSize }}"/>
25
26 <property name="p_tim" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, 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 Zi5cc26172018-08-31 02:01:53 +000035
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 Mizynbc5ec3f2020-08-31 12:05:19 +020041 <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 Zi5cc26172018-08-31 02:01:53 +000043 <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 Mizynbc5ec3f2020-08-31 12:05:19 +020045
Li Zi5cc26172018-08-31 02:01:53 +000046 <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
Dominik Mizynbc5ec3f2020-08-31 12:05:19 +020047
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 Zi5cc26172018-08-31 02:01:53 +000050
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 Mizynbc5ec3f2020-08-31 12:05:19 +020063 <queueSize>${queueSize}</queueSize>
Li Zi5cc26172018-08-31 02:01:53 +000064 <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 Mizynbc5ec3f2020-08-31 12:05:19 +020079 <queueSize>${queueSize}</queueSize>
Li Zi5cc26172018-08-31 02:01:53 +000080 <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 Mizynbc5ec3f2020-08-31 12:05:19 +020099 <queueSize>${queueSize}</queueSize>
Li Zi5cc26172018-08-31 02:01:53 +0000100 <appender-ref ref="EELFError"/>
101 </appender>
102
103 <appender name="EELFDebug"
104 class="ch.qos.logback.core.rolling.RollingFileAppender">
Dominik Mizynbc5ec3f2020-08-31 12:05:19 +0200105 <file>${logDirectory}/${debugLogName}.log</file>
Li Zi5cc26172018-08-31 02:01:53 +0000106 <rollingPolicy
107 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
Dominik Mizynbc5ec3f2020-08-31 12:05:19 +0200108 <fileNamePattern>${logDirectory}/${debugLogName}.log.%d</fileNamePattern>
Li Zi5cc26172018-08-31 02:01:53 +0000109 </rollingPolicy>
110 <encoder>
111 <pattern>${debugPattern}</pattern>
112 </encoder>
113 </appender>
114
115 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
Dominik Mizynbc5ec3f2020-08-31 12:05:19 +0200116 <queueSize>${queueSize}</queueSize>
Li Zi5cc26172018-08-31 02:01:53 +0000117 <appender-ref ref="EELFDebug" />
118 <includeCallerData>true</includeCallerData>
119 </appender>
120
Dominik Mizynbc5ec3f2020-08-31 12:05:19 +0200121 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
122 <encoder>
123 <pattern>${consolePattern}</pattern>
124 </encoder>
125 </appender>
126
Li Zi5cc26172018-08-31 02:01:53 +0000127 <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 Mizynbc5ec3f2020-08-31 12:05:19 +0200139 <root level="{{ .Values.log.root.level }}">
Li Zi5cc26172018-08-31 02:01:53 +0000140 <appender-ref ref="asyncEELFDebug" />
Dominik Mizynbc5ec3f2020-08-31 12:05:19 +0200141 <appender-ref ref="STDOUT" />
Li Zi5cc26172018-08-31 02:01:53 +0000142 </root>
143
Dominik Mizynbc5ec3f2020-08-31 12:05:19 +0200144</configuration>