7e232820ecedf4765b753e3b6846227d283419bc
[portal/ric-dashboard.git] / webapp-backend / src / test / resources / logback-test.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ========================LICENSE_START=================================
4   O-RAN-SC
5   %%
6   Copyright (C) 2019 - 2020 AT&T Intellectual Property
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-be"/>
28
29         <!-- The directory where logs are written -->
30         <property name="logDirectory" value="logs" />
31
32         <!-- basic pattern -->
33         <property name="pattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC} [%thread] %-5level %logger{36} - %msg%n"/>
34
35         <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
36                 <!-- defaults to type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
37                 <encoder>
38                         <pattern>${pattern}</pattern>
39                 </encoder>
40         </appender>
41
42         <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
43                 <file>${logDirectory}/${componentName}.log</file>
44                 <append>true</append>
45                 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
46                         <fileNamePattern>${logDirectory}/${componentName}.%i.log.zip</fileNamePattern>
47                         <minIndex>1</minIndex>
48                         <maxIndex>5</maxIndex>
49                 </rollingPolicy>
50                 <triggeringPolicy
51                         class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
52                         <maxFileSize>1MB</maxFileSize>
53                 </triggeringPolicy>
54                 <!-- defaults to type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
55                 <encoder>
56                         <pattern>${pattern}</pattern>
57                 </encoder>
58         </appender>
59
60         <!-- Set default level for all loggers -->
61         <root level="INFO">
62                 <appender-ref ref="CONSOLE" />
63                 <appender-ref ref="FILE" />
64         </root>
65
66         <!-- Code under test should be chatty --> >
67         <logger name="org.oransc.ric.portal.dashboard" level="DEBUG" />
68
69 </configuration>