aboutsummaryrefslogtreecommitdiffstats
path: root/etc/log4j.xml
blob: 247dbabae4651e9dc42030466d27a37f32c4c99d (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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">

	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
		<param name="threshold" value="INFO" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t]%m%n" />
		</layout>
	</appender>

	<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
		<param name="threshold" value="INFO" />
		<param name="File" value="logs/collector.log" />
		<param name="MaxFileSize" value="32MB"/>
		<param name="MaxBackupIndex" value="20"/>
		<layout class="org.apache.log4j.PatternLayout">
			<!-- param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t][%-5c][%4L]%m%n" / -->
			<param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-10t][%-5c]%m%n" />
		</layout>
	</appender>

	<appender name="IFILE" class="org.apache.log4j.RollingFileAppender">
		<param name="threshold" value="INFO" />
		<param name="File" value="logs/input.log" />
		<param name="MaxFileSize" value="32MB"/>
		<param name="MaxBackupIndex" value="10"/>
		<layout class="org.apache.log4j.PatternLayout">
			<!-- param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t][%-5c][%4L]%m%n" / -->
			<param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-10t][%-5c]%m%n" />
		</layout>
	</appender>

	<appender name="OFILE" class="org.apache.log4j.RollingFileAppender">
		<param name="threshold" value="INFO" />
		<param name="File" value="logs/output.log" />
		<param name="MaxFileSize" value="32MB"/>
		<param name="MaxBackupIndex" value="10"/>
		<layout class="org.apache.log4j.PatternLayout">
			<!-- param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t][%-5c][%4L]%m%n" / -->
			<param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-10t][%-5c]%m%n" />
		</layout>
	</appender>
	
	<appender name="EFILE" class="org.apache.log4j.RollingFileAppender">
		<param name="threshold" value="INFO" />
		<param name="File" value="logs/error.log" />
		<param name="MaxFileSize" value="32MB"/>
		<param name="MaxBackupIndex" value="5"/>
		<layout class="org.apache.log4j.PatternLayout">
			<!-- param name="ConversionPattern" value="[%d{ABSOLUTE}][%-5p][%-10t][%-5c][%4L]%m%n" / -->
			<param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%-10t][%-5c]%m%n" />
		</layout>
	</appender>
	
	<!--
		ECOMP logging setup
	
		NOTES:
		
		1. files are written to "./logs/<filename>". You must setup the environment
			so that ./logs is a symlink to the correct location according to the ECOMP
			log standard. For example, "/opt/logs/DCAE/highlandParkVcScope". If that's
			not possible, change the File setting in each appender appropriately.
	  -->

	<appender name="ECOMP_AUDIT" class="org.apache.log4j.RollingFileAppender">
		<param name="threshold" value="DEBUG" />
		<param name="File" value="./logs/ecomp/audit.log" />
		<param name="MaxFileSize" value="128MB"/>
		<param name="MaxBackupIndex" value="20"/>
		<layout class="com.att.nsa.logging.log4j.EcompLayout"><param name="ConversionPattern" value="ECOMP_AUDIT" /></layout>
	</appender>

	<appender name="ECOMP_METRIC" class="org.apache.log4j.RollingFileAppender">
		<param name="threshold" value="INFO" />
		<param name="File" value="./logs/ecomp/metric.log" />
		<param name="MaxFileSize" value="128MB"/>
		<param name="MaxBackupIndex" value="10"/>
		<layout class="com.att.nsa.logging.log4j.EcompLayout"><param name="ConversionPattern" value="ECOMP_METRIC" /></layout>
	</appender>

	<appender name="ECOMP_ERROR" class="org.apache.log4j.RollingFileAppender">
		<param name="threshold" value="WARN" />	<!-- only WARN and ERROR are allowed in this log -->
		<param name="File" value="./logs/ecomp/error.log" />
		<param name="MaxFileSize" value="128MB"/>
		<param name="MaxBackupIndex" value="10"/>
		<layout class="com.att.nsa.logging.log4j.EcompLayout"><param name="ConversionPattern" value="ECOMP_ERROR" /></layout>
	</appender>

	<appender name="ECOMP_DEBUG" class="org.apache.log4j.RollingFileAppender">
		<param name="threshold" value="DEBUG" />
		<param name="File" value="./logs/ecomp/debug.log" />
		<param name="MaxFileSize" value="128MB"/>
		<param name="MaxBackupIndex" value="20"/>
		<layout class="com.att.nsa.logging.log4j.EcompLayout"><param name="ConversionPattern" value="ECOMP_DEBUG" /></layout>
	</appender>

	<logger name="org.openecomp.dcae.commonFunction.input" additivity="false">
            <level value="INFO"/>
            <appender-ref ref="IFILE"/>
    </logger> 

    <logger name="org.openecomp.dcae.commonFunction.output" additivity="false">
            <level value="INFO"/>
            <appender-ref ref="CONSOLE" />
            <appender-ref ref="OFILE"/>
    </logger> 

	<logger name="org.openecomp.dcae.commonFunction.error" additivity="false">
            <level value="DEBUG"/>
            <appender-ref ref="EFILE"/>
            <appender-ref ref="CONSOLE" />
			<appender-ref ref="ECOMP_ERROR" />
    </logger>
    
    	<!--
		The ECOMP logging standard has four specific classes of logging that are 
		unrelated to subsystem logger names. If you want them activated, uncomment
		this block.
	-->
	<logger name="com.att.ecomp.audit" additivity="false">
		<level value="info"/>
		<appender-ref ref="CONSOLE" />
		<appender-ref ref="ECOMP_AUDIT" />
	</logger>

	<logger name="com.att.ecomp.metrics" additivity="false">
		<level value="info"/>
		<appender-ref ref="ECOMP_METRIC" />
	</logger>

	<logger name="com.att.ecomp.error" additivity="false">
		<level value="info"/>
		<appender-ref ref="ECOMP_ERROR" />
	</logger>

	<logger name="com.att.ecomp.debug" additivity="false">
		<level value="info"/>
		<appender-ref ref="ECOMP_DEBUG" />
	</logger>
    
    <logger name="org.openecomp.dcae.commonFunction.EventPublisher" additivity="false">
		<level value="debug"/>
		<appender-ref ref="CONSOLE" />
		<appender-ref ref="FILE" />
	</logger>
    
    
	<logger name="com.att.nsa.apiClient.http.HttpClient" additivity="false">
		<level value="info"/>
		<appender-ref ref="FILE" />
		<appender-ref ref="CONSOLE" />
	</logger>
    
    <logger name="com.att.nsa.cambria.client.impl.CambriaSimplerBatchPublisher" additivity="false">
		<level value="info"/>
		<appender-ref ref="FILE" />
		<appender-ref ref="CONSOLE" />
	</logger>


	<root>
		<level value="DEBUG" />
		<appender-ref ref="FILE" />
		<appender-ref ref="CONSOLE" />
		<appender-ref ref="ECOMP_AUDIT" />
		<appender-ref ref="ECOMP_DEBUG" />
		<appender-ref ref="ECOMP_ERROR" />
	</root>
	
</log4j:configuration>