blob: 2e91f80a98174919a81286553292103aa0f3bfe9 [file] [log] [blame]
jhhd4258672020-08-09 12:08:08 -05001<!--
2 ============LICENSE_START=======================================================
3 Copyright (C) 2020 Bell Canada. All rights reserved.
jhh417bcba2021-04-08 20:56:17 -05004 Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
jhhd4258672020-08-09 12:08:08 -05005 ================================================================================
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 SPDX-License-Identifier: Apache-2.0
16 ============LICENSE_END=========================================================
17-->
18
19<configuration scan="true" scanPeriod="30 seconds" debug="false">
20
21 <appender name="ErrorOut"
22 class="ch.qos.logback.core.rolling.RollingFileAppender">
23 <file>/var/log/onap/policy/api/error.log</file>
24 <rollingPolicy
25 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
26 <fileNamePattern>/var/log/onap/policy/api/error.%d{yyyy-MM-dd}.%i.log.zip
27 </fileNamePattern>
28 <maxFileSize>50MB</maxFileSize>
29 <maxHistory>30</maxHistory>
30 <totalSizeCap>10GB</totalSizeCap>
31 </rollingPolicy>
32 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
33 <level>WARN</level>
34 </filter>
35 <encoder>
36 <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</pattern>
37 </encoder>
38 </appender>
39
40 <appender name="AsyncErrorOut"
41 class="ch.qos.logback.classic.AsyncAppender">
42 <appender-ref ref="ErrorOut" />
43 </appender>
44
45 <appender name="DebugOut"
46 class="ch.qos.logback.core.rolling.RollingFileAppender">
47 <file>/var/log/onap/policy/api/debug.log</file>
48 <rollingPolicy
49 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
50 <fileNamePattern>/var/log/onap/policy/api/debug.%d{yyyy-MM-dd}.%i.log.zip
51 </fileNamePattern>
52 <maxFileSize>50MB</maxFileSize>
53 <maxHistory>30</maxHistory>
54 <totalSizeCap>10GB</totalSizeCap>
55 </rollingPolicy>
56 <encoder>
57 <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</pattern>
58 </encoder>
59 </appender>
60
61 <appender name="AsyncDebugOut"
62 class="ch.qos.logback.classic.AsyncAppender">
63 <appender-ref ref="DebugOut" />
64 </appender>
65
66 <appender name="NetworkOut"
67 class="ch.qos.logback.core.rolling.RollingFileAppender">
68 <file>/var/log/onap/policy/api/network.log</file>
69 <rollingPolicy
70 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
71 <fileNamePattern>/var/log/onap/policy/api/network.%d{yyyy-MM-dd}.%i.log.zip
72 </fileNamePattern>
73 <maxFileSize>50MB</maxFileSize>
74 <maxHistory>30</maxHistory>
75 <totalSizeCap>10GB</totalSizeCap>
76 </rollingPolicy>
77 <encoder>
78 <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n</pattern>
79 </encoder>
80 </appender>
81
82 <appender name="AsyncNetworkOut"
83 class="ch.qos.logback.classic.AsyncAppender">
84 <appender-ref ref="NetworkOut" />
85 </appender>
86
87 <appender name="MetricOut"
88 class="ch.qos.logback.core.rolling.RollingFileAppender">
89 <file>/var/log/onap/policy/api/metric.log</file>
90 <rollingPolicy
91 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
92 <fileNamePattern>/var/log/onap/policy/api/metric.%d{yyyy-MM-dd}.%i.log.zip
93 </fileNamePattern>
94 <maxFileSize>50MB</maxFileSize>
95 <maxHistory>30</maxHistory>
96 <totalSizeCap>10GB</totalSizeCap>
97 </rollingPolicy>
98 <encoder>
99 <pattern>%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}|%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}|%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}|%X{TargetVirtualEntity}|%level|%thread| %msg%n</pattern>
100 </encoder>
101 </appender>
102
103 <appender name="AsyncMetricOut"
104 class="ch.qos.logback.classic.AsyncAppender">
105 <appender-ref ref="MetricOut" />
106 </appender>
107
108 <appender name="TransactionOut"
109 class="ch.qos.logback.core.rolling.RollingFileAppender">
110 <file>/var/log/onap/policy/api/audit.log</file>
111 <rollingPolicy
112 class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
113 <fileNamePattern>/var/log/onap/policy/api/audit.%d{yyyy-MM-dd}.%i.log.zip
114 </fileNamePattern>
115 <maxFileSize>50MB</maxFileSize>
116 <maxHistory>30</maxHistory>
117 <totalSizeCap>10GB</totalSizeCap>
118 </rollingPolicy>
119 <encoder>
120 <pattern>%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}|%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}|%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}|%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}|%X{TargetVirtualEntity}|%level|%thread| %msg%n</pattern>
121 </encoder>
122 </appender>
123
124 <appender name="AsyncTransactionOut"
125 class="ch.qos.logback.classic.AsyncAppender">
126 <appender-ref ref="TransactionOut" />
127 </appender>
128
129 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
130 <encoder>
jhh417bcba2021-04-08 20:56:17 -0500131 <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern>
jhhd4258672020-08-09 12:08:08 -0500132 </encoder>
133 </appender>
134
135 <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender">
136 <appender-ref ref="STDOUT" />
137 </appender>
138
139 <logger name="network" level="INFO" additivity="false">
140 <appender-ref ref="AsyncNetworkOut" />
141 <appender-ref ref="AsyncStdOut" />
142 </logger>
143
144 <logger name="org.eclipse.jetty.server.RequestLog" level="info"
145 additivity="false">
146 <appender-ref ref="AsyncNetworkOut" />
147 <appender-ref ref="AsyncStdOut" />
148 </logger>
149
150 <logger name="org.eclipse.jetty" level="ERROR" />
151
152 <root level="INFO">
153 <appender-ref ref="AsyncDebugOut" />
154 <appender-ref ref="AsyncErrorOut" />
155 <appender-ref ref="AsyncMetricOut" />
156 <appender-ref ref="AsyncTransactionOut" />
157 <appender-ref ref="AsyncStdOut" />
158 </root>
159
160</configuration>