Fix: Update Sonar needed parameters
[oam/tr069-adapter.git] / mapper / src / test / resources / log4j2.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 /*
4  * ============LICENSE_START========================================================================
5  * ONAP : tr-069-adapter
6  * =================================================================================================
7  * Copyright (C) 2020 CommScope Inc Intellectual Property.
8  * =================================================================================================
9  * This tr-069-adapter software file is distributed by CommScope Inc
10  * under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * This file is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ===============LICENSE_END=======================================================================
21 */
22 -->
23 <Configuration status="DEBUG" monitorInterval="30">\r
24     <Properties>\r
25         <Property name="LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss} %m%n</Property>\r
26         <Property name="APP_LOG_ROOT">./target/test-logs</Property>\r
27     </Properties>\r
28     <Appenders>\r
29         <Console name="console" target="SYSTEM_OUT" follow="true">\r
30             <PatternLayout pattern="${LOG_PATTERN}"/>\r
31         </Console>\r
32         \r
33         <RollingFile name="applicationLog"\r
34             fileName="${APP_LOG_ROOT}/debug/application-debug.log"\r
35             filePattern="${APP_LOG_ROOT}/debug/application-debug-%d{yyyy-MM-dd}-%i.log">\r
36             <PatternLayout>\r
37                 <pattern>[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%X{client}] [%.-40t] %-25.45c{1} %-5p: %m%n</pattern>\r
38                 <header>Debug Log started at: $${date:yyyy-MM-dd HH:mm:ss}</header>\r
39             </PatternLayout>\r
40             <Policies>\r
41                 <SizeBasedTriggeringPolicy size="4MB" />\r
42                 <TimeBasedTriggeringPolicy interval="1" modulate="true"/>\r
43             </Policies>\r
44             <DefaultRolloverStrategy>\r
45                 <Delete basePath="${APP_LOG_ROOT}/debug/" maxDepth="1">\r
46                     <IfFileName glob="application-debug-*.log" />\r
47                     <IfAccumulatedFileCount exceeds="10" />\r
48                 </Delete>\r
49             </DefaultRolloverStrategy>\r
50         </RollingFile>\r
51   \r
52                 <RollingFile name="springLog" \r
53                         fileName="${APP_LOG_ROOT}/thirdparty/spring-framework.log"\r
54             filePattern="${APP_LOG_ROOT}/thirdparty/spring-%d{yyyy-MM-dd}-%i.log">\r
55             <PatternLayout pattern="${LOG_PATTERN}"/>\r
56             <Policies>\r
57                 <SizeBasedTriggeringPolicy size="4MB" />\r
58                 <TimeBasedTriggeringPolicy interval="1" modulate="true"/>\r
59             </Policies>\r
60             <DefaultRolloverStrategy>\r
61                 <Delete basePath="${APP_LOG_ROOT}/thirdparty/" maxDepth="1">\r
62                     <IfFileName glob="spring-*.log" />\r
63                     <IfAccumulatedFileCount exceeds="10" />\r
64                 </Delete>\r
65             </DefaultRolloverStrategy>\r
66         </RollingFile>\r
67    \r
68         <RollingFile name="thirdPartyLog" \r
69                         fileName="${APP_LOG_ROOT}/thirdparty/third-party-framework.log"\r
70             filePattern="${APP_LOG_ROOT}/thirdparty/third-party-framework-%d{yyyy-MM-dd}-%i.log">\r
71             <PatternLayout pattern="${LOG_PATTERN}"/>\r
72             <Policies>\r
73                 <SizeBasedTriggeringPolicy size="4MB" />\r
74                 <TimeBasedTriggeringPolicy interval="1" modulate="true"/>\r
75             </Policies>\r
76             <DefaultRolloverStrategy>\r
77                 <Delete basePath="${APP_LOG_ROOT}/thirdparty/" maxDepth="1">\r
78                     <IfFileName glob="third-party-framework*.log" />\r
79                     <IfAccumulatedFileCount exceeds="10" />\r
80                 </Delete>\r
81             </DefaultRolloverStrategy>\r
82         </RollingFile>\r
83              \r
84     </Appenders>\r
85     \r
86     <Loggers>\r
87         <Logger name="org.commscope.tr069adapter" level="debug" additivity="false">\r
88                 <appender-ref ref="console"/>\r
89                         <appender-ref ref="applicationLog"/>\r
90                 </Logger>\r
91 \r
92                 <Logger name="org" level="debug" additivity="false">\r
93                         <appender-ref ref="console"/>\r
94             <AppenderRef ref="thirdPartyLog" />\r
95         </Logger>\r
96                 \r
97                 <Logger name="org.springframework" level="debug" additivity="false">\r
98                         <appender-ref ref="console"/>\r
99             <AppenderRef ref="springLog" />\r
100         </Logger>\r
101         \r
102         <Root level="DEBUG" additivity="false"/>\r
103     </Loggers>\r
104 </Configuration>