Li Zi | 5cc2617 | 2018-08-31 02:01:53 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | # Copyright © 2018 Amdocs, Bell Canada |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | --> |
| 17 | |
| 18 | <configuration scan="false" debug="true"> |
| 19 | <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}"/> |
| 20 | <property name="p_lvl" value="%level"/> |
| 21 | <property name="p_log" value="%logger"/> |
| 22 | <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/> |
| 23 | <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/> |
| 24 | <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/> |
| 25 | <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/> |
| 26 | <property name="p_thr" value="%thread"/> |
| 27 | <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/> |
| 28 | |
| 29 | <property name="logDir" value="/var/log/onap" /> |
| 30 | <property name="debugDir" value="/var/log/onap" /> |
| 31 | |
| 32 | <property name="componentName" value="esr"></property> |
| 33 | <property name="subComponentName" value="esr-server"></property> |
| 34 | |
| 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 | <property name="errorPattern" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n" /> |
| 41 | <property name="debugPattern" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}|%X{RequestId}|%msg%n\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n" /> |
| 42 | |
| 43 | <property name="auditPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||||||%msg%n" /> |
| 44 | <property name="metricPattern" value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{Timer}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|||||%msg%n" /> |
| 45 | <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" /> |
| 46 | <property name="debugLogDirectory" value="${debugDir}/${componentName}/${subComponentName}" /> |
| 47 | |
| 48 | <appender name="EELFAudit" |
| 49 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 50 | <file>${logDirectory}/${auditLogName}.log</file> |
| 51 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 52 | <fileNamePattern>${logDirectory}/${auditLogName}.log.%d</fileNamePattern> |
| 53 | </rollingPolicy> |
| 54 | <encoder> |
| 55 | <pattern>${auditPattern}</pattern> |
| 56 | </encoder> |
| 57 | </appender> |
| 58 | |
| 59 | <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> |
| 60 | <queueSize>256</queueSize> |
| 61 | <appender-ref ref="EELFAudit" /> |
| 62 | </appender> |
| 63 | |
| 64 | <appender name="EELFMetrics" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 65 | <file>${logDirectory}/${metricsLogName}.log</file> |
| 66 | <rollingPolicy |
| 67 | class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 68 | <fileNamePattern>${logDirectory}/${metricsLogName}.log.%d</fileNamePattern> |
| 69 | </rollingPolicy> |
| 70 | <encoder> |
| 71 | <pattern>${metricPattern}</pattern> |
| 72 | </encoder> |
| 73 | </appender> |
| 74 | |
| 75 | <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> |
| 76 | <queueSize>256</queueSize> |
| 77 | <appender-ref ref="EELFMetrics"/> |
| 78 | </appender> |
| 79 | |
| 80 | <appender name="EELFError" |
| 81 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 82 | <file>${logDirectory}/${errorLogName}.log</file> |
| 83 | <rollingPolicy |
| 84 | class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 85 | <fileNamePattern>${logDirectory}/${errorLogName}.log.%d</fileNamePattern> |
| 86 | </rollingPolicy> |
| 87 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 88 | <level>INFO</level> |
| 89 | </filter> |
| 90 | <encoder> |
| 91 | <pattern>${errorPattern}</pattern> |
| 92 | </encoder> |
| 93 | </appender> |
| 94 | |
| 95 | <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender"> |
| 96 | <queueSize>256</queueSize> |
| 97 | <appender-ref ref="EELFError"/> |
| 98 | </appender> |
| 99 | |
| 100 | <appender name="EELFDebug" |
| 101 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 102 | <file>${debugLogDirectory}/${debugLogName}.log</file> |
| 103 | <rollingPolicy |
| 104 | class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 105 | <fileNamePattern>${debugLogDirectory}/${debugLogName}.log.%d</fileNamePattern> |
| 106 | </rollingPolicy> |
| 107 | <encoder> |
| 108 | <pattern>${debugPattern}</pattern> |
| 109 | </encoder> |
| 110 | </appender> |
| 111 | |
| 112 | <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> |
| 113 | <queueSize>256</queueSize> |
| 114 | <appender-ref ref="EELFDebug" /> |
| 115 | <includeCallerData>true</includeCallerData> |
| 116 | </appender> |
| 117 | |
| 118 | <logger name="com.att.eelf.audit" level="info" additivity="false"> |
| 119 | <appender-ref ref="asyncEELFAudit" /> |
| 120 | </logger> |
| 121 | |
| 122 | <logger name="com.att.eelf.metrics" level="info" additivity="false"> |
| 123 | <appender-ref ref="asyncEELFMetrics" /> |
| 124 | </logger> |
| 125 | |
| 126 | <logger name="com.att.eelf.error" level="debug" additivity="false"> |
| 127 | <appender-ref ref="asyncEELFError" /> |
| 128 | </logger> |
| 129 | |
| 130 | <root level="INFO"> |
| 131 | <appender-ref ref="asyncEELFDebug" /> |
| 132 | </root> |
| 133 | |
| 134 | </configuration> |
| 135 | |