blob: 677b0d0d723b9006a208aa298bc34749efdbcd4d [file] [log] [blame]
Guo Ruijing073cc182017-07-31 08:47:35 +00001<!--
2 ============LICENSE_START=======================================================
3 ONAP-PDP-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 -->
Chou, Joseph (JC2555)5cd57942018-03-28 13:46:11 -040024 <property name="logDir" value="logs" />
Guo Ruijing073cc182017-07-31 08:47:35 +000025
26 <!-- directory path for debugging type logs -->
Chou, Joseph (JC2555)5cd57942018-03-28 13:46:11 -040027 <property name="debugDir" value="logs" />
Guo Ruijing073cc182017-07-31 08:47:35 +000028
29 <!-- specify the component name
30 <ONAP-component-name>::= "MSO" | "DCAE" | "ASDC " | "AAI" |"Policy" | "SDNC" | "AC" -->
Chou, Joseph (JC2555)5cd57942018-03-28 13:46:11 -040031 <property name="componentName" value="Policy"></property>
32 <property name="subComponentName" value="ONAP-PDP-REST"></property>
Guo Ruijing073cc182017-07-31 08:47:35 +000033
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 <!-- E R R O R
59 <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" />
60 -->
61 <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" />
62
63
64
65 <!-- D E B U G
66 <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" />
67 <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" /> -->
68 -->
69 <property name="debugLoggerPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%X{RequestId}|%msg%n" />
70
71
72
73 <!-- D E F A U L T
74 <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" />
75 <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" />
76 -->
77 <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" />
78
79
80
81 <!-- P A T H
82 <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
83 <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" />
84
85 -->
Chou, Joseph (JC2555)5cd57942018-03-28 13:46:11 -040086 <property name="logDirectory" value="${catalina.base}/${logDir}/${componentName}/${subComponentName}" />
87 <property name="debugLogDirectory" value="${catalina.base}/${debugDir}/${componentName}/${subComponentName}" />
Guo Ruijing073cc182017-07-31 08:47:35 +000088
89
90
91
92 <!-- Example evaluator filter applied against console appender -->
93 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
94 <encoder>
95 <pattern>${defaultPattern}</pattern>
96 </encoder>
97 </appender>
98
99 <!-- ============================================================================ -->
100 <!-- EELF Appenders -->
101 <!-- ============================================================================ -->
102
103 <!-- The EELFAppender is used to record events to the general application
104 log -->
105
106 <!-- EELF Audit Appender. This appender is used to record audit engine
107 related logging events. The audit logger and appender are specializations
108 of the EELF application root logger and appender. This can be used to segregate
109 Policy engine events from other components, or it can be eliminated to record
110 these events as part of the application root log. -->
111
112 <appender name="EELFAudit"
113 class="ch.qos.logback.core.rolling.RollingFileAppender">
114 <file>${logDirectory}/${auditLogName}.log</file>
115 <rollingPolicy
rb714745791022018-02-21 10:40:47 -0500116 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
117 <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
118
119 <!-- keep 30 days' worth of history capped at 3GB total size -->
120 <maxFileSize>50MB</maxFileSize>
121 <maxHistory>30</maxHistory>
122 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000123 </rollingPolicy>
rb714745791022018-02-21 10:40:47 -0500124
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>
rb714745791022018-02-21 10:40:47 -0500150
Guo Ruijing073cc182017-07-31 08:47:35 +0000151 <encoder>
Guo Ruijing073cc182017-07-31 08:47:35 +0000152 <pattern>${defaultMetricPattern}</pattern>
153 </encoder>
154 </appender>
155
156 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
157 <queueSize>256</queueSize>
158 <appender-ref ref="EELFMetrics"/>
159 </appender>
160
161
162
163
164 <appender name="EELFError"
165 class="ch.qos.logback.core.rolling.RollingFileAppender">
166 <file>${logDirectory}/${errorLogName}.log</file>
167 <rollingPolicy
rb714745791022018-02-21 10:40:47 -0500168 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
169 <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
170
171 <!-- keep 30 days' worth of history capped at 3GB total size -->
172 <maxFileSize>50MB</maxFileSize>
173 <maxHistory>30</maxHistory>
174 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000175 </rollingPolicy>
176 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
177 <level>ERROR</level>
rb714745791022018-02-21 10:40:47 -0500178 </filter>
Guo Ruijing073cc182017-07-31 08:47:35 +0000179 <encoder>
180 <pattern>${defaultErrorPattern}</pattern>
181 </encoder>
182 </appender>
183
184 <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
185 <queueSize>256</queueSize>
186 <appender-ref ref="EELFError"/>
187 </appender>
188
189
190
191 <appender name="EELFDebug"
192 class="ch.qos.logback.core.rolling.RollingFileAppender">
193 <file>${debugLogDirectory}/${debugLogName}.log</file>
194 <rollingPolicy
rb714745791022018-02-21 10:40:47 -0500195 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
196 <fileNamePattern>${debugLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
197
198 <!-- keep 30 days' worth of history capped at 3GB total size -->
199 <maxFileSize>50MB</maxFileSize>
200 <maxHistory>30</maxHistory>
201 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000202 </rollingPolicy>
203 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
204 <level>DEBUG</level>
205 </filter>
rb714745791022018-02-21 10:40:47 -0500206
Guo Ruijing073cc182017-07-31 08:47:35 +0000207 <encoder>
208 <pattern>${debugLoggerPattern}</pattern>
209 </encoder>
210 </appender>
211
212 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
213 <queueSize>256</queueSize>
214 <appender-ref ref="EELFDebug" />
215 <includeCallerData>true</includeCallerData>
216 </appender>
217
218
219 <!-- ============================================================================ -->
220 <!-- EELF loggers -->
221 <!-- ============================================================================ -->
222
223 <logger name="com.att.eelf.audit" level="info" additivity="false">
224 <appender-ref ref="asyncEELFAudit" />
225 </logger>
226
227 <logger name="com.att.eelf.metrics" level="info" additivity="false">
228 <appender-ref ref="asyncEELFMetrics" />
229 </logger>
230
231 <logger name="com.att.eelf.error" level="error" additivity="false">
232 <appender-ref ref="asyncEELFError" />
233 </logger>
234
235 <logger name="com.att.eelf.debug" level="info" additivity="false">
236 <appender-ref ref="asyncEELFDebug" />
237 </logger>
238
239
240
241 <root level="INFO">
242 <appender-ref ref="asyncEELFDebug" />
243 <appender-ref ref="asyncEELFError" />
244 </root>
245
246</configuration>