Harish Venkata Kajur | cd0d698 | 2019-02-12 23:56:51 -0500 | [diff] [blame] | 1 | <configuration scan="true" scanPeriod="60 seconds" debug="false"> |
| 2 | <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> |
| 3 | <property resource="application.properties" /> |
| 4 | <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> |
| 5 | <jmxConfigurator /> |
| 6 | <property name="logDirectory" value="${AJSC_HOME}/logs" /> |
| 7 | <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> |
| 8 | <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> |
| 9 | <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> |
| 10 | <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> --> |
| 11 | <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> |
| 12 | <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/> |
| 13 | <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> |
| 14 | <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> |
| 15 | <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> |
| 16 | <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
| 17 | <encoder> |
| 18 | <pattern> |
| 19 | %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} |
| 20 | </pattern> |
| 21 | </encoder> |
| 22 | </appender> |
| 23 | <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 24 | <file>${logDirectory}/rest/sane.log</file> |
| 25 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 26 | <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern> |
| 27 | </rollingPolicy> |
| 28 | <encoder> |
| 29 | <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n |
| 30 | </pattern> |
| 31 | </encoder> |
| 32 | </appender> |
| 33 | <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender"> |
| 34 | <queueSize>1000</queueSize> |
| 35 | <includeCallerData>true</includeCallerData> |
| 36 | <appender-ref ref="SANE" /> |
| 37 | </appender> |
| 38 | <appender name="METRIC" |
| 39 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 40 | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| 41 | <level>INFO</level> |
| 42 | <onMatch>ACCEPT</onMatch> |
| 43 | <onMismatch>DENY</onMismatch> |
| 44 | </filter> |
| 45 | <file>${logDirectory}/rest/metrics.log</file> |
| 46 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 47 | <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} |
| 48 | </fileNamePattern> |
| 49 | </rollingPolicy> |
| 50 | <encoder class="org.onap.aai.logging.EcompEncoder"> |
| 51 | <pattern>${eelfMetricLogPattern}</pattern> |
| 52 | </encoder> |
| 53 | </appender> |
| 54 | <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> |
| 55 | <queueSize>1000</queueSize> |
| 56 | <includeCallerData>true</includeCallerData> |
| 57 | <appender-ref ref="METRIC" /> |
| 58 | </appender> |
| 59 | <appender name="DEBUG" |
| 60 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 61 | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| 62 | <level>DEBUG</level> |
| 63 | <onMatch>ACCEPT</onMatch> |
| 64 | <onMismatch>DENY</onMismatch> |
| 65 | </filter> |
| 66 | <file>${logDirectory}/rest/debug.log</file> |
| 67 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 68 | <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} |
| 69 | </fileNamePattern> |
| 70 | </rollingPolicy> |
| 71 | <encoder class="org.onap.aai.logging.EcompEncoder"> |
| 72 | <pattern>${eelfLogPattern}</pattern> |
| 73 | </encoder> |
| 74 | </appender> |
| 75 | <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> |
| 76 | <queueSize>1000</queueSize> |
| 77 | <includeCallerData>true</includeCallerData> |
| 78 | <appender-ref ref="DEBUG" /> |
| 79 | </appender> |
| 80 | <appender name="ERROR" |
| 81 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 82 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 83 | <level>WARN</level> |
| 84 | </filter> |
| 85 | <file>${logDirectory}/rest/error.log</file> |
| 86 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 87 | <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd} |
| 88 | </fileNamePattern> |
| 89 | </rollingPolicy> |
| 90 | <encoder class="org.onap.aai.logging.EcompEncoder"> |
| 91 | <pattern>${eelfErrorLogPattern}</pattern> |
| 92 | </encoder> |
| 93 | </appender> |
| 94 | <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> |
| 95 | <queueSize>1000</queueSize> |
| 96 | <includeCallerData>true</includeCallerData> |
| 97 | <appender-ref ref="ERROR" /> |
| 98 | </appender> |
| 99 | <appender name="AUDIT" |
| 100 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 101 | <file>${logDirectory}/rest/audit.log</file> |
| 102 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 103 | <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} |
| 104 | </fileNamePattern> |
| 105 | </rollingPolicy> |
| 106 | <encoder class="org.onap.aai.logging.EcompEncoder"> |
| 107 | <pattern>${eelfAuditLogPattern}</pattern> |
| 108 | </encoder> |
| 109 | </appender> |
| 110 | <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> |
| 111 | <queueSize>1000</queueSize> |
| 112 | <includeCallerData>true</includeCallerData> |
| 113 | <appender-ref ref="AUDIT" /> |
| 114 | </appender> |
| 115 | <appender name="translog" |
| 116 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 117 | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| 118 | <level>DEBUG</level> |
| 119 | <onMatch>ACCEPT</onMatch> |
| 120 | <onMismatch>DENY</onMismatch> |
| 121 | </filter> |
| 122 | <file>${logDirectory}/rest/translog.log</file> |
| 123 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 124 | <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} |
| 125 | </fileNamePattern> |
| 126 | </rollingPolicy> |
| 127 | <encoder class="org.onap.aai.logging.EcompEncoder"> |
| 128 | <pattern>${eelfTransLogPattern}</pattern> |
| 129 | </encoder> |
| 130 | </appender> |
| 131 | <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender"> |
| 132 | <queueSize>1000</queueSize> |
| 133 | <includeCallerData>true</includeCallerData> |
| 134 | <appender-ref ref="translog" /> |
| 135 | </appender> |
| 136 | <appender name="dmaapAAIEventConsumer" |
| 137 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 138 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 139 | <level>WARN</level> |
| 140 | </filter> |
| 141 | <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File> |
| 142 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 143 | <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} |
| 144 | </fileNamePattern> |
| 145 | </rollingPolicy> |
| 146 | <encoder class="org.onap.aai.logging.EcompEncoder"> |
| 147 | <pattern>${eelfLogPattern}</pattern> |
| 148 | </encoder> |
| 149 | </appender> |
| 150 | <appender name="dmaapAAIEventConsumerDebug" |
| 151 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 152 | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| 153 | <level>DEBUG</level> |
| 154 | <onMatch>ACCEPT</onMatch> |
| 155 | <onMismatch>DENY</onMismatch> |
| 156 | </filter> |
| 157 | <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File> |
| 158 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 159 | <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} |
| 160 | </fileNamePattern> |
| 161 | </rollingPolicy> |
| 162 | <encoder class="org.onap.aai.logging.EcompEncoder"> |
| 163 | <pattern>${eelfLogPattern}</pattern> |
| 164 | </encoder> |
| 165 | </appender> |
| 166 | <appender name="dmaapAAIEventConsumerMetric" |
| 167 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 168 | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| 169 | <level>INFO</level> |
| 170 | <onMatch>ACCEPT</onMatch> |
| 171 | <onMismatch>DENY</onMismatch> |
| 172 | </filter> |
| 173 | <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File> |
| 174 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 175 | <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} |
| 176 | </fileNamePattern> |
| 177 | </rollingPolicy> |
| 178 | <encoder class="org.onap.aai.logging.EcompEncoder"> |
| 179 | <pattern>${eelfMetricLogPattern}</pattern> |
| 180 | </encoder> |
| 181 | </appender> |
| 182 | <appender name="external" |
| 183 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 184 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 185 | <level>WARN</level> |
| 186 | </filter> |
| 187 | <file>${logDirectory}/external/external.log</file> |
| 188 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 189 | <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd} |
| 190 | </fileNamePattern> |
| 191 | </rollingPolicy> |
| 192 | <encoder class="org.onap.aai.logging.EcompEncoder"> |
| 193 | <pattern>${eelfLogPattern}</pattern> |
| 194 | </encoder> |
| 195 | </appender> |
| 196 | <logger name="org.onap.aai.schemaservice" level="DEBUG" additivity="false"> |
| 197 | <appender-ref ref="asyncDEBUG" /> |
| 198 | <appender-ref ref="asyncERROR" /> |
| 199 | <appender-ref ref="asyncMETRIC" /> |
| 200 | <appender-ref ref="asyncSANE" /> |
| 201 | <appender-ref ref="STDOUT" /> |
| 202 | </logger> |
| 203 | <!-- Spring related loggers --> |
| 204 | <logger name="org.springframework" level="WARN" /> |
| 205 | <logger name="org.springframework.beans" level="WARN" /> |
| 206 | <logger name="org.springframework.web" level="WARN" /> |
| 207 | <logger name="com.blog.spring.jms" level="WARN" /> |
| 208 | <!-- logback internals logging --> |
| 209 | <logger name="ch.qos.logback.classic" level="WARN" /> |
| 210 | <logger name="ch.qos.logback.core" level="WARN" /> |
| 211 | <logger name="org.eclipse.jetty" level="WARN" /> |
| 212 | |
| 213 | <logger name="org.onap.aai.schemaservice.interceptors.post" level="DEBUG" |
| 214 | additivity="false"> |
| 215 | <appender-ref ref="asynctranslog" /> |
| 216 | </logger> |
| 217 | <logger name="org.onap.aai.schemaservice.interceptors.pre.SetLoggingContext" level="DEBUG"> |
| 218 | <appender-ref ref="asyncAUDIT"/> |
| 219 | </logger> |
| 220 | <logger name="org.onap.aai.schemaservice.interceptors.post.ResetLoggingContext" level="DEBUG"> |
| 221 | <appender-ref ref="asyncAUDIT"/> |
| 222 | </logger> |
| 223 | <!-- ============================================================================ --> |
| 224 | <!-- General EELF logger --> |
| 225 | <!-- ============================================================================ --> |
| 226 | <logger name="com.att.eelf" level="WARN" additivity="false"> |
| 227 | <appender-ref ref="asyncDEBUG" /> |
| 228 | <appender-ref ref="asyncERROR" /> |
| 229 | <appender-ref ref="asyncMETRIC" /> |
| 230 | </logger> |
| 231 | <root level="DEBUG"> |
| 232 | <appender-ref ref="external" /> |
| 233 | {{ if .Values.global.config.logback.console.enabled }} |
| 234 | <appender-ref ref="STDOUT" /> |
| 235 | {{ end }} |
| 236 | </root> |
| 237 | </configuration> |