blob: 134ecb8abb7967f7bf900c5626b43f132e57224d [file] [log] [blame]
Guo Ruijing073cc182017-07-31 08:47:35 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 ================================================================================
4 ONAP Portal SDK
5 ================================================================================
rb714745791022018-02-21 10:40:47 -05006 Copyright (C) 2017-2018 AT&T Intellectual Property
Guo Ruijing073cc182017-07-31 08:47:35 +00007 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ================================================================================
20 -->
21
22<configuration scan="true" scanPeriod="3 seconds" debug="true">
23 <!--
24 Logback files for the ONAP Portal SDK Application "epsdk-app-os"
25 are created in directory ${catalina.base}/logs/epsdk_app_os;
26 e.g., apache-tomcat-8.0.35/logs/epsdk_app_os/application.log
27 -->
28 <!--<jmxConfigurator /> -->
29
30 <!-- specify the component name -->
Chou, Joseph (JC2555)80cbbc82018-04-02 14:11:34 -040031 <property name="componentName" value="policy"></property>
32 <property name="subComponentName" value="console"></property>
Guo Ruijing073cc182017-07-31 08:47:35 +000033
34 <!-- specify the base path of the log directory -->
Chou, Joseph (JC2555)80cbbc82018-04-02 14:11:34 -040035 <property name="logDirPrefix" value="${POLICY_LOGS}"></property>
Guo Ruijing073cc182017-07-31 08:47:35 +000036
37 <!-- The directories where logs are written -->
Chou, Joseph (JC2555)80cbbc82018-04-02 14:11:34 -040038 <property name="logDirectory" value="${logDirPrefix}/${componentName}/${subComponentName}" />
Guo Ruijing073cc182017-07-31 08:47:35 +000039 <!-- Can easily relocate debug logs by modifying this path. -->
Chou, Joseph (JC2555)80cbbc82018-04-02 14:11:34 -040040 <property name="debugLogDirectory" value="${logDirPrefix}/${componentName}/${subComponentName}" />
Guo Ruijing073cc182017-07-31 08:47:35 +000041
42 <!-- log file names -->
43 <property name="generalLogName" value="application" />
44 <property name="errorLogName" value="error" />
45 <property name="metricsLogName" value="metrics" />
46 <property name="auditLogName" value="audit" />
47 <property name="debugLogName" value="debug" />
48 <!--
49 These loggers are not used in code (yet).
50 <property name="securityLogName" value="security" />
51 <property name="policyLogName" value="policy" />
52 <property name="performanceLogName" value="performance" />
53 <property name="serverLogName" value="server" />
54 -->
55
56 <!-- 1610 Logging Fields Format Revisions -->
57 <property name="auditLoggerPattern"
58 value="%X{AuditLogBeginTimestamp}|%X{AuditLogEndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" />
59
60 <property name="metricsLoggerPattern"
61 value="%X{MetricsLogBeginTimestamp}|%X{MetricsLogEndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{TargetVisualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}| %msg%n" />
62
63 <property name="errorLoggerPattern"
64 value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ClassName}|%X{AlertSeverity}|%X{ErrorCode}|%X{ErrorDescription}| %msg%n" />
65
66 <property name="defaultLoggerPattern"
67 value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ClassName}| %msg%n" />
68
69 <!-- use %class so library logging calls yield their class name -->
70 <property name="applicationLoggerPattern"
71 value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%class{36}| %msg%n" />
72
73 <!-- Example evaluator filter applied against console appender -->
74 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
75 <encoder>
76 <pattern>${defaultLoggerPattern}</pattern>
77 </encoder>
78 </appender>
79
80 <!-- ============================================================================ -->
81 <!-- EELF Appenders -->
82 <!-- ============================================================================ -->
83
84 <!-- The EELFAppender is used to record events to the general application
85 log -->
86
87
88 <appender name="EELF"
89 class="ch.qos.logback.core.rolling.RollingFileAppender">
90 <file>${logDirectory}/${generalLogName}.log</file>
rb714745791022018-02-21 10:40:47 -050091 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
Guo Ruijing073cc182017-07-31 08:47:35 +000092 <!-- daily rollover -->
rb714745791022018-02-21 10:40:47 -050093 <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
Guo Ruijing073cc182017-07-31 08:47:35 +000094
95 <!-- keep 30 days' worth of history capped at 3GB total size -->
rb714745791022018-02-21 10:40:47 -050096 <maxFileSize>50MB</maxFileSize>
97 <maxHistory>30</maxHistory>
98 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +000099
100 </rollingPolicy>
101 <encoder>
102 <pattern>${applicationLoggerPattern}</pattern>
103 </encoder>
rb714742815082017-12-04 16:45:55 -0500104 <filter class="org.onap.portalapp.util.CustomLoggingFilter" />
Guo Ruijing073cc182017-07-31 08:47:35 +0000105 </appender>
106
107 <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
108 <queueSize>256</queueSize>
109 <!-- Class name is part of caller data -->
110 <includeCallerData>true</includeCallerData>
111 <appender-ref ref="EELF" />
112 </appender>
Guo Ruijing073cc182017-07-31 08:47:35 +0000113 <!-- EELF Audit Appender. This appender is used to record audit engine
114 related logging events. The audit logger and appender are specializations
115 of the EELF application root logger and appender. This can be used to segregate
116 Policy engine events from other components, or it can be eliminated to record
117 these events as part of the application root log. -->
118
119 <appender name="EELFAudit"
120 class="ch.qos.logback.core.rolling.RollingFileAppender">
121 <file>${logDirectory}/${auditLogName}.log</file>
rb714745791022018-02-21 10:40:47 -0500122 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
Guo Ruijing073cc182017-07-31 08:47:35 +0000123 <!-- daily rollover -->
rb714745791022018-02-21 10:40:47 -0500124 <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
Guo Ruijing073cc182017-07-31 08:47:35 +0000125
126 <!-- keep 30 days' worth of history capped at 3GB total size -->
rb714745791022018-02-21 10:40:47 -0500127 <maxFileSize>50MB</maxFileSize>
128 <maxHistory>30</maxHistory>
129 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000130
131 </rollingPolicy>
132 <encoder>
133 <pattern>${auditLoggerPattern}</pattern>
134 </encoder>
135 </appender>
136 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
137 <queueSize>256</queueSize>
138 <appender-ref ref="EELFAudit" />
139 </appender>
140
141 <appender name="EELFMetrics"
142 class="ch.qos.logback.core.rolling.RollingFileAppender">
143 <file>${logDirectory}/${metricsLogName}.log</file>
rb714745791022018-02-21 10:40:47 -0500144 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
Guo Ruijing073cc182017-07-31 08:47:35 +0000145 <!-- daily rollover -->
rb714745791022018-02-21 10:40:47 -0500146 <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
Guo Ruijing073cc182017-07-31 08:47:35 +0000147
148 <!-- keep 30 days' worth of history capped at 3GB total size -->
rb714745791022018-02-21 10:40:47 -0500149 <maxFileSize>50MB</maxFileSize>
150 <maxHistory>30</maxHistory>
151 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000152
153 </rollingPolicy>
154 <encoder>
155 <pattern>${metricsLoggerPattern}</pattern>
156 </encoder>
157 </appender>
158
159
160 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
161 <queueSize>256</queueSize>
162 <appender-ref ref="EELFMetrics"/>
163 </appender>
164
165 <appender name="EELFError"
166 class="ch.qos.logback.core.rolling.RollingFileAppender">
167 <file>${logDirectory}/${errorLogName}.log</file>
rb714745791022018-02-21 10:40:47 -0500168 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
Guo Ruijing073cc182017-07-31 08:47:35 +0000169 <!-- daily rollover -->
rb714745791022018-02-21 10:40:47 -0500170 <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
Guo Ruijing073cc182017-07-31 08:47:35 +0000171
172 <!-- keep 30 days' worth of history capped at 3GB total size -->
rb714745791022018-02-21 10:40:47 -0500173 <maxFileSize>50MB</maxFileSize>
174 <maxHistory>30</maxHistory>
175 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000176
177 </rollingPolicy>
178 <encoder>
179 <pattern>${errorLoggerPattern}</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 <appender name="EELFDebug"
189 class="ch.qos.logback.core.rolling.RollingFileAppender">
190 <file>${debugLogDirectory}/${debugLogName}.log</file>
rb714745791022018-02-21 10:40:47 -0500191 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
Guo Ruijing073cc182017-07-31 08:47:35 +0000192 <!-- daily rollover -->
rb714745791022018-02-21 10:40:47 -0500193 <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
Guo Ruijing073cc182017-07-31 08:47:35 +0000194
195 <!-- keep 30 days' worth of history capped at 3GB total size -->
rb714745791022018-02-21 10:40:47 -0500196 <maxFileSize>50MB</maxFileSize>
197 <maxHistory>30</maxHistory>
198 <totalSizeCap>10GB</totalSizeCap>
Guo Ruijing073cc182017-07-31 08:47:35 +0000199
200 </rollingPolicy>
201 <encoder>
202 <pattern>${defaultLoggerPattern}</pattern>
203 </encoder>
204 </appender>
205
206 <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender">
207 <queueSize>256</queueSize>
208 <appender-ref ref="EELFDebug" />
209 </appender>
210
211
rb714742815082017-12-04 16:45:55 -0500212
213
214 <logger name="org.onap.eelf" level="info" additivity="false">
Guo Ruijing073cc182017-07-31 08:47:35 +0000215 <appender-ref ref="asyncEELF" />
216 </logger>
rb714742815082017-12-04 16:45:55 -0500217
218 <logger name="org.onap.eelf.audit" level="info" additivity="false">
Guo Ruijing073cc182017-07-31 08:47:35 +0000219 <appender-ref ref="asyncEELFAudit" />
220 </logger>
221
rb714742815082017-12-04 16:45:55 -0500222 <logger name="org.onap.eelf.debug" level="debug" additivity="false">
223 <appender-ref ref="asyncEELFDebug" />
Guo Ruijing073cc182017-07-31 08:47:35 +0000224 </logger>
rb714742815082017-12-04 16:45:55 -0500225
226 <logger name="org.onap.eelf.error" level="info" additivity="false">
227 <appender-ref ref="asyncEELFError" />
Guo Ruijing073cc182017-07-31 08:47:35 +0000228 </logger>
rb714742815082017-12-04 16:45:55 -0500229
230 <logger name="org.onap.eelf.metrics" level="info" additivity="false">
231 <appender-ref ref="asyncEELFMetrics" />
232 </logger>
Guo Ruijing073cc182017-07-31 08:47:35 +0000233
234 <root level="DEBUG">
235 <appender-ref ref="asyncEELF" />
236 </root>
237
Chou, Joseph (JC2555)80cbbc82018-04-02 14:11:34 -0400238</configuration>