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 | |
| 4 | <property scope="system" name="ECOMP-component-name" value="SDC" /> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 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="true" /> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 8 | |
| 9 | <!-- value used by pattern field list (| - is inter-field separator, || - unavailable or not applicable field value) (m - mandatory, o- optional)--> |
| 10 | <!--timestamp(m)| requestID(m)| serviceInstanceID(o)| threadID(m)| physicalServerName(o)| serviceName(m)| userID(m)| logLevel(m)| severity(o)| serverIpAddress(m)| serverName(m)| clientIpAddress(o)| className(m)| timer(o)| detailedMessage(o)--> |
| 11 | <property name="default-log-pattern" |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 12 | 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{InstanceUUID}|%level|%X{alarmSeverity}|%X{localAddr}|%X{ElapsedTime}|${beFqdn}|%X{remoteAddr}|%logger{35}|%X{timer}|ActivityType=<%M>, Desc=<%msg>%n" /> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 13 | |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 14 | <property name="error-log-pattern" |
| 15 | 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}|%msg|%n" /> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 16 | |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 17 | <property name="audit-log-pattern" value="%X{AuditBeginTimestamp}|%X{EndTimestamp}|%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{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|ActivityType=<%M>, Desc=<%msg>%n" /> |
| 18 | |
| 19 | <property name="metric-log-pattern" value="%X{MetricBeginTimestamp}|%X{EndTimestamp}|%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{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}|%X{ClassName}|%X{Unused}|%X{ProcessKey}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|ActivityType=<%M>, Desc=<%msg>%n" /> |
| 20 | |
| 21 | <property name="debug-log-pattern" value="%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%msg|^\n%n"/> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 22 | |
| 23 | <!-- All log --> |
| 24 | <if condition='property("enable-all-log").equalsIgnoreCase("true")'> |
| 25 | <then> |
| 26 | <appender name="ALL_ROLLING" |
| 27 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 28 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log |
| 29 | </file> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 30 | |
| 31 | <rollingPolicy |
| 32 | class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 33 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log.%i |
| 34 | </fileNamePattern> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 35 | <minIndex>1</minIndex> |
| 36 | <maxIndex>10</maxIndex> |
| 37 | </rollingPolicy> |
| 38 | |
| 39 | <triggeringPolicy |
| 40 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 41 | <maxFileSize>20MB</maxFileSize> |
| 42 | </triggeringPolicy> |
| 43 | <encoder> |
| 44 | <pattern>${default-log-pattern}</pattern> |
| 45 | </encoder> |
| 46 | </appender> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 47 | |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 48 | <appender name="ASYNC_ALL" class="ch.qos.logback.classic.AsyncAppender"> |
| 49 | <appender-ref ref="ALL_ROLLING" /> |
| 50 | </appender> |
| 51 | </then> |
| 52 | </if> |
| 53 | |
| 54 | <!-- Error log --> |
| 55 | <appender name="ERROR_ROLLING" |
| 56 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 57 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log |
| 58 | </file> |
| 59 | |
| 60 | <!-- Audit messages filter - deny audit messages --> |
| 61 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 62 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 63 | <marker>AUDIT_MARKER</marker> |
| 64 | </evaluator> |
| 65 | <onMismatch>NEUTRAL</onMismatch> |
| 66 | <onMatch>DENY</onMatch> |
| 67 | </filter> |
| 68 | |
| 69 | <!-- Transaction messages filter - deny Transaction messages --> |
| 70 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 71 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 72 | <marker>TRANSACTION_MARKER</marker> |
| 73 | </evaluator> |
| 74 | <onMismatch>NEUTRAL</onMismatch> |
| 75 | <onMatch>DENY</onMatch> |
| 76 | </filter> |
| 77 | |
| 78 | <!-- deny all events with a level below INFO, that is TRACE and DEBUG --> |
| 79 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 80 | <level>INFO</level> |
| 81 | </filter> |
| 82 | |
| 83 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 84 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log.%i |
| 85 | </fileNamePattern> |
| 86 | <minIndex>1</minIndex> |
| 87 | <maxIndex>10</maxIndex> |
| 88 | </rollingPolicy> |
| 89 | |
| 90 | <triggeringPolicy |
| 91 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 92 | <maxFileSize>20MB</maxFileSize> |
| 93 | </triggeringPolicy> |
| 94 | <encoder> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 95 | <pattern>${error-log-pattern}</pattern> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 96 | </encoder> |
| 97 | </appender> |
| 98 | |
| 99 | <!-- Debug log --> |
| 100 | <appender name="DEBUG_ROLLING" |
| 101 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 102 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log |
| 103 | </file> |
| 104 | |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 105 | <!-- No need to deny audit messages - they are INFO only, will be denied |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 106 | anyway --> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 107 | <!-- Transaction messages filter - deny Transaction messages, there are |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 108 | some DEBUG level messages among them --> |
| 109 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 110 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 111 | <marker>TRANSACTION_MARKER</marker> |
| 112 | </evaluator> |
| 113 | <onMismatch>NEUTRAL</onMismatch> |
| 114 | <onMatch>DENY</onMatch> |
| 115 | </filter> |
| 116 | |
| 117 | <!-- accept DEBUG and TRACE level --> |
| 118 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 119 | <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> |
| 120 | <expression> |
| 121 | e.level.toInt() <= DEBUG.toInt() |
| 122 | </expression> |
| 123 | </evaluator> |
| 124 | <OnMismatch>DENY</OnMismatch> |
| 125 | <!--<OnMatch>NEUTRAL</OnMatch>--> |
| 126 | <OnMatch>ACCEPT</OnMatch> |
| 127 | </filter> |
| 128 | |
| 129 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 130 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log.%i |
| 131 | </fileNamePattern> |
| 132 | <minIndex>1</minIndex> |
| 133 | <maxIndex>10</maxIndex> |
| 134 | </rollingPolicy> |
| 135 | |
| 136 | <triggeringPolicy |
| 137 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 138 | <maxFileSize>20MB</maxFileSize> |
| 139 | </triggeringPolicy> |
| 140 | <encoder> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 141 | <pattern>${debug-log-pattern}</pattern> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 142 | </encoder> |
| 143 | </appender> |
| 144 | |
| 145 | |
| 146 | <!-- ASDC debug by package--> |
| 147 | <appender name="PACKAGE_DEBUG_ROLLING" |
| 148 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 149 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug_by_package.log |
| 150 | </file> |
| 151 | |
| 152 | <!-- No need to deny audit messages - they are INFO only, will be denied |
| 153 | anyway --> |
| 154 | <!-- Transaction messages filter - deny Transaction messages, there are |
| 155 | some DEBUG level messages among them --> |
| 156 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 157 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 158 | <marker>TRANSACTION_MARKER</marker> |
| 159 | </evaluator> |
| 160 | <onMismatch>NEUTRAL</onMismatch> |
| 161 | <onMatch>DENY</onMatch> |
| 162 | </filter> |
| 163 | |
| 164 | <!-- accept DEBUG and TRACE level --> |
| 165 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 166 | <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> |
| 167 | <expression> |
| 168 | e.level.toInt() <= DEBUG.toInt() |
| 169 | </expression> |
| 170 | </evaluator> |
| 171 | <OnMismatch>DENY</OnMismatch> |
| 172 | <OnMatch>NEUTRAL</OnMatch> |
| 173 | </filter> |
| 174 | |
| 175 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 176 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug_by_package.log.%i |
| 177 | </fileNamePattern> |
| 178 | <minIndex>1</minIndex> |
| 179 | <maxIndex>10</maxIndex> |
| 180 | </rollingPolicy> |
| 181 | |
| 182 | <triggeringPolicy |
| 183 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 184 | <maxFileSize>20MB</maxFileSize> |
| 185 | </triggeringPolicy> |
| 186 | <encoder> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 187 | <pattern>${debug-log-pattern}</pattern> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 188 | </encoder> |
| 189 | </appender> |
| 190 | |
| 191 | <!-- Audit log --> |
| 192 | <appender name="AUDIT_ROLLING" |
| 193 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 194 | |
| 195 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log |
| 196 | </file> |
| 197 | |
| 198 | <!-- Audit messages filter - accept audit messages --> |
| 199 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 200 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 201 | <marker>AUDIT_MARKER</marker> |
| 202 | <marker>AUDIT</marker> |
| 203 | </evaluator> |
| 204 | <onMismatch>DENY</onMismatch> |
| 205 | <onMatch>ACCEPT</onMatch> |
| 206 | </filter> |
| 207 | |
| 208 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 209 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log.%i |
| 210 | </fileNamePattern> |
| 211 | <minIndex>1</minIndex> |
| 212 | <maxIndex>10</maxIndex> |
| 213 | </rollingPolicy> |
| 214 | |
| 215 | <triggeringPolicy |
| 216 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 217 | <maxFileSize>20MB</maxFileSize> |
| 218 | </triggeringPolicy> |
| 219 | <encoder> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 220 | <pattern>${audit-log-pattern}</pattern> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 221 | </encoder> |
| 222 | </appender> |
| 223 | |
| 224 | <!-- Metrics log --> |
| 225 | <appender name="METRICS_ROLLING" |
| 226 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 227 | |
| 228 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/metrics.log |
| 229 | </file> |
| 230 | |
| 231 | <!-- Metric messages filter - accept metric messages --> |
| 232 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 233 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 234 | <marker>METRICS</marker> |
| 235 | </evaluator> |
| 236 | <onMismatch>DENY</onMismatch> |
| 237 | <onMatch>ACCEPT</onMatch> |
| 238 | </filter> |
| 239 | |
| 240 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 241 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/metrics.log.%i |
| 242 | </fileNamePattern> |
| 243 | <minIndex>1</minIndex> |
| 244 | <maxIndex>10</maxIndex> |
| 245 | </rollingPolicy> |
| 246 | |
| 247 | <triggeringPolicy |
| 248 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 249 | <maxFileSize>20MB</maxFileSize> |
| 250 | </triggeringPolicy> |
| 251 | <encoder> |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 252 | <pattern>${metric-log-pattern}</pattern> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 253 | </encoder> |
| 254 | </appender> |
| 255 | |
| 256 | <!-- SdncTransaction log --> |
| 257 | <appender name="TRANSACTION_ROLLING" |
| 258 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 259 | |
| 260 | <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.log |
| 261 | </file> |
| 262 | |
| 263 | <!-- Transaction messages filter - accept audit messages --> |
| 264 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 265 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 266 | <marker>TRANSACTION_MARKER</marker> |
| 267 | </evaluator> |
| 268 | <onMismatch>DENY</onMismatch> |
| 269 | <onMatch>ACCEPT</onMatch> |
| 270 | </filter> |
| 271 | |
| 272 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 273 | <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.log.%i |
| 274 | </fileNamePattern> |
| 275 | <minIndex>1</minIndex> |
| 276 | <maxIndex>10</maxIndex> |
| 277 | </rollingPolicy> |
| 278 | |
| 279 | <triggeringPolicy |
| 280 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 281 | <maxFileSize>20MB</maxFileSize> |
| 282 | </triggeringPolicy> |
| 283 | <encoder> |
| 284 | <pattern>${default-log-pattern}</pattern> |
| 285 | </encoder> |
| 286 | </appender> |
| 287 | |
| 288 | <!-- Asynchronicity Configurations --> |
| 289 | <appender name="ASYNC_DEBUG" class="ch.qos.logback.classic.AsyncAppender"> |
| 290 | <appender-ref ref="DEBUG_ROLLING" /> |
| 291 | </appender> |
| 292 | |
| 293 | <appender name="ASYNC_TRANSACTION" class="ch.qos.logback.classic.AsyncAppender"> |
| 294 | <appender-ref ref="TRANSACTION_ROLLING" /> |
| 295 | </appender> |
| 296 | |
| 297 | <appender name="ASYNC_ERROR" class="ch.qos.logback.classic.AsyncAppender"> |
| 298 | <appender-ref ref="ERROR_ROLLING" /> |
| 299 | </appender> |
| 300 | |
| 301 | <!-- <appender name="DISPATCHER" class="ch.qos.logback.classic.sift.SiftingAppender"> |
| 302 | <discriminator class="org.openecomp.core.logging.logback.EventTypeDiscriminator"/> |
| 303 | <sift> |
| 304 | <appender name="Audit" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 305 | <file>${logDirectory}/audit.log</file> |
| 306 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 307 | <fileNamePattern>${logDirectory}/audit.%i.log.zip</fileNamePattern> |
| 308 | <minIndex>1</minIndex> |
| 309 | <maxIndex>9</maxIndex> |
| 310 | </rollingPolicy> |
| 311 | <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 312 | <maxFileSize>5MB</maxFileSize> |
| 313 | </triggeringPolicy> |
| 314 | <encoder> |
| 315 | <pattern>${default-log-pattern}</pattern> |
| 316 | </encoder> |
| 317 | </appender> |
| 318 | </sift> |
| 319 | </appender>--> |
| 320 | |
| 321 | <root level="INFO"> |
| 322 | <appender-ref ref="ASYNC_ERROR" /> |
| 323 | <appender-ref ref="ASYNC_DEBUG" /> |
| 324 | <appender-ref ref="AUDIT_ROLLING" /> |
| 325 | <appender-ref ref="ASYNC_TRANSACTION" /> |
| 326 | <appender-ref ref="METRICS_ROLLING" /> |
| 327 | <if condition='property("enable-all-log").equalsIgnoreCase("true")'> |
| 328 | <then> |
| 329 | <appender-ref ref="ALL_ROLLING" /> |
| 330 | </then> |
| 331 | </if> |
| 332 | </root> |
| 333 | |
Michael Lando | 5b59349 | 2018-07-29 16:13:45 +0300 | [diff] [blame] | 334 | <logger name="org.openecomp.sdc" level="DEBUG" /> |
Avi Ziv | c175a0d | 2018-03-15 13:21:44 +0200 | [diff] [blame] | 335 | </configuration> |