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