b17cbe2c77f097f99c977939cb44ec3d7eae2199
[portal/ric-dashboard.git] / webapp-backend / src / main / resources / logback.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ========================LICENSE_START=================================
4   O-RAN-SC
5   %%
6   Copyright (C) 2019 AT&T Intellectual Property and Nokia
7   %%
8   Licensed under the Apache License, Version 2.0 (the "License");
9   you may not use this file except in compliance with the License.
10   You may obtain a copy of the License at
11   
12        http://www.apache.org/licenses/LICENSE-2.0
13   
14   Unless required by applicable law or agreed to in writing, software
15   distributed under the License is distributed on an "AS IS" BASIS,
16   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   See the License for the specific language governing permissions and
18   limitations under the License.
19   ========================LICENSE_END===================================
20   -->
21
22 <configuration>
23
24         <!-- Basic logback configuration for dev and test -->
25
26         <!-- component name is log file basename -->
27         <property name="componentName" value="ric-dashboard"></property>
28         <!-- gather files in a subdirectory -->
29         <property name="logDirectory" value="logs" />
30         <!-- output pattern -->
31         <property name="pattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC} [%thread] %-5level %logger{36} - %msg%n"/>
32
33         <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
34                 <!-- defaults to type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
35                 <encoder>
36                         <pattern>${pattern}</pattern>
37                 </encoder>
38         </appender>
39
40         <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
41                 <file>${logDirectory}/${componentName}.log</file>
42                 <append>true</append>
43                 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
44                         <fileNamePattern>${logDirectory}/${componentName}.%i.log.zip</fileNamePattern>
45                         <minIndex>1</minIndex>
46                         <maxIndex>9</maxIndex>
47                 </rollingPolicy>
48                 <triggeringPolicy
49                         class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
50                         <maxFileSize>10MB</maxFileSize>
51                 </triggeringPolicy>
52                 <!-- defaults to type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
53                 <encoder>
54                         <pattern>${pattern}</pattern>
55                 </encoder>
56         </appender>
57
58         <!-- Set default level for all loggers -->
59         <root level="INFO">
60                 <appender-ref ref="CONSOLE" />
61                 <appender-ref ref="FILE" />
62         </root>
63
64         <!-- Code under test should be chatty --> >
65         <logger name="org.oransc.ric.portal.dashboard" level="DEBUG" />
66
67         <!-- Watch authentication done by EPSDK-FW -->
68         <logger name="org.onap.portalsdk.core.onboarding.crossapi" level="DEBUG" />
69
70         <!-- Report request URLs -->
71         <logger name="org.springframework.web.client.RestTemplate" level="DEBUG" />
72
73 </configuration>