blob: bceefc500c9820ddf856feffccbc1f237761d57c [file] [log] [blame]
Prateekinlinux445a18e2018-08-01 06:48:33 +00001<!--# Copyright © 2018 Amdocs, Bell Canada , ZTE
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License. -->
Li Zic5290dc2018-08-06 09:26:27 +000014<configuration scan="false" debug="true">
15 <property name="p_tim" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}"/>
16 <property name="p_lvl" value="%level"/>
17 <property name="p_log" value="%logger"/>
18 <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/>
19 <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/>
20 <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/>
21 <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/>
22 <property name="p_thr" value="%thread"/>
23 <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"/>
24
25 <property name="logDir" value="/var/log/onap" />
26 <property name="debugDir" value="/var/log/onap" />
27
28 <property name="componentName" value="msb"></property>
29 <property name="subComponentName" value="msb-iag"></property>
30
31 <property name="errorLogName" value="error" />
32 <property name="metricsLogName" value="metrics" />
33 <property name="auditLogName" value="audit" />
34 <property name="debugLogName" value="debug" />
35
36 <property name="errorPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%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" />
37 <property name="debugPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{RequestId}|%msg%n\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n" />
38
39 <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" />
40 <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" />
41 <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
42 <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
43
44 <appender name="EELFAudit"
45 class="ch.qos.logback.core.rolling.RollingFileAppender">
46 <file>${logDirectory}/${auditLogName}.log</file>
47 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
48 <fileNamePattern>${logDirectory}/${auditLogName}.log.%d</fileNamePattern>
49 </rollingPolicy>
50 <encoder>
51 <pattern>${auditPattern}</pattern>
52 </encoder>
53 </appender>
54
55 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
56 <queueSize>256</queueSize>
57 <appender-ref ref="EELFAudit" />
58 </appender>
59
60 <appender name="EELFMetrics" class="ch.qos.logback.core.rolling.RollingFileAppender">
61 <file>${logDirectory}/${metricsLogName}.log</file>
62 <rollingPolicy
63 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
64 <fileNamePattern>${logDirectory}/${metricsLogName}.log.%d</fileNamePattern>
65 </rollingPolicy>
66 <encoder>
67 <pattern>${metricPattern}</pattern>
68 </encoder>
69 </appender>
70
71 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
72 <queueSize>256</queueSize>
73 <appender-ref ref="EELFMetrics"/>
74 </appender>
75
76 <appender name="EELFError"
77 class="ch.qos.logback.core.rolling.RollingFileAppender">
78 <file>${logDirectory}/${errorLogName}.log</file>
79 <rollingPolicy
80 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
81 <fileNamePattern>${logDirectory}/${errorLogName}.log.%d</fileNamePattern>
82 </rollingPolicy>
83 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
84 <level>INFO</level>
85 </filter>
86 <encoder>
87 <pattern>${errorPattern}</pattern>
88 </encoder>
89 </appender>
90
91 <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
92 <queueSize>256</queueSize>
93 <appender-ref ref="EELFError"/>
94 </appender>
95
96 <appender name="EELFDebug"
97 class="ch.qos.logback.core.rolling.RollingFileAppender">
98 <file>${debugLogDirectory}/${debugLogName}.log</file>
99 <rollingPolicy
100 class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
101 <fileNamePattern>${debugLogDirectory}/${debugLogName}.log.%d</fileNamePattern>
102 </rollingPolicy>
103 <encoder>
104 <pattern>${debugPattern}</pattern>
105 </encoder>
106 </appender>
107
108 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
109 <queueSize>256</queueSize>
110 <appender-ref ref="EELFDebug" />
111 <includeCallerData>true</includeCallerData>
112 </appender>
113
114 <logger name="com.att.eelf.audit" level="info" additivity="false">
115 <appender-ref ref="asyncEELFAudit" />
116 </logger>
117
118 <logger name="com.att.eelf.metrics" level="info" additivity="false">
119 <appender-ref ref="asyncEELFMetrics" />
120 </logger>
121
122 <logger name="com.att.eelf.error" level="debug" additivity="false">
123 <appender-ref ref="asyncEELFError" />
124 </logger>
125
126 <root level="INFO">
127 <appender-ref ref="asyncEELFDebug" />
128 </root>
129
130</configuration>
131