blob: cfa280c45322ac8e031606fa1a144d24a4d98d5a [file] [log] [blame]
liamfallonc4bd9e42022-09-08 09:56:47 +01001<included>
2 <jmxConfigurator />
3 <!-- Example evaluator filter applied against console appender -->
4 <property name="p_tim" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}" />
5 <property name="p_lvl" value="%level" />
6 <property name="p_log" value="%logger" />
7 <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}" />
8 <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}" />
9 <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}" />
10 <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}" />
11 <property name="p_thr" value="%thread" />
12 <property name="defaultPattern"
13 value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n" />
14 <property name="debugPattern" value="%nopexception${p_tim}|${p_lvl}|${p_mdc}|${p_exc}|%msg%n" />
15
16 <property name="errorPattern"
17 value="%X{EntryTimestamp}|%X{RequestID}|%thread|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}||||%msg%n" />
18
19 <property name="auditPattern"
20 value="%X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread|%X{VirtualServerName}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}||||%marker|%mdc|||%msg%n" />
21
22 <property name="metricPattern"
23 value="%X{InvokeTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%X{RequestID}|%X{ServiceInstanceId}|%thread||%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceUUID}|%.-5level|%X{Severity}|%X{ServerIPAddress}|%X{ElapsedTime}|%X{ServerFQDN}|%X{RemoteHost}||||%X{TargetVirtualEntity}|%marker|%mdc|||%msg%n" />
24
25
26 <!-- Example evaluator filter applied against console appender -->
27 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
28 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
29 <level>INFO</level>
30 </filter>
31 <encoder>
32 <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
33 </pattern>
34 </encoder>
35 </appender>
36
37 <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
38 <filter class="ch.qos.logback.classic.filter.LevelFilter">
39 <level>ERROR</level>
40 <onMatch>ACCEPT</onMatch>
41 <onMismatch>DENY</onMismatch>
42 </filter>
43 <file>${logDirectory}/error.log</file>
44 <append>true</append>
45 <encoder>
46 <pattern>${errorPattern}</pattern>
47 </encoder>
48 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
49 <fileNamePattern>${logDirectory}/error.%d{yyyy-MM-dd}.%i.log.zip
50 </fileNamePattern>
51 <maxFileSize>50MB</maxFileSize>
52 <maxHistory>20</maxHistory>
53 <totalSizeCap>1GB</totalSizeCap>
54 </rollingPolicy>
55 </appender>
56 <appender name="asyncError" class="ch.qos.logback.classic.AsyncAppender">
57 <queueSize>256</queueSize>
58 <appender-ref ref="ERROR" />
59 </appender>
60
61 <appender name="DEBUG" class="ch.qos.logback.core.rolling.RollingFileAppender">
62 <file>${logDirectory}/debug.log</file>
63 <append>true</append>
64 <encoder>
65 <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
66 </pattern>
67 </encoder>
68 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
69 <fileNamePattern>${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip
70 </fileNamePattern>
71 <maxFileSize>50MB</maxFileSize>
72 <maxHistory>20</maxHistory>
73 <totalSizeCap>1GB</totalSizeCap>
74 </rollingPolicy>
75 </appender>
76 <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender">
77 <queueSize>256</queueSize>
78 <appender-ref ref="DEBUG" />
79 </appender>
80
81 <appender name="AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender">
82 <filter class="org.onap.policy.common.utils.logging.LoggerMarkerFilter$AuditLoggerMarkerFilter" />
83 <file>${logDirectory}/audit.log</file>
84 <encoder>
85 <pattern>${auditPattern}</pattern>
86 </encoder>
87 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
88 <FileNamePattern>${logDirectory}/audit.%d{yyyy-MM-dd}.%i.log.zip
89 </FileNamePattern>
90 <maxFileSize>50MB</maxFileSize>
91 <maxHistory>20</maxHistory>
92 <totalSizeCap>1GB</totalSizeCap>
93 </rollingPolicy>
94 </appender>
95 <appender name="asyncAudit" class="ch.qos.logback.classic.AsyncAppender">
96 <queueSize>256</queueSize>
97 <appender-ref ref="AUDIT" />
98 </appender>
99
100 <appender name="METRIC" class="ch.qos.logback.core.rolling.RollingFileAppender">
101 <filter class="org.onap.policy.common.utils.logging.LoggerMarkerFilter$MetricLoggerMarkerFilter" />
102 <file>${logDirectory}/metric.log</file>
103 <encoder>
104 <pattern>${metricPattern}</pattern>
105 </encoder>
106 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
107 <FileNamePattern>${logDirectory}/metric.%d{yyyy-MM-dd}.%i.log.zip
108 </FileNamePattern>
109 <maxFileSize>50MB</maxFileSize>
110 <maxHistory>20</maxHistory>
111 <totalSizeCap>1GB</totalSizeCap>
112 </rollingPolicy>
113 </appender>
114 <appender name="asyncMetric" class="ch.qos.logback.classic.AsyncAppender">
115 <queueSize>256</queueSize>
116 <appender-ref ref="METRIC" />
117 </appender>
118
119 <!-- SECURITY related loggers -->
120 <appender name="SECURITY" class="ch.qos.logback.core.rolling.RollingFileAppender">
121 <filter class="org.onap.policy.common.utils.logging.LoggerMarkerFilter$SecurityLoggerMarkerFilter" />
122 <file>${logDirectory}/security.log</file>
123 <encoder>
124 <pattern>%X{EntryTimestamp}|%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC}|%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
125 </pattern>
126 </encoder>
127 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
128 <FileNamePattern>${logDirectory}/security.%d{yyyy-MM-dd}.%i.log.zip
129 </FileNamePattern>
130 <maxFileSize>50MB</maxFileSize>
131 <maxHistory>20</maxHistory>
132 <totalSizeCap>1GB</totalSizeCap>
133 </rollingPolicy>
134 </appender>
135 <appender name="asyncSecurity" class="ch.qos.logback.classic.AsyncAppender">
136 <queueSize>256</queueSize>
137 <appender-ref ref="SECURITY" />
138 </appender>
139
140 <!-- logback jms appenders & loggers definition starts here -->
141 <appender name="auditLogs" class="ch.qos.logback.core.rolling.RollingFileAppender">
142 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
143 </filter>
144 <file>${logDirectory}/Audits.log</file>
145 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
146 <fileNamePattern>${logDirectory}/Audits-%d{yyyy-MM-dd}.%i.log.zip
147 </fileNamePattern>
148 <maxFileSize>50MB</maxFileSize>
149 <maxHistory>20</maxHistory>
150 <totalSizeCap>1GB</totalSizeCap>
151 </rollingPolicy>
152 <encoder>
153 <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
154 </encoder>
155 </appender>
156
157 <appender name="perfLogs" class="ch.qos.logback.core.rolling.RollingFileAppender">
158 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
159 </filter>
160 <file>${logDirectory}/Perform.log</file>
161 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
162 <fileNamePattern>${logDirectory}/Perform--%d{yyyy-MM-dd}.%i.log.zip
163 </fileNamePattern>
164 <maxFileSize>50MB</maxFileSize>
165 <maxHistory>20</maxHistory>
166 <totalSizeCap>1GB</totalSizeCap>
167 </rollingPolicy>
168 <encoder>
169 <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
170 </encoder>
171 </appender>
172
173 <logger name="org.onap.aaf" level="DEBUG">
174 <appender-ref ref="DEBUG" />
175 </logger>
176 <logger name="org.hibernate" level="INFO">
177 <appender-ref ref="DEBUG" />
178 </logger>
179 <logger name="org.apache.camel.Tracing" level="INFO">
180 <appender-ref ref="DEBUG" />
181 </logger>
182
183 <logger name="org.apache" level="INFO">
184 <appender-ref ref="DEBUG" />
185 </logger>
186 <!-- Spring related loggers -->
187 <logger name="org.springframework" level="INFO">
188 <appender-ref ref="DEBUG" />
189 </logger>
190
191 <!-- CLAMP related loggers -->
192 <logger name="org.onap.policy.clamp" level="DEBUG">
193 <appender-ref ref="ERROR" />
194 <appender-ref ref="DEBUG" />
195 </logger>
196
197 <!-- logback internals logging -->
198 <logger name="ch.qos.logback.classic" level="INFO" />
199 <logger name="ch.qos.logback.core" level="INFO" />
200 <logger name="AuditRecord" level="INFO" additivity="false">
201 <appender-ref ref="auditLogs" />
202 </logger>
203 <logger name="AuditRecord_DirectCall" level="INFO" additivity="false">
204 <appender-ref ref="auditLogs" />
205 </logger>
206 <logger name="PerfTrackerRecord" level="INFO" additivity="false">
207 <appender-ref ref="perfLogs" />
208 </logger>
209 <!-- logback jms appenders & loggers definition ends here -->
210
211 <root level="DEBUG">
212 <appender-ref ref="asyncDebug" />
213 <appender-ref ref="asyncError" />
214 <appender-ref ref="asyncAudit" />
215 <appender-ref ref="asyncMetric" />
216 <appender-ref ref="asyncSecurity" />
217 <appender-ref ref="STDOUT" />
218 </root>
219</included>