summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-widget-ms/widget-ms/src/main/resources/logback.xml
blob: 204a659846b07c2ef0edccb3bde860cc15b7bdaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

	<property name="WIDGET_LOG_HOME" value="logs" />
	
	
	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
		<layout class="ch.qos.logback.classic.PatternLayout">
			<Pattern>
				%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
			</Pattern>
		</layout>
	</appender>

	<logger name="org.springframework.web" level="info" additivity="false">
		<appender-ref ref="STDOUT" />
	</logger>
	
	<contextName>${HOSTNAME}</contextName>


	<appender name="ADUIT"
		class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${WIDGET_LOG_HOME}/aduit.log</file>
		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
			<Pattern>
				%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
			</Pattern>
		</encoder>
		<!-- %d{yyyy-MM-dd HH:mm:ss} - %msg%n -->
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${WIDGET_LOG_HOME}/archived/aduit.%d{yyyy-MM-dd}.%i.zip
                        </fileNamePattern>
            <maxHistory>30</maxHistory>  
			<timeBasedFileNamingAndTriggeringPolicy
				class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<maxFileSize>100KB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
		</rollingPolicy>
	</appender>

	<appender name="APPLICATION"
		class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${WIDGET_LOG_HOME}/application.log</file>
		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
			<Pattern>
				%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
			</Pattern>
		</encoder>
		<!-- %d{yyyy-MM-dd HH:mm:ss} - %msg%n -->
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${WIDGET_LOG_HOME}/archived/application.%d{yyyy-MM-dd}.%i.zip
                        </fileNamePattern>
            <maxHistory>30</maxHistory>  
			<timeBasedFileNamingAndTriggeringPolicy
				class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<maxFileSize>100KB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
		</rollingPolicy>
	</appender>


	<appender name="DEBUG"
		class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${WIDGET_LOG_HOME}/debug.log</file>
		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
			<Pattern>
				%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
			</Pattern>
		</encoder>
		<!-- %d{yyyy-MM-dd HH:mm:ss} - %msg%n -->
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${WIDGET_LOG_HOME}/archived/debug.%d{yyyy-MM-dd}.%i.zip
                        </fileNamePattern>
            <maxHistory>30</maxHistory>  
			<timeBasedFileNamingAndTriggeringPolicy
				class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<maxFileSize>100KB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
		</rollingPolicy>
	</appender>
	
	
	<appender name="ERROR"
		class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${WIDGET_LOG_HOME}/error.log</file>
		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
			<Pattern>
				%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
			</Pattern>
		</encoder>

		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${WIDGET_LOG_HOME}/archived/error.%d{yyyy-MM-dd}.%i.zip
                        </fileNamePattern>
            <maxHistory>30</maxHistory>  
			<timeBasedFileNamingAndTriggeringPolicy
				class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<maxFileSize>100KB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
		</rollingPolicy>
	</appender> 
	
	
	<appender name="METRICS"
		class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${WIDGET_LOG_HOME}/metrics.log</file>
		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
			<Pattern>
				%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
			</Pattern>
		</encoder>

		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${WIDGET_LOG_HOME}/archived/metrics.%d{yyyy-MM-dd}.%i.zip
                        </fileNamePattern>
            <maxHistory>30</maxHistory>  
			<timeBasedFileNamingAndTriggeringPolicy
				class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<maxFileSize>100KB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
		</rollingPolicy>
	</appender> 
	
	<logger name="org.openecomp.portalapp.widget" level="debug" additivity="false">
		<appender-ref ref="ERROR" />
		<appender-ref ref="DEBUG" />
		<appender-ref ref="APPLICATION" />
		<appender-ref ref="STDOUT" />
	</logger>

	<root level="info">
		<appender-ref ref="DEBUG" />
		<appender-ref ref="APPLICATION" />
		<appender-ref ref="STDOUT" />
	</root>
	
</configuration>