sheetalm | 450c94f | 2018-04-04 15:06:18 +0530 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | |
| 3 | <!-- |
| 4 | ~ Copyright © 2016-2018 European Support Limited |
| 5 | ~ |
| 6 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | ~ you may not use this file except in compliance with the License. |
| 8 | ~ You may obtain a copy of the License at |
| 9 | ~ |
| 10 | ~ http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | ~ |
| 12 | ~ Unless required by applicable law or agreed to in writing, software |
| 13 | ~ distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | ~ See the License for the specific language governing permissions and |
| 16 | ~ limitations under the License. |
| 17 | --> |
| 18 | |
| 19 | <configuration scan="true" scanPeriod="5 seconds"> |
| 20 | <property scope="system" name="ONAP-component-name" value="activity-spec" /> |
| 21 | <property scope="system" name="ONAP-subcomponent-name" value="be" /> |
| 22 | <property name="log.home" value="/var/log/ONAP" /> |
| 23 | <property name="log.location" value="${log.home}/${ONAP-component-name}/${ONAP-subcomponent-name}"/> |
| 24 | |
| 25 | <!-- Error log --> |
| 26 | <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 27 | |
| 28 | <file>${log.location}/error.log</file> |
| 29 | |
| 30 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 31 | <level>INFO</level> |
| 32 | </filter> |
| 33 | |
| 34 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 35 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 36 | <marker>AUDIT</marker> |
| 37 | </evaluator> |
| 38 | <onMismatch>NEUTRAL</onMismatch> |
| 39 | <onMatch>DENY</onMatch> |
| 40 | </filter> |
| 41 | |
| 42 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 43 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 44 | <marker>METRICS</marker> |
| 45 | </evaluator> |
| 46 | <onMismatch>NEUTRAL</onMismatch> |
| 47 | <onMatch>DENY</onMatch> |
| 48 | </filter> |
| 49 | |
| 50 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 51 | <fileNamePattern>${log.location}/error.log.%i |
| 52 | </fileNamePattern> |
| 53 | <minIndex>1</minIndex> |
| 54 | <maxIndex>10</maxIndex> |
| 55 | </rollingPolicy> |
| 56 | |
| 57 | <triggeringPolicy |
| 58 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 59 | <maxFileSize>20MB</maxFileSize> |
| 60 | </triggeringPolicy> |
| 61 | |
| 62 | <encoder> |
| 63 | <pattern> |
| 64 | %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%level||%X{ErrorCode}|%X{ErrorDescription}|%msg%n |
| 65 | </pattern> |
| 66 | </encoder> |
| 67 | </appender> |
| 68 | |
| 69 | |
| 70 | <appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 71 | |
| 72 | <file>${log.location}/debug.log</file> |
| 73 | |
| 74 | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| 75 | <level>DEBUG</level> |
| 76 | <onMatch>ACCEPT</onMatch> |
| 77 | <onMismatch>DENY</onMismatch> |
| 78 | </filter> |
| 79 | |
| 80 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 81 | <fileNamePattern>${log.location}/debug.log.%i |
| 82 | </fileNamePattern> |
| 83 | <minIndex>1</minIndex> |
| 84 | <maxIndex>10</maxIndex> |
| 85 | </rollingPolicy> |
| 86 | |
| 87 | <triggeringPolicy |
| 88 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 89 | <maxFileSize>20MB</maxFileSize> |
| 90 | </triggeringPolicy> |
| 91 | |
| 92 | <encoder> |
| 93 | <pattern> |
| 94 | %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%msg%n |
| 95 | </pattern> |
| 96 | </encoder> |
| 97 | </appender> |
| 98 | |
| 99 | <!-- Asynchronicity Configurations --> |
| 100 | <appender name="ASYNC_DEBUG" class="ch.qos.logback.classic.AsyncAppender"> |
| 101 | <appender-ref ref="DEBUG" /> |
| 102 | </appender> |
| 103 | |
| 104 | <appender name="AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 105 | |
| 106 | <file>${log.location}/audit.log</file> |
| 107 | |
| 108 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 109 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 110 | <marker>AUDIT</marker> |
| 111 | </evaluator> |
| 112 | <onMismatch>DENY</onMismatch> |
| 113 | <onMatch>ACCEPT</onMatch> |
| 114 | </filter> |
| 115 | |
| 116 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 117 | <fileNamePattern>${log.location}/audit.log.%i |
| 118 | </fileNamePattern> |
| 119 | <minIndex>1</minIndex> |
| 120 | <maxIndex>10</maxIndex> |
| 121 | </rollingPolicy> |
| 122 | |
| 123 | <triggeringPolicy |
| 124 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 125 | <maxFileSize>20MB</maxFileSize> |
| 126 | </triggeringPolicy> |
| 127 | |
| 128 | <encoder> |
| 129 | <pattern> |
| 130 | %X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceId}|%level||%X{ServerIpAddress}|%X{ElapsedTime}|%X{Server}|%X{ClientIpAddress}||||||||%msg%n |
| 131 | </pattern> |
| 132 | </encoder> |
| 133 | </appender> |
| 134 | |
| 135 | <appender name="METRICS" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 136 | |
| 137 | <file>${log.location}/metrics.log</file> |
| 138 | |
| 139 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 140 | <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> |
| 141 | <marker>METRICS</marker> |
| 142 | </evaluator> |
| 143 | <onMismatch>DENY</onMismatch> |
| 144 | <onMatch>ACCEPT</onMatch> |
| 145 | </filter> |
| 146 | |
| 147 | <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> |
| 148 | <fileNamePattern>${log.location}/metrics.log.%i |
| 149 | </fileNamePattern> |
| 150 | <minIndex>1</minIndex> |
| 151 | <maxIndex>10</maxIndex> |
| 152 | </rollingPolicy> |
| 153 | |
| 154 | <triggeringPolicy |
| 155 | class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> |
| 156 | <maxFileSize>20MB</maxFileSize> |
| 157 | </triggeringPolicy> |
| 158 | |
| 159 | <encoder> |
| 160 | <pattern> |
| 161 | %X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceId}|%level||%X{ServerIpAddress}|%X{ElapsedTime}|%X{Server}|%X{ClientIpAddress}||||||||||%msg%n |
| 162 | </pattern> |
| 163 | </encoder> |
| 164 | </appender> |
| 165 | |
| 166 | <root level="INFO"> |
| 167 | <appender-ref ref="ERROR"/> |
| 168 | <appender-ref ref="ASYNC_DEBUG"/> |
| 169 | <appender-ref ref="AUDIT"/> |
| 170 | <appender-ref ref="METRICS"/> |
| 171 | </root> |
| 172 | |
| 173 | </configuration> |