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 --> |
| 31 | <property name="componentName" value="epsdk_app_os"></property> |
| 32 | |
| 33 | <!-- specify the base path of the log directory --> |
| 34 | <property name="logDirPrefix" value="${catalina.base}/logs"></property> |
| 35 | |
| 36 | <!-- The directories where logs are written --> |
| 37 | <property name="logDirectory" value="${logDirPrefix}/${componentName}" /> |
| 38 | <!-- Can easily relocate debug logs by modifying this path. --> |
| 39 | <property name="debugLogDirectory" value="${logDirPrefix}/${componentName}" /> |
| 40 | |
| 41 | <!-- log file names --> |
| 42 | <property name="generalLogName" value="application" /> |
| 43 | <property name="errorLogName" value="error" /> |
| 44 | <property name="metricsLogName" value="metrics" /> |
| 45 | <property name="auditLogName" value="audit" /> |
| 46 | <property name="debugLogName" value="debug" /> |
| 47 | <!-- |
| 48 | These loggers are not used in code (yet). |
| 49 | <property name="securityLogName" value="security" /> |
| 50 | <property name="policyLogName" value="policy" /> |
| 51 | <property name="performanceLogName" value="performance" /> |
| 52 | <property name="serverLogName" value="server" /> |
| 53 | --> |
| 54 | |
| 55 | <!-- 1610 Logging Fields Format Revisions --> |
| 56 | <property name="auditLoggerPattern" |
| 57 | 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" /> |
| 58 | |
| 59 | <property name="metricsLoggerPattern" |
| 60 | 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" /> |
| 61 | |
| 62 | <property name="errorLoggerPattern" |
| 63 | 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" /> |
| 64 | |
| 65 | <property name="defaultLoggerPattern" |
| 66 | value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ClassName}| %msg%n" /> |
| 67 | |
| 68 | <!-- use %class so library logging calls yield their class name --> |
| 69 | <property name="applicationLoggerPattern" |
| 70 | value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%class{36}| %msg%n" /> |
| 71 | |
| 72 | <!-- Example evaluator filter applied against console appender --> |
| 73 | <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
| 74 | <encoder> |
| 75 | <pattern>${defaultLoggerPattern}</pattern> |
| 76 | </encoder> |
| 77 | </appender> |
| 78 | |
| 79 | <!-- ============================================================================ --> |
| 80 | <!-- EELF Appenders --> |
| 81 | <!-- ============================================================================ --> |
| 82 | |
| 83 | <!-- The EELFAppender is used to record events to the general application |
| 84 | log --> |
| 85 | |
| 86 | |
| 87 | <appender name="EELF" |
| 88 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 89 | <file>${logDirectory}/${generalLogName}.log</file> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 90 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 91 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 92 | <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 93 | |
| 94 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 95 | <maxFileSize>50MB</maxFileSize> |
| 96 | <maxHistory>30</maxHistory> |
| 97 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 98 | |
| 99 | </rollingPolicy> |
| 100 | <encoder> |
| 101 | <pattern>${applicationLoggerPattern}</pattern> |
| 102 | </encoder> |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 103 | <filter class="org.onap.portalapp.util.CustomLoggingFilter" /> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 104 | </appender> |
| 105 | |
| 106 | <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender"> |
| 107 | <queueSize>256</queueSize> |
| 108 | <!-- Class name is part of caller data --> |
| 109 | <includeCallerData>true</includeCallerData> |
| 110 | <appender-ref ref="EELF" /> |
| 111 | </appender> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 112 | <!-- EELF Audit Appender. This appender is used to record audit engine |
| 113 | related logging events. The audit logger and appender are specializations |
| 114 | of the EELF application root logger and appender. This can be used to segregate |
| 115 | Policy engine events from other components, or it can be eliminated to record |
| 116 | these events as part of the application root log. --> |
| 117 | |
| 118 | <appender name="EELFAudit" |
| 119 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 120 | <file>${logDirectory}/${auditLogName}.log</file> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 121 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 122 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 123 | <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 124 | |
| 125 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 126 | <maxFileSize>50MB</maxFileSize> |
| 127 | <maxHistory>30</maxHistory> |
| 128 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 129 | |
| 130 | </rollingPolicy> |
| 131 | <encoder> |
| 132 | <pattern>${auditLoggerPattern}</pattern> |
| 133 | </encoder> |
| 134 | </appender> |
| 135 | <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> |
| 136 | <queueSize>256</queueSize> |
| 137 | <appender-ref ref="EELFAudit" /> |
| 138 | </appender> |
| 139 | |
| 140 | <appender name="EELFMetrics" |
| 141 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 142 | <file>${logDirectory}/${metricsLogName}.log</file> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 143 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 144 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 145 | <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 146 | |
| 147 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 148 | <maxFileSize>50MB</maxFileSize> |
| 149 | <maxHistory>30</maxHistory> |
| 150 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 151 | |
| 152 | </rollingPolicy> |
| 153 | <encoder> |
| 154 | <pattern>${metricsLoggerPattern}</pattern> |
| 155 | </encoder> |
| 156 | </appender> |
| 157 | |
| 158 | |
| 159 | <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> |
| 160 | <queueSize>256</queueSize> |
| 161 | <appender-ref ref="EELFMetrics"/> |
| 162 | </appender> |
| 163 | |
| 164 | <appender name="EELFError" |
| 165 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 166 | <file>${logDirectory}/${errorLogName}.log</file> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 167 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 168 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 169 | <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 170 | |
| 171 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 172 | <maxFileSize>50MB</maxFileSize> |
| 173 | <maxHistory>30</maxHistory> |
| 174 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 175 | |
| 176 | </rollingPolicy> |
| 177 | <encoder> |
| 178 | <pattern>${errorLoggerPattern}</pattern> |
| 179 | </encoder> |
| 180 | </appender> |
| 181 | |
| 182 | <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender"> |
| 183 | <queueSize>256</queueSize> |
| 184 | <appender-ref ref="EELFError"/> |
| 185 | </appender> |
| 186 | |
| 187 | <appender name="EELFDebug" |
| 188 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 189 | <file>${debugLogDirectory}/${debugLogName}.log</file> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 190 | <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 191 | <!-- daily rollover --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 192 | <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 193 | |
| 194 | <!-- keep 30 days' worth of history capped at 3GB total size --> |
rb7147 | 4579102 | 2018-02-21 10:40:47 -0500 | [diff] [blame] | 195 | <maxFileSize>50MB</maxFileSize> |
| 196 | <maxHistory>30</maxHistory> |
| 197 | <totalSizeCap>10GB</totalSizeCap> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 198 | |
| 199 | </rollingPolicy> |
| 200 | <encoder> |
| 201 | <pattern>${defaultLoggerPattern}</pattern> |
| 202 | </encoder> |
| 203 | </appender> |
| 204 | |
| 205 | <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> |
| 206 | <queueSize>256</queueSize> |
| 207 | <appender-ref ref="EELFDebug" /> |
| 208 | </appender> |
| 209 | |
| 210 | |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 211 | |
| 212 | |
| 213 | <logger name="org.onap.eelf" level="info" additivity="false"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 214 | <appender-ref ref="asyncEELF" /> |
| 215 | </logger> |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 216 | |
| 217 | <logger name="org.onap.eelf.audit" level="info" additivity="false"> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 218 | <appender-ref ref="asyncEELFAudit" /> |
| 219 | </logger> |
| 220 | |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 221 | <logger name="org.onap.eelf.debug" level="debug" additivity="false"> |
| 222 | <appender-ref ref="asyncEELFDebug" /> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 223 | </logger> |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 224 | |
| 225 | <logger name="org.onap.eelf.error" level="info" additivity="false"> |
| 226 | <appender-ref ref="asyncEELFError" /> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 227 | </logger> |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 228 | |
| 229 | <logger name="org.onap.eelf.metrics" level="info" additivity="false"> |
| 230 | <appender-ref ref="asyncEELFMetrics" /> |
| 231 | </logger> |
Guo Ruijing | 073cc18 | 2017-07-31 08:47:35 +0000 | [diff] [blame] | 232 | |
| 233 | <root level="DEBUG"> |
| 234 | <appender-ref ref="asyncEELF" /> |
| 235 | </root> |
| 236 | |
rb7147 | 4281508 | 2017-12-04 16:45:55 -0500 | [diff] [blame] | 237 | </configuration> |