Jimmy Forsyth | b4b0948 | 2018-05-01 16:03:43 -0400 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE xml> |
| 3 | <configuration scan="true" scanPeriod="30 seconds" debug="true"> |
| 4 | <include resource="org/springframework/boot/logging/logback/base.xml" /> |
| 5 | |
| 6 | <property name="componentName" value="AAI-BAS" /> |
mark.j.leonard | 4bcabf5 | 2018-05-04 17:09:48 +0100 | [diff] [blame] | 7 | <property name="logDirectory" value="/var/log/onap/${componentName}" /> |
Jimmy Forsyth | b4b0948 | 2018-05-01 16:03:43 -0400 | [diff] [blame] | 8 | |
| 9 | <!-- default EELF log file names --> |
| 10 | <property name="generalLogName" value="error" /> |
| 11 | <property name="metricsLogName" value="metrics" /> |
| 12 | <property name="auditLogName" value="audit" /> |
| 13 | <property name="debugLogName" value="debug" /> |
| 14 | |
| 15 | <property name="errorLogPattern" |
| 16 | value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{RequestId}|%thread|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{TargetEntity}|%mdc{TargetServiceName}|%.-5level|%logger|%mdc{ClassName}|%msg%n" /> |
| 17 | |
| 18 | <property name="auditLogPattern" |
| 19 | value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{BeginTimestamp}|%mdc{EndTimestamp}|%mdc{RequestId}|%mdc{ServiceInstanceId}|%thread|%mdc{ServerFQDN}|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{StatusCode}|%mdc{ResponseCode}|%mdc{ResponseDescription}|%logger|%.-5level|||%mdc{ElapsedTime}|%mdc{RemoteHost}|%mdc{ClientAddress}|%mdc{ClassName}|||%msg%n" /> |
| 20 | |
| 21 | <property name="metricsLogPattern" |
| 22 | value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%mdc{BeginTimestamp}|%mdc{EndTimestamp}|%mdc{RequestId}|%mdc{ServiceInstanceId}|%thread|%mdc{ServerFQDN}|%mdc{ServiceName}|%mdc{PartnerName}|%mdc{TargetEntity}|%mdc{TargetServiceName}|%mdc{StatusCode}|%mdc{ResponseCode}|%mdc{ResponseDescription}|%logger|%.-5level|||%mdc{ElapsedTime}|%mdc{RemoteHost}|%mdc{ClientAddress}|%mdc{ClassName}|||%msg%n" /> |
| 23 | |
| 24 | <!-- ============================================================================ --> |
| 25 | <!-- EELF Appenders --> |
| 26 | <!-- ============================================================================ --> |
| 27 | |
| 28 | <appender name="EELF" |
| 29 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 30 | <file>${logDirectory}/${generalLogName}.log</file> |
| 31 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 32 | <fileNamePattern>${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip |
| 33 | </fileNamePattern> |
| 34 | <maxHistory>60</maxHistory> |
| 35 | </rollingPolicy> |
| 36 | <encoder> |
| 37 | <pattern>${errorLogPattern}</pattern> |
| 38 | </encoder> |
| 39 | </appender> |
| 40 | <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender"> |
| 41 | <!-- deny all events with a level below INFO, that is TRACE and DEBUG --> |
| 42 | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| 43 | <level>INFO</level> |
| 44 | </filter> |
| 45 | <queueSize>256</queueSize> |
| 46 | <appender-ref ref="EELF" /> |
| 47 | </appender> |
| 48 | |
| 49 | <!-- EELF Audit Appender. This appender is used to record audit engine related logging events. The audit logger and appender |
| 50 | are specializations of the EELF application root logger and appender. This can be used to segregate Policy engine events |
| 51 | from other components, or it can be eliminated to record these events as part of the application root log. --> |
| 52 | |
| 53 | <appender name="EELFAudit" |
| 54 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 55 | <file>${logDirectory}/${auditLogName}.log</file> |
| 56 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 57 | <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip |
| 58 | </fileNamePattern> |
| 59 | <maxHistory>60</maxHistory> |
| 60 | </rollingPolicy> |
| 61 | <encoder> |
| 62 | <pattern>${auditLogPattern}</pattern> |
| 63 | </encoder> |
| 64 | </appender> |
| 65 | <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender"> |
| 66 | <queueSize>256</queueSize> |
| 67 | <appender-ref ref="EELFAudit" /> |
| 68 | </appender> |
| 69 | |
| 70 | <appender name="EELFMetrics" |
| 71 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 72 | <file>${logDirectory}/${metricsLogName}.log</file> |
| 73 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 74 | <fileNamePattern>${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip |
| 75 | </fileNamePattern> |
| 76 | <maxHistory>60</maxHistory> |
| 77 | </rollingPolicy> |
| 78 | <encoder> |
| 79 | <pattern>${metricsLogPattern}</pattern> |
| 80 | </encoder> |
| 81 | </appender> |
| 82 | |
| 83 | <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> |
| 84 | <queueSize>256</queueSize> |
| 85 | <appender-ref ref="EELFMetrics" /> |
| 86 | </appender> |
| 87 | |
| 88 | <appender name="EELFDebug" |
| 89 | class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| 90 | <file> |
| 91 | ${logDirectory}/${debugLogName}.log |
| 92 | </file> |
| 93 | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| 94 | <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip |
| 95 | </fileNamePattern> |
| 96 | <maxHistory>60</maxHistory> |
| 97 | </rollingPolicy> |
| 98 | <encoder> |
| 99 | <pattern>${errorLogPattern}</pattern> |
| 100 | </encoder> |
| 101 | </appender> |
| 102 | |
| 103 | <appender name="asyncEELFDebug" class="ch.qos.logback.classic.AsyncAppender"> |
| 104 | <!-- allow only events with a level below INFO, that is TRACE and DEBUG --> |
| 105 | <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> |
| 106 | <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> |
| 107 | <expression> |
| 108 | e.level.toInt() < INFO.toInt() |
| 109 | </expression> |
| 110 | </evaluator> |
| 111 | <OnMismatch>DENY</OnMismatch> |
| 112 | <OnMatch>NEUTRAL</OnMatch> |
| 113 | </filter> |
| 114 | <queueSize>256</queueSize> |
| 115 | <appender-ref ref="EELFDebug" /> |
| 116 | <includeCallerData>false</includeCallerData> |
| 117 | </appender> |
| 118 | |
| 119 | <!-- ============================================================================ --> |
| 120 | <!-- Default / root appenders --> |
| 121 | <!-- This determines the logging level for 3rd party code --> |
| 122 | <!-- ============================================================================ --> |
| 123 | |
| 124 | <root level="INFO"> |
| 125 | <appender-ref ref="asyncEELF" /> |
| 126 | <appender-ref ref="asyncEELFDebug" /> |
| 127 | </root> |
| 128 | |
| 129 | <!-- ============================================================================ --> |
| 130 | <!-- EELF loggers --> |
| 131 | <!-- ============================================================================ --> |
| 132 | |
| 133 | <logger name="com.att.eelf" level="INFO" additivity="false"> |
| 134 | <appender-ref ref="asyncEELF" /> |
| 135 | </logger> |
| 136 | |
| 137 | <!-- The level of this logger determines the contents of the debug log --> |
| 138 | <logger name="com.att.eelf.debug" level="INFO" additivity="false"> |
| 139 | <appender-ref ref="asyncEELFDebug" /> |
| 140 | </logger> |
| 141 | |
| 142 | <logger name="com.att.eelf.audit" level="INFO" additivity="false"> |
| 143 | <appender-ref ref="asyncEELFAudit" /> |
| 144 | </logger> |
| 145 | |
| 146 | <logger name="com.att.eelf.metrics" level="INFO" additivity="false"> |
| 147 | <appender-ref ref="asyncEELFMetrics" /> |
| 148 | </logger> |
| 149 | |
| 150 | <!-- ============================================================================ --> |
| 151 | <!-- Non-EELF loggers --> |
| 152 | <!-- ============================================================================ --> |
| 153 | |
| 154 | <!-- ATT packages including DMAAP message routing --> |
| 155 | <logger name="com.att" level="INFO" /> |
| 156 | |
| 157 | <!-- Spring related loggers --> |
| 158 | <logger name="org.springframework" level="WARN" /> |
| 159 | <logger name="org.springframework.beans" level="WARN" /> |
| 160 | <logger name="org.springframework.web" level="WARN" /> |
| 161 | |
| 162 | <!-- Other Loggers that may help troubleshoot --> |
| 163 | <logger name="org.apache" level="WARN" /> |
| 164 | <logger name="org.apache.commons" level="WARN" /> |
| 165 | |
| 166 | <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. May aid in troubleshooting) --> |
| 167 | <logger name="org.apache.camel" level="WARN" /> |
| 168 | <logger name="org.apache.cxf" level="WARN" /> |
| 169 | <logger name="org.apache.camel.processor.interceptor" level="WARN" /> |
| 170 | <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" /> |
| 171 | <logger name="org.apache.cxf.service" level="WARN" /> |
| 172 | <logger name="org.restlet" level="WARN" /> |
| 173 | <logger name="org.apache.camel.component.restlet" level="WARN" /> |
| 174 | |
| 175 | <!-- logback internals logging --> |
| 176 | <logger name="ch.qos.logback.classic" level="WARN" /> |
| 177 | <logger name="ch.qos.logback.core" level="WARN" /> |
| 178 | |
| 179 | </configuration> |