Device Software version management
[oam/tr069-adapter.git] / config-data / src / main / 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
24 <Configuration status="DEBUG" monitorInterval="30">\r
25         <Properties>\r
26                 <Property name="LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss} %m%n</Property>\r
27                 <Property name="APP_LOG_ROOT">/logs</Property>\r
28                 <Property name="LOG_FILE_NAME">application</Property>\r
29         </Properties>\r
30         <Appenders>\r
31                 <Console name="console" target="SYSTEM_OUT" follow="true">\r
32                         <PatternLayout pattern="${LOG_PATTERN}" />\r
33                 </Console>\r
34 \r
35                 <RollingFile name="applicationLog"\r
36                         fileName="${APP_LOG_ROOT}/debug/${LOG_FILE_NAME}-debug.log"\r
37                         filePattern="${APP_LOG_ROOT}/debug/${LOG_FILE_NAME}-debug-%d{yyyy-MM-dd}-%i.log">\r
38                         <PatternLayout>\r
39                                 <pattern>[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%X{client}] [%.-40t]\r
40                                         %-25.45c{1} %-5p: %m%n</pattern>\r
41                                 <header>Debug Log started at: $${date:yyyy-MM-dd HH:mm:ss}</header>\r
42                         </PatternLayout>\r
43                         <Policies>\r
44                                 <SizeBasedTriggeringPolicy size="4MB" />\r
45                                 <TimeBasedTriggeringPolicy interval="1"\r
46                                         modulate="true" />\r
47                         </Policies>\r
48                         <DefaultRolloverStrategy>\r
49                                 <Delete basePath="${APP_LOG_ROOT}/debug/" maxDepth="1">\r
50                                         <IfFileName glob="application-debug*.log" />\r
51                                         <IfAccumulatedFileCount exceeds="10" />\r
52                                 </Delete>\r
53                         </DefaultRolloverStrategy>\r
54                 </RollingFile>\r
55 \r
56                 <RollingFile name="springLog"\r
57                         fileName="${APP_LOG_ROOT}/debug/spring-framework.log" filePattern="${APP_LOG_ROOT}/debug/spring-%d{yyyy-MM-dd}-%i.log">\r
58                         <PatternLayout pattern="${LOG_PATTERN}" />\r
59                         <Policies>\r
60                                 <SizeBasedTriggeringPolicy size="4MB" />\r
61                                 <TimeBasedTriggeringPolicy interval="1"\r
62                                         modulate="true" />\r
63                         </Policies>\r
64                         <DefaultRolloverStrategy>\r
65                                 <Delete basePath="${APP_LOG_ROOT}/debug/" maxDepth="1">\r
66                                         <IfFileName glob="spring*.log" />\r
67                                         <IfAccumulatedFileCount exceeds="10" />\r
68                                 </Delete>\r
69                         </DefaultRolloverStrategy>\r
70                 </RollingFile>\r
71 \r
72                 <RollingFile name="hibernateLog" fileName="${APP_LOG_ROOT}/debug/database.log"\r
73                         filePattern="${APP_LOG_ROOT}/debug/database-%d{yyyy-MM-dd}-%i.log">\r
74                         <PatternLayout pattern="${LOG_PATTERN}" />\r
75                         <Policies>\r
76                                 <SizeBasedTriggeringPolicy size="4MB" />\r
77                                 <TimeBasedTriggeringPolicy interval="1"\r
78                                         modulate="true" />\r
79                         </Policies>\r
80                         <DefaultRolloverStrategy>\r
81                                 <Delete basePath="${APP_LOG_ROOT}/debug/" maxDepth="1">\r
82                                         <IfFileName glob="application-debug*.log" />\r
83                                         <IfAccumulatedFileCount exceeds="10" />\r
84                                 </Delete>\r
85                         </DefaultRolloverStrategy>\r
86                 </RollingFile>\r
87 \r
88         </Appenders>\r
89 \r
90         <Loggers>\r
91                 <Logger name="org.commscope.tr069adapter.config" level="debug"\r
92                         additivity="false">\r
93                         <appender-ref ref="console" />\r
94                         <appender-ref ref="applicationLog" />\r
95                 </Logger>\r
96 \r
97                 <Logger name="org.springframework" level="error" additivity="false">\r
98                         <appender-ref ref="console" />\r
99                         <AppenderRef ref="springLog" />\r
100                 </Logger>\r
101 \r
102                 <Logger name="org.hibernate" level="error" additivity="false">\r
103                         <appender-ref ref="console" />\r
104                         <AppenderRef ref="hibernateLog" />\r
105                 </Logger>\r
106 \r
107                 <Root level="DEBUG" additivity="false" />\r
108         </Loggers>\r
109 </Configuration>