blob: 3595b243223f5607b3050abed02111bf4dd3ccca [file] [log] [blame]
Guo Ruijing073cc182017-07-31 08:47:35 +00001<!--
2 ============LICENSE_START=======================================================
3 ONAP-PAP-REST
4 ================================================================================
rb714745791022018-02-21 10:40:47 -05005 Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
Guo Ruijing073cc182017-07-31 08:47:35 +00006 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ============LICENSE_END=========================================================
19 -->
20
21<configuration scan="true" scanPeriod="3 seconds" debug="true">
22 <!--<jmxConfigurator /> -->
23 <!-- directory path for all other type logs -->
24 <property name="logDir" value="logs" />
25
26 <!-- directory path for debugging type logs -->
27 <property name="debugDir" value="logs" />
28
29 <!-- specify the component name
30 <ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
31 <property name="componentName" value="Policy"></property>
32 <property name="subComponentName" value="ONAP-PAP-REST"></property>
33
34 <!-- log file names -->
35 <property name="errorLogName" value="error" />
36 <property name="metricsLogName" value="metrics" />
37 <property name="auditLogName" value="audit" />
38 <property name="debugLogName" value="debug" />
39
40
41 <!-- modified time stamp format -->
42
43 <!-- A U D I T
44 <property name="defaultAuditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%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{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
45 <property name="defaultAuditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{ElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
46 -->
47 <property name="defaultAuditPattern" value="%X{TransactionBeginTimestamp}|%X{TransactionEndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{TransactionElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
48
49
50
51 <!-- M E T R I C
52 <property name="defaultMetricPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%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{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
53 -->
54 <property name="defaultMetricPattern" value="%X{MetricBeginTimestamp}|%X{MetricEndTimestamp}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%p|%X{severity}|%X{serverIpAddress}|%X{MetricElapsedTime}|%X{server}|%X{clientIpAddress}|%c||%X{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
55
56
57
58
59 <!-- E R R O R
60 <property name="defaultErrorPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDesciption}|%msg%n" />
61 -->
62 <property name="defaultErrorPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{requestId}|%t|%X{serviceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|%X{ErrorDesciption}|%msg%n" />
63
64
65
66 <!-- D E B U G
67 <property name="debugLoggerPatternOld" value="%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|[%caller{3}]|%msg%n" />
68 <property name="debugLoggerPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}||%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" /> -->
69 -->
70 <property name="debugLoggerPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%msg%n" />
71
72
73
74 <!-- D E F A U L T
75 <property name="defaultPatternOld" value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Timer}|%msg%n" />
76 <property name="defaultPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServerName}|%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{ProcessKey}|%X{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|%msg%n" />
77 -->
78 <property name="defaultPattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}|%X{requestId}|%X{serviceInstanceId}|%t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{clientIpAddress}|%c||%msg%n" />
79
80
81
82 <!-- P A T H
83 <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
84 <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
85
86 -->
87 <property name="logDirectory" value="${catalina.base}/${logDir}/${componentName}/${subComponentName}" />
88 <property name="debugLogDirectory" value="${catalina.base}/${debugDir}/${componentName}/${subComponentName}" />
89
90
91
92
93 <!-- Example evaluator filter applied against console appender -->
94 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
95 <encoder>
96 <pattern>${defaultPattern}</pattern>
97 </encoder>
98 </appender>
99
100 <!-- ============================================================================ -->
101 <!-- EELF Appenders -->
102 <!-- ============================================================================ -->
103
104 <!-- The EELFAppender is used to record events to the general application
105 log -->
106
107 <!-- EELF Audit Appender. This appender is used to record audit engine
108 related logging events. The audit logger and appender are specializations
109 of the EELF application root logger and appender. This can be used to segregate
110 Policy engine events from other components, or it can be eliminated to record
111 these events as part of the application root log. -->
112
113 <appender name="EELFAudit"
114 class="ch.qos.logback.core.rolling.RollingFileAppender">
115 <file>${logDirectory}/${auditLogName}.log</file>
116 <rollingPolicy
rb714745791022018-02-21 10:40:47 -0500117 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
118 <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
119
120 <!-- keep 30 days' worth of history capped at 3GB total size -->
121 <maxFileSize>50MB</maxFileSize>
122 <maxHistory>30</maxHistory>
123 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000124 </rollingPolicy>
Guo Ruijing073cc182017-07-31 08:47:35 +0000125 <encoder>
126 <pattern>${defaultAuditPattern}</pattern>
127 </encoder>
128 </appender>
129
130 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
131 <queueSize>256</queueSize>
132 <appender-ref ref="EELFAudit" />
133 </appender>
134
135
136
137
138<appender name="EELFMetrics"
139 class="ch.qos.logback.core.rolling.RollingFileAppender">
140 <file>${logDirectory}/${metricsLogName}.log</file>
141 <rollingPolicy
rb714745791022018-02-21 10:40:47 -0500142 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
143 <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
144
145 <!-- keep 30 days' worth of history capped at 3GB total size -->
146 <maxFileSize>50MB</maxFileSize>
147 <maxHistory>30</maxHistory>
148 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000149 </rollingPolicy>
Guo Ruijing073cc182017-07-31 08:47:35 +0000150 <encoder>
Guo Ruijing073cc182017-07-31 08:47:35 +0000151 <pattern>${defaultMetricPattern}</pattern>
152 </encoder>
153 </appender>
154
155 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
156 <queueSize>256</queueSize>
157 <appender-ref ref="EELFMetrics"/>
158 </appender>
159
160
161
162
163 <appender name="EELFError"
164 class="ch.qos.logback.core.rolling.RollingFileAppender">
165 <file>${logDirectory}/${errorLogName}.log</file>
166 <rollingPolicy
rb714745791022018-02-21 10:40:47 -0500167 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
168 <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
169
170 <!-- keep 30 days' worth of history capped at 3GB total size -->
171 <maxFileSize>50MB</maxFileSize>
172 <maxHistory>30</maxHistory>
173 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000174 </rollingPolicy>
175 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
176 <level>ERROR</level>
rb714745791022018-02-21 10:40:47 -0500177 </filter>
Guo Ruijing073cc182017-07-31 08:47:35 +0000178 <encoder>
179 <pattern>${defaultErrorPattern}</pattern>
180 </encoder>
181 </appender>
182
183 <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
184 <queueSize>256</queueSize>
185 <appender-ref ref="EELFError"/>
186 </appender>
187
188
189
190 <appender name="EELFDebug"
191 class="ch.qos.logback.core.rolling.RollingFileAppender">
192 <file>${debugLogDirectory}/${debugLogName}.log</file>
193 <rollingPolicy
rb714745791022018-02-21 10:40:47 -0500194 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
195 <fileNamePattern>${debugLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
196
197 <!-- keep 30 days' worth of history capped at 3GB total size -->
198 <maxFileSize>50MB</maxFileSize>
199 <maxHistory>30</maxHistory>
200 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000201 </rollingPolicy>
202 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
203 <level>DEBUG</level>
rb714745791022018-02-21 10:40:47 -0500204 </filter>
Guo Ruijing073cc182017-07-31 08:47:35 +0000205 <encoder>
206 <pattern>${debugLoggerPattern}</pattern>
207 </encoder>
208 </appender>
209
210 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
211 <queueSize>256</queueSize>
212 <appender-ref ref="EELFDebug" />
213 <includeCallerData>true</includeCallerData>
214 </appender>
215
216
217 <!-- ============================================================================ -->
218 <!-- EELF loggers -->
219 <!-- ============================================================================ -->
220
221 <logger name="com.att.eelf.audit" level="info" additivity="false">
222 <appender-ref ref="asyncEELFAudit" />
223 </logger>
224
225 <logger name="com.att.eelf.metrics" level="info" additivity="false">
226 <appender-ref ref="asyncEELFMetrics" />
227 </logger>
228
229 <logger name="com.att.eelf.error" level="error" additivity="false">
230 <appender-ref ref="asyncEELFError" />
231 </logger>
232
233 <logger name="com.att.eelf.debug" level="info" additivity="false">
234 <appender-ref ref="asyncEELFDebug" />
235 </logger>
236
237
238
239 <root level="INFO">
240 <appender-ref ref="asyncEELFDebug" />
241 <appender-ref ref="asyncEELFError" />
242 </root>
243
244</configuration>