Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <configuration scan="true" scanPeriod="5 seconds"> |
| 3 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 4 | <property scope="system" name="ECOMP-component-name" value="SDC"/> |
| 5 | <property scope="system" name="ECOMP-subcomponent-name" value="SDC-BE"/> |
| 6 | <property file="${config.home}/catalog-be/configuration.yaml"/> |
| 7 | <property scope="context" name="enable-all-log" value="false"/> |
| 8 | <property name="p_msg" value="%replace(%replace(%replace(%replace(%msg){'\t','\\\\t'}){'\n', '\\\\n'}){'\\\|', '-'}){'\r','\\\\r'}"/> |
| 9 | <property name="p_ex" value="%replace(%replace(%replace(%replace(%exception{full}){'\t','\\\\t'}){'\n', '\\\\n'}){'\\\|', '-'}){'\r','\\\\r'}"/> |
| 10 | <property name="p_debugInfo" value="%replace(%replace(%replace(%replace(%thread#%level#%logger{35}#%msg){'\t','\\\\t'}){'\n', '\\\\n'}){'\\\|', '-'}){'\r','\\\\r'}"/> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 11 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 12 | <property name="all-log-pattern" |
| 13 | value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{BeginTimestamp}|%X{EndTimestamp}|%X{uuid}|%X{serviceInstanceID}|%thread|%X{ServerName}|%X{ServiceName}|${ECOMP-subcomponent-name}|%X{userId}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceID}|%level|%X{alarmSeverity}|%X{localAddr}|%X{ElapsedTime}|${beFqdn}|%X{remoteAddr}|%logger{35}|%X{timer}|ActivityType=<%M>, Desc=<${p_msg}>%n"/> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 14 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 15 | <property name="debug-log-pattern" |
| 16 | value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|${p_debugInfo} ${p_ex}|^\n%n%nopex"/> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 17 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 18 | <property name="error-log-pattern" |
| 19 | value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{ErrorCategory}|%X{ErrorCode}|${p_msg} ${p_ex}|%n%nopex"/> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 20 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 21 | <property name="audit-log-pattern" |
| 22 | value="%X{EntryTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%logger{35}|%X{Unused}|%X{ProcessKey}|%marker|InvocationID=%X{InvocationID}|%X{CustomField3}|%X{CustomField4}|ActivityType=<%M>, Desc=<${p_msg}>%n"/> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 23 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 24 | <property name="metric-log-pattern" |
| 25 | value="%X{InvokeTimestamp}|%X{EndTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|||%X{ClassName}|%X{Unused}|%X{ProcessKey}|%marker|InvocationID=%X{OutgoingInvocationId}|%X{CustomField3}|%X{CustomField4}|ActivityType=<%M>, Desc=<%msg>%n" /> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 26 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 27 | <property name="supportability-log-pattern" |
| 28 | value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{SupportablityComponentName}|%X{SupportablityAction}|%thread|%X{SupportablityComponentUUID}|%X{SupportablityStatus}|ActivityType=<%M>, Desc=<${p_msg}>%n"/> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 29 | |
| 30 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 31 | <!-- All log --> |
| 32 | <if condition='property("enable-all-log").equalsIgnoreCase("true")'> |
| 33 | <then> |
| 34 | <appender name="ALL_ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 35 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log</file> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 36 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 37 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 38 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log.%i |
| 39 | </fileNamePattern> |
| 40 | <minIndex>1</minIndex> |
| 41 | <maxIndex>10</maxIndex> |
| 42 | </rollingPolicy> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 43 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 44 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 45 | <maxFileSize>20MB</maxFileSize> |
| 46 | </triggeringPolicy> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 47 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 48 | <encoder> |
| 49 | <pattern>${all-log-pattern}</pattern> |
| 50 | </encoder> |
| 51 | </appender> |
| 52 | </then> |
| 53 | </if> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 54 | |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 55 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 56 | <!-- Debug log --> |
| 57 | <appender name="DEBUG_ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 58 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log</file> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 59 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 60 | <!-- Audit and Metric messages filter - deny audit and metric messages --> |
| 61 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 62 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 63 | <marker>ENTRY</marker> |
| 64 | <marker>EXIT</marker> |
| 65 | <marker>INVOKE</marker> |
| 66 | <marker>INVOKE-RETURN</marker> |
| 67 | <marker>INVOKE-SYNCHRONOUS</marker> |
| 68 | </evaluator> |
| 69 | <onMismatch>NEUTRAL</onMismatch> |
| 70 | <onMatch>DENY</onMatch> |
| 71 | </filter> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 72 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 73 | <!-- accept INFO, DEBUG and TRACE level --> |
| 74 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 75 | <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> |
| 76 | <expression> |
| 77 | e.level.toInt() <= INFO.toInt() |
| 78 | </expression> |
| 79 | </evaluator> |
| 80 | <OnMismatch>DENY</OnMismatch> |
| 81 | <OnMatch>ACCEPT</OnMatch> |
| 82 | </filter> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 83 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 84 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 85 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log.%i |
| 86 | </fileNamePattern> |
| 87 | <minIndex>1</minIndex> |
| 88 | <maxIndex>10</maxIndex> |
| 89 | </rollingPolicy> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 90 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 91 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 92 | <maxFileSize>20MB</maxFileSize> |
| 93 | </triggeringPolicy> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 94 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 95 | <encoder> |
| 96 | <pattern>${debug-log-pattern}</pattern> |
| 97 | </encoder> |
| 98 | </appender> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 99 | |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 100 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 101 | <!-- Error log --> |
| 102 | <appender name="ERROR_ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 103 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log</file> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 104 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 105 | <!-- deny all events with a level below WARN, that is INFO TRACE and DEBUG --> |
| 106 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 107 | <level>WARN</level> |
| 108 | </filter> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 109 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 110 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 111 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log.%i |
| 112 | </fileNamePattern> |
| 113 | <minIndex>1</minIndex> |
| 114 | <maxIndex>10</maxIndex> |
| 115 | </rollingPolicy> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 116 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 117 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 118 | <maxFileSize>20MB</maxFileSize> |
| 119 | </triggeringPolicy> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 120 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 121 | <encoder> |
| 122 | <pattern>${error-log-pattern}</pattern> |
| 123 | </encoder> |
| 124 | </appender> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 125 | |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 126 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 127 | <!-- Audit log --> |
| 128 | <appender name="AUDIT_ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 129 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log</file> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 130 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 131 | <!-- Audit messages filter - accept audit messages --> |
| 132 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 133 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 134 | <marker>ENTRY</marker> |
| 135 | <marker>EXIT</marker> |
| 136 | </evaluator> |
| 137 | <onMismatch>DENY</onMismatch> |
| 138 | <onMatch>ACCEPT</onMatch> |
| 139 | </filter> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 140 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 141 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 142 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log.%i |
| 143 | </fileNamePattern> |
| 144 | <minIndex>1</minIndex> |
| 145 | <maxIndex>10</maxIndex> |
| 146 | </rollingPolicy> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 147 | |
ys9693 | 16a9fce | 2020-01-19 13:50:02 +0200 | [diff] [blame] | 148 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 149 | <maxFileSize>20MB</maxFileSize> |
| 150 | </triggeringPolicy> |
| 151 | |
| 152 | <encoder> |
| 153 | <pattern>${audit-log-pattern}</pattern> |
| 154 | </encoder> |
| 155 | </appender> |
| 156 | |
| 157 | |
| 158 | <!-- Metrics log --> |
| 159 | <appender name="METRICS_ROLLING" |
| 160 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 161 | |
| 162 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/metrics.log |
| 163 | </file> |
| 164 | |
| 165 | <!-- Metric messages filter - accept metric messages --> |
| 166 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 167 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 168 | <marker>INVOKE</marker> |
| 169 | <marker>INVOKE-RETURN</marker> |
| 170 | <marker>INVOKE-SYNCHRONOUS</marker> |
| 171 | </evaluator> |
| 172 | <onMismatch>DENY</onMismatch> |
| 173 | <onMatch>ACCEPT</onMatch> |
| 174 | </filter> |
| 175 | |
| 176 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 177 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/metrics.log.%i |
| 178 | </fileNamePattern> |
| 179 | <minIndex>1</minIndex> |
| 180 | <maxIndex>10</maxIndex> |
| 181 | </rollingPolicy> |
| 182 | |
| 183 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 184 | <maxFileSize>20MB</maxFileSize> |
| 185 | </triggeringPolicy> |
| 186 | |
| 187 | <encoder> |
| 188 | <pattern>${metric-log-pattern}</pattern> |
| 189 | </encoder> |
| 190 | </appender> |
| 191 | |
| 192 | |
| 193 | <!-- Supporability log --> |
| 194 | <appender name="SUPPORTABILITY_ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 195 | |
| 196 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/supportability.log</file> |
| 197 | |
| 198 | <!-- Supporability messages filter - accept suppportability messages --> |
| 199 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 200 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 201 | <marker>SUPPORTABILITY_MARKER</marker> |
| 202 | </evaluator> |
| 203 | <onMismatch>DENY</onMismatch> |
| 204 | <onMatch>ACCEPT</onMatch> |
| 205 | </filter> |
| 206 | |
| 207 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 208 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/supportability.log.%i |
| 209 | </fileNamePattern> |
| 210 | <minIndex>1</minIndex> |
| 211 | <maxIndex>10</maxIndex> |
| 212 | </rollingPolicy> |
| 213 | |
| 214 | <triggeringPolicy |
| 215 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 216 | <maxFileSize>20MB</maxFileSize> |
| 217 | </triggeringPolicy> |
| 218 | |
| 219 | <encoder> |
| 220 | <pattern>${supportability-log-pattern}</pattern> |
| 221 | </encoder> |
| 222 | </appender> |
| 223 | |
| 224 | |
| 225 | <!-- Asynchronicity Configurations --> |
| 226 | <appender name="ASYNC_DEBUG" class="ch.qos.logback.classic.AsyncAppender"> |
| 227 | <appender-ref ref="DEBUG_ROLLING"/> |
| 228 | </appender> |
| 229 | |
| 230 | <appender name="ASYNC_ERROR" class="ch.qos.logback.classic.AsyncAppender"> |
| 231 | <appender-ref ref="ERROR_ROLLING"/> |
| 232 | </appender> |
| 233 | |
| 234 | <appender name="ASYNC_ALL" class="ch.qos.logback.classic.AsyncAppender"> |
| 235 | <appender-ref ref="ALL_ROLLING"/> |
| 236 | </appender> |
| 237 | |
| 238 | |
| 239 | <root level="INFO"> |
| 240 | <appender-ref ref="ASYNC_DEBUG"/> |
| 241 | <appender-ref ref="ASYNC_ERROR"/> |
| 242 | <appender-ref ref="AUDIT_ROLLING"/> |
| 243 | <appender-ref ref="METRICS_ROLLING"/> |
| 244 | <appender-ref ref="SUPPORTABILITY_ROLLING"/> |
| 245 | <if condition='property("enable-all-log").equalsIgnoreCase("true")'> |
| 246 | <then> |
| 247 | <appender-ref ref="ASYNC_ALL"/> |
| 248 | </then> |
| 249 | </if> |
| 250 | </root> |
| 251 | |
| 252 | <logger name="org.openecomp.sdc" level="INFO"/> |
| 253 | </configuration> |