blob: 83a709936a454a7329f755fc5a0faed89dce354a [file] [log] [blame]
liamfallonc4bd9e42022-09-08 09:56:47 +01001<!--
2 ============LICENSE_START=======================================================
3 policy-api
4 ================================================================================
5 Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ============LICENSE_END=========================================================
19 -->
20
21<configuration scan="true" scanPeriod="30 seconds" debug="false">
22
23 <property name="logDir" value="${POLICY_LOGS}" />
24
25 <property name="errorLog" value="error" />
26 <property name="debugLog" value="debug" />
27 <property name="networkLog" value="network" />
28
29 <property name="metricLog" value="metric" />
30 <property name="transactionLog" value="audit" />
31
32 <property name="debugPattern"
33 value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
34 <property name="errorPattern" value="${debugPattern}" />
35 <property name="networkPattern"
36 value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
37
38 <property
39 name="mpPreamble"
40 value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}" />
41
42 <property
43 name="mpTime"
44 value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}" />
45
46 <property
47 name="mpLine1"
48 value="%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}" />
49
50 <property
51 name="mpLine2"
52 value="%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}" />
53
54 <property
55 name="mpLine3"
56 value="%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}" />
57
58 <property
59 name="mpLine4"
60 value="%X{TargetVirtualEntity}|%level|%thread| %msg%n" />
61
62
63 <property name="metricPattern"
64 value="{$mpPreamble}|{$mpTime}|{$mpLine1}|{$mpLine2}|{$mpLine3}|$mpLine4" />
65
66 <property name="transactionPattern" value="${metricPattern}" />
67
68 <appender name="ErrorOut"
69 class="ch.qos.logback.core.rolling.RollingFileAppender">
70 <file>${logDir}/${errorLog}.log</file>
71 <rollingPolicy
72 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
73 <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
74 </fileNamePattern>
75 <maxFileSize>50MB</maxFileSize>
76 <maxHistory>30</maxHistory>
77 <totalSizeCap>10GB</totalSizeCap>
78 </rollingPolicy>
79 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
80 <level>WARN</level>
81 </filter>
82 <encoder>
83 <pattern>${errorPattern}</pattern>
84 </encoder>
85 </appender>
86
87 <appender name="AsyncErrorOut"
88 class="ch.qos.logback.classic.AsyncAppender">
89 <appender-ref ref="ErrorOut" />
90 </appender>
91
92 <appender name="DebugOut"
93 class="ch.qos.logback.core.rolling.RollingFileAppender">
94 <file>${logDir}/${debugLog}.log</file>
95 <rollingPolicy
96 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
97 <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
98 </fileNamePattern>
99 <maxFileSize>50MB</maxFileSize>
100 <maxHistory>30</maxHistory>
101 <totalSizeCap>10GB</totalSizeCap>
102 </rollingPolicy>
103 <encoder>
104 <pattern>${debugPattern}</pattern>
105 </encoder>
106 </appender>
107
108 <appender name="AsyncDebugOut"
109 class="ch.qos.logback.classic.AsyncAppender">
110 <appender-ref ref="DebugOut" />
111 </appender>
112
113 <appender name="NetworkOut"
114 class="ch.qos.logback.core.rolling.RollingFileAppender">
115 <file>${logDir}/${networkLog}.log</file>
116 <rollingPolicy
117 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
118 <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
119 </fileNamePattern>
120 <maxFileSize>50MB</maxFileSize>
121 <maxHistory>30</maxHistory>
122 <totalSizeCap>10GB</totalSizeCap>
123 </rollingPolicy>
124 <encoder>
125 <pattern>${networkPattern}</pattern>
126 </encoder>
127 </appender>
128
129 <appender name="AsyncNetworkOut"
130 class="ch.qos.logback.classic.AsyncAppender">
131 <appender-ref ref="NetworkOut" />
132 </appender>
133
134 <appender name="MetricOut"
135 class="ch.qos.logback.core.rolling.RollingFileAppender">
136 <file>${logDir}/${metricLog}.log</file>
137 <rollingPolicy
138 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
139 <fileNamePattern>${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip
140 </fileNamePattern>
141 <maxFileSize>50MB</maxFileSize>
142 <maxHistory>30</maxHistory>
143 <totalSizeCap>10GB</totalSizeCap>
144 </rollingPolicy>
145 <encoder>
146 <pattern>${metricPattern}</pattern>
147 </encoder>
148 </appender>
149
150 <appender name="AsyncMetricOut"
151 class="ch.qos.logback.classic.AsyncAppender">
152 <appender-ref ref="MetricOut" />
153 </appender>
154
155 <appender name="TransactionOut"
156 class="ch.qos.logback.core.rolling.RollingFileAppender">
157 <file>${logDir}/${transactionLog}.log</file>
158 <rollingPolicy
159 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
160 <fileNamePattern>${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip
161 </fileNamePattern>
162 <maxFileSize>50MB</maxFileSize>
163 <maxHistory>30</maxHistory>
164 <totalSizeCap>10GB</totalSizeCap>
165 </rollingPolicy>
166 <encoder>
167 <pattern>${transactionPattern}</pattern>
168 </encoder>
169 </appender>
170
171 <appender name="AsyncTransactionOut"
172 class="ch.qos.logback.classic.AsyncAppender">
173 <appender-ref ref="TransactionOut" />
174 </appender>
175
176 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
177 <encoder>
178 <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern>
179 </encoder>
180 </appender>
181
182 <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender">
183 <appender-ref ref="STDOUT" />
184 </appender>
185
186
187 <logger name="network" level="INFO" additivity="false">
188 <appender-ref ref="AsyncNetworkOut" />
189 </logger>
190
191 <logger name="org.eclipse.jetty.server.RequestLog" level="info"
192 additivity="false">
193 <appender-ref ref="AsyncNetworkOut" />
194 <appender-ref ref="AsyncStdOut" />
195 </logger>
196
197 <logger name="org.eclipse.jetty" level="ERROR" />
198
199 <root level="INFO">
200 <appender-ref ref="AsyncDebugOut" />
201 <appender-ref ref="AsyncErrorOut" />
202 <appender-ref ref="AsyncMetricOut" />
203 <appender-ref ref="AsyncTransactionOut" />
204 <appender-ref ref="AsyncStdOut" />
205 </root>
206
207</configuration>