Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | ================================================================================ |
| 4 | ONAP Portal SDK |
| 5 | ================================================================================ |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 6 | Copyright (C) 2017-2018 AT&T Intellectual Property |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 7 | ================================================================================ |
| 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) | 80cbbc8 | 2018-04-02 14:11:34 -0400 | [diff] [blame^] | 31 | <property name="componentName" value="policy"></property> |
| 32 | <property name="subComponentName" value="console"></property> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 33 | |
| 34 | <!-- specify the base path of the log directory --> |
Chou, Joseph (JC2555) | 80cbbc8 | 2018-04-02 14:11:34 -0400 | [diff] [blame^] | 35 | <property name="logDirPrefix" value="${POLICY_LOGS}"></property> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 36 | |
| 37 | <!-- The directories where logs are written --> |
Chou, Joseph (JC2555) | 80cbbc8 | 2018-04-02 14:11:34 -0400 | [diff] [blame^] | 38 | <property name="logDirectory" value="${logDirPrefix}/${componentName}/${subComponentName}" /> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 39 | <!-- Can easily relocate debug logs by modifying this path. --> |
Chou, Joseph (JC2555) | 80cbbc8 | 2018-04-02 14:11:34 -0400 | [diff] [blame^] | 40 | <property name="debugLogDirectory" value="${logDirPrefix}/${componentName}/${subComponentName}" /> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 41 | |
| 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> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 91 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 92 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 93 | <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 94 | |
| 95 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 96 | <maxFileSize>50MB</maxFileSize> |
| 97 | <maxHistory>30</maxHistory> |
| 98 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 99 | |
| 100 | </rollingPolicy> |
| 101 | <encoder> |
| 102 | <pattern>${applicationLoggerPattern}</pattern> |
| 103 | </encoder> |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 104 | <filter class="org.onap.portalapp.util.CustomLoggingFilter" /> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 105 | </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 Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 113 | <!-- 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> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 122 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 123 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 124 | <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 125 | |
| 126 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 127 | <maxFileSize>50MB</maxFileSize> |
| 128 | <maxHistory>30</maxHistory> |
| 129 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 130 | |
| 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> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 144 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 145 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 146 | <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 147 | |
| 148 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 149 | <maxFileSize>50MB</maxFileSize> |
| 150 | <maxHistory>30</maxHistory> |
| 151 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 152 | |
| 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> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 168 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 169 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 170 | <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 171 | |
| 172 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 173 | <maxFileSize>50MB</maxFileSize> |
| 174 | <maxHistory>30</maxHistory> |
| 175 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 176 | |
| 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> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 191 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 192 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 193 | <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 194 | |
| 195 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 196 | <maxFileSize>50MB</maxFileSize> |
| 197 | <maxHistory>30</maxHistory> |
| 198 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 199 | |
| 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 | |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 212 | |
| 213 | |
| 214 | <logger name="org.onap.eelf" level="info" additivity="false"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 215 | <appender-ref ref="asyncEELF" /> |
| 216 | </logger> |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 217 | |
| 218 | <logger name="org.onap.eelf.audit" level="info" additivity="false"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 219 | <appender-ref ref="asyncEELFAudit" /> |
| 220 | </logger> |
| 221 | |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 222 | <logger name="org.onap.eelf.debug" level="debug" additivity="false"> |
| 223 | <appender-ref ref="asyncEELFDebug" /> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 224 | </logger> |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 225 | |
| 226 | <logger name="org.onap.eelf.error" level="info" additivity="false"> |
| 227 | <appender-ref ref="asyncEELFError" /> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 228 | </logger> |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 229 | |
| 230 | <logger name="org.onap.eelf.metrics" level="info" additivity="false"> |
| 231 | <appender-ref ref="asyncEELFMetrics" /> |
| 232 | </logger> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 233 | |
| 234 | <root level="DEBUG"> |
| 235 | <appender-ref ref="asyncEELF" /> |
| 236 | </root> |
| 237 | |
Chou, Joseph (JC2555) | 80cbbc8 | 2018-04-02 14:11:34 -0400 | [diff] [blame^] | 238 | </configuration> |