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