3bba9f1bb7fb35d7735f0a15c4c65a88dff92c60
[cps.git] / cps-service / src / main / resources / logback-spring.xml
1 <!--
2  ============LICENSE_START=======================================================
3  Copyright (C) 2021 Nordix Foundation
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
9  http://www.apache.org/licenses/LICENSE-2.0
10
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16
17  SPDX-License-Identifier: Apache-2.0
18  ============LICENSE_END=========================================================
19 -->
20
21 <configuration scan="true" debug="false">
22     <include resource="org/springframework/boot/logging/logback/base.xml" />
23
24     <property name="queueSize" value="256" />
25     <property name="maxFileSize" value="20MB" />
26     <property name="maxHistory" value="30" />
27     <property name="totalSizeCap" value="20MB" />
28
29     <!-- log file names -->
30     <property name="logName" value="cps" />
31
32     <property name="currentTimeStamp" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;,UTC}"/>
33
34     <property name="debugPattern"
35         value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%thread|%X{RequestID}| %logger{50} - %msg%n" />
36
37     <property name="all-log-pattern"
38       value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%thread|%X{RequestID}| %logger{50} - %msg%n" />
39
40     <appender name="CONSOLE"
41       class="ch.qos.logback.core.ConsoleAppender">
42         <layout class="ch.qos.logback.classic.PatternLayout">
43             <Pattern>${all-log-pattern}</Pattern>
44         </layout>
45     </appender>
46
47     <root level="INFO">
48         <appender-ref ref="CONSOLE" />
49     </root>
50
51 <!--  Send logs to File & Rotate File  -->
52 <!--    <appender name="Debug"-->
53 <!--        class="ch.qos.logback.core.rolling.RollingFileAppender">-->
54 <!--        <file>../log/${logName}.log</file>-->
55 <!--        <rollingPolicy-->
56 <!--            class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">-->
57 <!--            <fileNamePattern>${logName}.%d{yyyy-MM-dd}.%i.log.zip-->
58 <!--            </fileNamePattern>-->
59 <!--            <maxFileSize>${maxFileSize}</maxFileSize>-->
60 <!--            <maxHistory>${maxHistory}</maxHistory>-->
61 <!--            <totalSizeCap>${totalSizeCap}</totalSizeCap>-->
62 <!--        </rollingPolicy>-->
63 <!--        <encoder>-->
64 <!--            <pattern>${debugPattern}</pattern>-->
65 <!--        </encoder>-->
66 <!--    </appender>-->
67
68 <!--    <appender name="asyncDebug" class="ch.qos.logback.classic.AsyncAppender">-->
69 <!--        <queueSize>256</queueSize>-->
70 <!--        <appender-ref ref="Debug" />-->
71 <!--        <includeCallerData>true</includeCallerData>-->
72 <!--    </appender>-->
73
74 <!--    <logger name="org.onap.cps" level="DEBUG" additivity="false">-->
75 <!--        <appender-ref ref="asyncDebug" />-->
76 <!--    </logger>-->
77
78 <!--    <root level="INFO">-->
79 <!--        <appender-ref ref="asyncDebug" />-->
80 <!--    </root>-->
81
82 </configuration>