Benjamin, Max (mb388a) | 6ba0a22 | 2018-10-11 13:55:37 -0400 | [diff] [blame^] | 1 | <!-- ============LICENSE_START======================================================= |
| 2 | ECOMP MSO ================================================================================ |
| 3 | Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. ================================================================================ |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 5 | use this file except in compliance with the License. You may obtain a copy |
| 6 | of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required |
| 7 | by applicable law or agreed to in writing, software distributed under the |
| 8 | License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS |
| 9 | OF ANY KIND, either express or implied. See the License for the specific |
| 10 | language governing permissions and limitations under the License. ============LICENSE_END========================================================= --> |
| 11 | |
| 12 | <configuration scan="true" debug="false"> |
| 13 | <contextListener class="org.onap.so.logger.LoggerStartupListener" /> |
| 14 | <include resource="org/springframework/boot/logging/logback/base.xml" /> |
| 15 | |
| 16 | <property name="queueSize" value="256" /> |
| 17 | <property name="maxFileSize" value="200MB" /> |
| 18 | <property name="maxHistory" value="30" /> |
| 19 | <property name="totalSizeCap" value="10GB" /> |
| 20 | |
| 21 | <!-- log file names --> |
| 22 | <property name="errorLogName" value="error" /> |
| 23 | <property name="metricsLogName" value="metrics" /> |
| 24 | <property name="auditLogName" value="audit" /> |
| 25 | <property name="debugLogName" value="debug" /> |
| 26 | <property name="saneLogName" value="sane" /> |
| 27 | |
| 28 | <property name="errorPattern" |
| 29 | value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDesc}|%msg%n" /> |
| 30 | |
| 31 | <property name="debugPattern" |
| 32 | value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%msg%n" /> |
| 33 | |
| 34 | <property name="auditPattern" |
| 35 | 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" /> |
| 36 | |
| 37 | <property name="metricPattern" |
| 38 | 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" /> |
| 39 | |
| 40 | <property name="defaultPattern" |
| 41 | value="%nopexception%logger |
| 42 | \t%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} |
| 43 | \t%level |
| 44 | \t%replace(%replace(%message){'\t','\\\\t'}){'\n','\\\\n'} |
| 45 | \t%replace(%replace(%mdc){'\t','\\\\t'}){'\n','\\\\n'} |
| 46 | \t%replace(%replace(%rootException){'\t','\\\\t'}){'\n','\\\\n'} |
| 47 | \t%replace(%replace(%marker){'\t','\\\\t'}){'\n','\\\\n'} |
| 48 | \t%thread |
| 49 | \t%n" /> |
| 50 | |
| 51 | <appender name="SANE" |
| 52 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 53 | <file>${logs_dir:-.}/${saneLogName}.log</file> |
| 54 | <rollingPolicy |
| 55 | class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 56 | <fileNamePattern>${logs_dir:-.}/${saneLogName}.%d{yyyy-MM-dd}.%i.log.zip |
| 57 | </fileNamePattern> |
| 58 | |
| 59 | |
| 60 | <maxFileSize>${maxFileSize}</maxFileSize> |
| 61 | <maxHistory>${maxHistory}</maxHistory> |
| 62 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 63 | </rollingPolicy> |
| 64 | <encoder> |
| 65 | <pattern>${defaultPattern}</pattern> |
| 66 | </encoder> |
| 67 | </appender> |
| 68 | |
| 69 | <appender name="Audit" |
| 70 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 71 | <file>${logs_dir:-.}/${auditLogName}.log</file> |
| 72 | <rollingPolicy |
| 73 | class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 74 | <fileNamePattern>${logs_dir:-.}/${auditLogName}.%d{yyyy-MM-dd}.%i.log.zip |
| 75 | </fileNamePattern> |
| 76 | <maxFileSize>${maxFileSize}</maxFileSize> |
| 77 | <maxHistory>${maxHistory}</maxHistory> |
| 78 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 79 | </rollingPolicy> |
| 80 | <encoder> |
| 81 | <pattern>${auditPattern}</pattern> |
| 82 | </encoder> |
| 83 | </appender> |
| 84 | |
| 85 | <appender name="asyncAudit" class="ch.qos.logback.classic.AsyncAppender"> |
| 86 | <queueSize>256</queueSize> |
| 87 | <appender-ref ref="Audit" /> |
| 88 | </appender> |
| 89 | |
| 90 | <appender name="Metric" |
| 91 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 92 | <file>${logs_dir:-.}/${metricsLogName}.log</file> |
| 93 | <rollingPolicy |
| 94 | class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 95 | <fileNamePattern>${logs_dir:-.}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log.zip |
| 96 | </fileNamePattern> |
| 97 | <maxFileSize>${maxFileSize}</maxFileSize> |
| 98 | <maxHistory>${maxHistory}</maxHistory> |
| 99 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 100 | </rollingPolicy> |
| 101 | <encoder> |
| 102 | <pattern>${metricPattern}</pattern> |
| 103 | </encoder> |
| 104 | </appender> |
| 105 | |
| 106 | |
| 107 | <appender name="asyncMetric" class="ch.qos.logback.classic.AsyncAppender"> |
| 108 | <queueSize>256</queueSize> |
| 109 | <appender-ref ref="Metric" /> |
| 110 | </appender> |
| 111 | |
| 112 | <appender name="Error" |
| 113 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 114 | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| 115 | <level>ERROR</level> |
| 116 | <onMatch>ACCEPT</onMatch> |
| 117 | <onMismatch>DENY</onMismatch> |
| 118 | </filter> |
| 119 | <file>${logs_dir:-.}/${errorLogName}.log</file> |
| 120 | <rollingPolicy |
| 121 | class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 122 | <fileNamePattern>${logs_dir:-.}/${errorLogName}.%d{yyyy-MM-dd}.%i.log.zip |
| 123 | </fileNamePattern> |
| 124 | <maxFileSize>${maxFileSize}</maxFileSize> |
| 125 | <maxHistory>${maxHistory}</maxHistory> |
| 126 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 127 | </rollingPolicy> |
| 128 | <encoder> |
| 129 | <pattern>${errorPattern}</pattern> |
| 130 | </encoder> |
| 131 | </appender> |
| 132 | |
| 133 | <appender name="asyncError" class="ch.qos.logback.classic.AsyncAppender"> |
| 134 | <queueSize>256</queueSize> |
| 135 | <appender-ref ref="Error" /> |
| 136 | </appender> |
| 137 | |
| 138 | <appender name="Debug" |
| 139 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 140 | <file>${logs_dir:-.}/${debugLogName}.log</file> |
| 141 | <rollingPolicy |
| 142 | class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
| 143 | <fileNamePattern>${logs_dir:-.}/${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip |
| 144 | </fileNamePattern> |
| 145 | <maxFileSize>${maxFileSize}</maxFileSize> |
| 146 | <maxHistory>${maxHistory}</maxHistory> |
| 147 | <totalSizeCap>${totalSizeCap}</totalSizeCap> |
| 148 | </rollingPolicy> |
| 149 | <encoder> |
| 150 | <pattern>${debugPattern}</pattern> |
| 151 | </encoder> |
| 152 | </appender> |
| 153 | |
| 154 | <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender"> |
| 155 | <queueSize>256</queueSize> |
| 156 | <appender-ref ref="Debug" /> |
| 157 | <includeCallerData>true</includeCallerData> |
| 158 | </appender> |
| 159 | |
| 160 | <!-- Spring related loggers --> |
| 161 | <logger name="org.springframework" level="WARN" /> |
| 162 | |
| 163 | <!-- Camunda related loggers --> |
| 164 | <logger name="org.camunda.bpm.engine.jobexecutor.level" level="WARN" /> |
| 165 | <logger |
| 166 | name="org.camunda.bpm.engine.impl.persistence.entity.JobEntity.level" |
| 167 | level="WARN" /> |
| 168 | |
| 169 | <logger name="org.apache.wire" level="DEBUG" /> |
| 170 | <logger name="org.onap" level="DEBUG" /> |
| 171 | <logger name="com.att.ecomp" level="DEBUG" /> |
| 172 | <logger name="org.apache.cxf.interceptor" level="DEBUG" /> |
| 173 | |
| 174 | <logger name="AUDIT" level="INFO" additivity="false"> |
| 175 | <appender-ref ref="asyncAudit" /> |
| 176 | </logger> |
| 177 | |
| 178 | <logger name="METRIC" level="INFO" additivity="false"> |
| 179 | <appender-ref ref="asyncMetric" /> |
| 180 | </logger> |
| 181 | |
| 182 | <root level="WARN"> |
| 183 | <appender-ref ref="asyncDebug" /> |
| 184 | <appender-ref ref="SANE" /> |
| 185 | <appender-ref ref="asyncError" /> |
| 186 | </root> |
| 187 | |
| 188 | </configuration> |