blob: 0a8f8d5f84a4c9bd61aca4d606576b5726d21967 [file] [log] [blame]
ac2550de009892018-05-24 15:47:05 +02001<configuration scan="true" scanPeriod="10 seconds" debug="false">
2 <jmxConfigurator />
3 <property resource="application.properties" />
4 <property name="logDirectory" value="/var/log/onap/clamp" />
5 <!-- Example evaluator filter applied against console appender -->
6 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
7 <!-- filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level>
8 <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter -->
9 <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
10 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
11 <level>INFO</level>
12 </filter>
13 <encoder>
14 <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
15 </pattern>
16 </encoder>
17 </appender>
18
19 <appender name="ERROR"
20 class="ch.qos.logback.core.rolling.RollingFileAppender">
21 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
22 <level>INFO</level>
23 </filter>
24 <file>${logDirectory}/error.log</file>
25 <append>true</append>
26 <encoder>
27 <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX", UTC}|%X{RequestId}|%.20thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode}|%X{ErrorDescription}|%msg%n</pattern>
28 </encoder>
29 <rollingPolicy
30 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
31 <maxIndex>10</maxIndex>
32 <FileNamePattern>${logDirectory}/error.%i.log.zip
33 </FileNamePattern>
34 </rollingPolicy>
35 <triggeringPolicy
36 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
37 <maxFileSize>10MB</maxFileSize>
38 </triggeringPolicy>
39 </appender>
40
41 <appender name="DEBUG"
42 class="ch.qos.logback.core.rolling.RollingFileAppender">
43 <file>${logDirectory}/debug.log</file>
44 <append>true</append>
45 <encoder>
46 <pattern>%date{"yyyy-MM-dd'T'HH:mm:ss,SSSXXX",UTC}|%X{RequestId}|%.20thread|%.-5level|%logger{36}|%msg%n</pattern>
47 </encoder>
48 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
49 <fileNamePattern>${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
50 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
51 <maxFileSize>10MB</maxFileSize>
52 </timeBasedFileNamingAndTriggeringPolicy>
53 <maxHistory>5</maxHistory>
54 </rollingPolicy>
55 </appender>
56
57 <appender name="AUDIT"
58 class="ch.qos.logback.core.rolling.RollingFileAppender">
59 <file>${logDirectory}/audit.log</file>
60 <append>true</append>
61 <encoder>
62 <pattern>%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%.20thread|%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}|%msg%n
63 </pattern>
64 </encoder>
65 <rollingPolicy
66 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
67 <maxIndex>10</maxIndex>
68 <FileNamePattern>${logDirectory}/audit.%i.log.zip
69 </FileNamePattern>
70 </rollingPolicy>
71 <triggeringPolicy
72 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
73 <maxFileSize>10MB</maxFileSize>
74 </triggeringPolicy>
75 </appender>
76 <appender name="asyncEELFAudit" class="ch.qos.logback.classic.AsyncAppender">
77 <queueSize>256</queueSize>
78 <appender-ref ref="AUDIT" />
79 </appender>
80
81 <appender name="METRIC"
82 class="ch.qos.logback.core.rolling.RollingFileAppender">
83 <file>${logDirectory}/metric.log</file>
84 <append>true</append>
85 <encoder>
86 <pattern>%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%.20thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%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{TargetVirtualEntity}|%X{CustomField1}|%X{CustomField2}|%X{CustomField3}|%X{CustomField4}|
87 %msg%n</pattern>
88 </encoder>
89 <rollingPolicy
90 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
91 <maxIndex>10</maxIndex>
92 <FileNamePattern>${logDirectory}/metric.%i.log.zip
93 </FileNamePattern>
94 </rollingPolicy>
95 <triggeringPolicy
96 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
97 <maxFileSize>10MB</maxFileSize>
98 </triggeringPolicy>
99 </appender>
100 <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender">
101 <queueSize>256</queueSize>
102 <appender-ref ref="METRIC" />
103 </appender>
104
105 <!-- SECURITY related loggers -->
106 <appender name="SECURITY"
107 class="ch.qos.logback.core.rolling.RollingFileAppender">
108 <file>${logDirectory}/security.log</file>
109 <append>true</append>
110 <encoder>
111 <pattern>%X{BeginTimestamp}|%X{EndTimestamp}|%X{RequestId}|%X{ServiceInstanceId}|%.20thread|%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}|%msg%n
112 </pattern>
113 </encoder>
114 <rollingPolicy
115 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
116 <maxIndex>10</maxIndex>
117 <FileNamePattern>${logDirectory}/security.%i.log.zip
118 </FileNamePattern>
119 </rollingPolicy>
120 <triggeringPolicy
121 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
122 <maxFileSize>10MB</maxFileSize>
123 </triggeringPolicy>
124 </appender>
125 <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender">
126 <queueSize>256</queueSize>
127 <appender-ref ref="SECURITY" />
128 </appender>
129
130 <!-- CLDS related loggers -->
131 <logger name="org.onap.clamp.clds" level="INFO" additivity="true">
132 <appender-ref ref="ERROR" />
133 </logger>
134
135 <!-- CLDS related loggers -->
136 <logger name="com.att.eelf.error" level="OFF" additivity="true">
137 <appender-ref ref="ERROR" />
138 </logger>
139 <!-- EELF related loggers -->
140 <logger name="com.att.eelf.audit" level="INFO" additivity="false">
141 <appender-ref ref="asyncEELFAudit" />
142 </logger>
143 <logger name="com.att.eelf.metrics" level="DEBUG" additivity="false">
144 <appender-ref ref="asyncEELFMetrics" />
145 </logger>
146 <logger name="com.att.eelf.security" level="DEBUG" additivity="false">
147 <appender-ref ref="asyncEELFSecurity" />
148 </logger>
149
150
151 <!-- Spring related loggers -->
152 <logger name="org.springframework" level="WARN" />
153 <logger name="org.springframework.beans" level="WARN" />
154 <logger name="org.springframework.web" level="WARN" />
155 <logger name="com.blog.spring.jms" level="WARN" />
156
157 <!-- Other Loggers that may help troubleshoot -->
158 <logger name="net.sf" level="WARN" />
159 <logger name="org.apache.commons.httpclient" level="WARN" />
160 <logger name="org.apache.commons" level="WARN" />
161 <logger name="org.apache.coyote" level="WARN" />
162 <logger name="org.apache.jasper" level="WARN" />
163
164 <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging.
165 May aid in troubleshooting) -->
166 <logger name="org.apache.camel" level="WARN" />
167 <logger name="org.apache.cxf" level="WARN" />
168 <logger name="org.apache.camel.processor.interceptor" level="WARN" />
169 <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" />
170 <logger name="org.apache.cxf.service" level="WARN" />
171 <logger name="org.restlet" level="DEBUG" />
172 <logger name="org.apache.camel.component.restlet" level="DEBUG" />
173
174 <!-- logback internals logging -->
175 <logger name="ch.qos.logback.classic" level="INFO" />
176 <logger name="ch.qos.logback.core" level="INFO" />
177
178 <!-- logback jms appenders & loggers definition starts here -->
179 <!-- logback jms appenders & loggers definition starts here -->
180 <appender name="auditLogs"
181 class="ch.qos.logback.core.rolling.RollingFileAppender">
182 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
183 </filter>
184 <file>${logDirectory}/Audit.log</file>
185 <rollingPolicy
186 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
187 <fileNamePattern>${logDirectory}/Audit.%i.log.zip
188 </fileNamePattern>
189 <minIndex>1</minIndex>
190 <maxIndex>9</maxIndex>
191 </rollingPolicy>
192 <triggeringPolicy
193 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
194 <maxFileSize>5MB</maxFileSize>
195 </triggeringPolicy>
196 <encoder>
197 <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
198 </encoder>
199 </appender>
200 <appender name="perfLogs"
201 class="ch.qos.logback.core.rolling.RollingFileAppender">
202 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
203 </filter>
204 <file>${logDirectory}/Perform.log</file>
205 <rollingPolicy
206 class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
207 <fileNamePattern>${logDirectory}/Perform.%i.log.zip
208 </fileNamePattern>
209 <minIndex>1</minIndex>
210 <maxIndex>9</maxIndex>
211 </rollingPolicy>
212 <triggeringPolicy
213 class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
214 <maxFileSize>5MB</maxFileSize>
215 </triggeringPolicy>
216 <encoder>
217 <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
218 </encoder>
219 </appender>
220 <logger name="AuditRecord" level="INFO" additivity="FALSE">
221 <appender-ref ref="auditLogs" />
222 </logger>
223 <logger name="AuditRecord_DirectCall" level="INFO" additivity="FALSE">
224 <appender-ref ref="auditLogs" />
225 </logger>
226 <logger name="PerfTrackerRecord" level="INFO" additivity="FALSE">
227 <appender-ref ref="perfLogs" />
228 </logger>
229 <!-- logback jms appenders & loggers definition ends here -->
230
231 <root level="WARN">
232 <appender-ref ref="DEBUG" />
233 <appender-ref ref="STDOUT" />
234 </root>
235
236</configuration>