blob: a8e9ed7264f6b4adfc9c1f656ca44d1088f9b4f4 [file] [log] [blame]
Itay Hasside2da86d2017-08-24 12:54:42 +00001<?xml version="1.0" encoding="utf-8"?>
2<configuration scan="true" scanPeriod="3 seconds">
3 <property name="logDir" value="/var/log/onap" />
4 <property name="componentName" scope="system" value="sdc"></property>
5 <property name="subComponentName" scope="system" value="sdc-fe"></property>
6 <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
7 <property file="${config.home}/catalog-fe/configuration.yaml" />
8 <property name="enable-all-log" scope="context" value="false" />
9 <!-- log file names -->
10 <property name="errorLogName" value="error" />
11 <property name="metricsLogName" value="metrics" />
12 <property name="auditLogName" value="audit" />
13 <property name="debugLogName" value="debug" />
14 <property name="transactionLogName" value="transaction" />
15 <property name="allLogName" value="all" />
16 <property name="queueSize" value="256" />
17 <property name="maxFileSize" value="50MB" />
18 <property name="maxHistory" value="30" />
19 <property name="totalSizeCap" value="10GB" />
20 <property name="pattern" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}\t[%thread]\t%-5level\t%logger{36}\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n" />
21 <!-- All log -->
22 <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
23 <then>
24 <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ALL_ROLLING">
25 <file>${logDirectory}/${allLogName}.log</file>
26 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
27 <fileNamePattern>${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
28 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
29 <maxFileSize>${maxFileSize}</maxFileSize>
30 </timeBasedFileNamingAndTriggeringPolicy>
31 <maxHistory>${maxHistory}</maxHistory>
32 <totalSizeCap>${totalSizeCap}</totalSizeCap>
33 </rollingPolicy>
34 <encoder>
35 <pattern>${pattern}</pattern>
36 </encoder>
37 </appender>
38 <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ALL">
39 <appender-ref ref="ALL_ROLLING" />
40 </appender>
41 </then>
42 </if>
43 <!-- Error log -->
44 <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ERROR_ROLLING">
45 <file>${logDirectory}/${errorLogName}.log</file>
46 <!-- Audit messages filter - deny audit messages -->
47 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
48 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
49 <marker>AUDIT_MARKER</marker>
50 </evaluator>
51 <onMismatch>NEUTRAL</onMismatch>
52 <onMatch>DENY</onMatch>
53 </filter>
54 <!-- Transaction messages filter - deny Transaction messages -->
55 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
56 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
57 <marker>TRANSACTION_MARKER</marker>
58 </evaluator>
59 <onMismatch>NEUTRAL</onMismatch>
60 <onMatch>DENY</onMatch>
61 </filter>
62 <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
63 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
64 <level>INFO</level>
65 </filter>
66 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
67 <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
68 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
69 <maxFileSize>${maxFileSize}</maxFileSize>
70 </timeBasedFileNamingAndTriggeringPolicy>
71 <maxHistory>${maxHistory}</maxHistory>
72 <totalSizeCap>${totalSizeCap}</totalSizeCap>
73 </rollingPolicy>
74 <encoder>
75 <pattern>${pattern}</pattern>
76 </encoder>
77 </appender>
78 <!-- Debug log -->
79 <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="DEBUG_ROLLING">
80 <file>${logDirectory}/${debugLogName}.log</file>
81 <!-- No need to deny audit messages - they are INFO only, will be denied
82 anyway -->
83 <!-- Transaction messages filter - deny Transaction messages, there are
84 some DEBUG level messages among them -->
85 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
86 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
87 <marker>TRANSACTION_MARKER</marker>
88 </evaluator>
89 <onMismatch>NEUTRAL</onMismatch>
90 <onMatch>DENY</onMatch>
91 </filter>
92 <!-- accept DEBUG and TRACE level -->
93 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
94 <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
95 <expression>e.level.toInt() &lt;= DEBUG.toInt()</expression>
96 </evaluator>
97 <OnMismatch>DENY</OnMismatch>
98 <OnMatch>NEUTRAL</OnMatch>
99 </filter>
100 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
101 <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
102 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
103 <maxFileSize>${maxFileSize}</maxFileSize>
104 </timeBasedFileNamingAndTriggeringPolicy>
105 <maxHistory>${maxHistory}</maxHistory>
106 <totalSizeCap>${totalSizeCap}</totalSizeCap>
107 </rollingPolicy>
108 <encoder>
109 <pattern>${pattern}</pattern>
110 </encoder>
111 </appender>
112 <!-- Audit log -->
113 <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="AUDIT_ROLLING">
114 <file>${logDirectory}/${auditLogName}.log</file>
115 <!-- Audit messages filter - accept audit messages -->
116 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
117 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
118 <marker>AUDIT_MARKER</marker>
119 </evaluator>
120 <onMismatch>DENY</onMismatch>
121 <onMatch>ACCEPT</onMatch>
122 </filter>
123 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
124 <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
125 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
126 <maxFileSize>${maxFileSize}</maxFileSize>
127 </timeBasedFileNamingAndTriggeringPolicy>
128 <maxHistory>${maxHistory}</maxHistory>
129 <totalSizeCap>${totalSizeCap}</totalSizeCap>
130 </rollingPolicy>
131 <encoder>
132 <pattern>${pattern}</pattern>
133 </encoder>
134 </appender>
135 <!-- SdncTransaction log -->
136 <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="TRANSACTION_ROLLING">
137 <file>${logDirectory}/${transactionLogName}.log</file>
138 <!-- Transaction messages filter - accept audit messages -->
139 <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
140 <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
141 <marker>TRANSACTION_MARKER</marker>
142 </evaluator>
143 <onMismatch>DENY</onMismatch>
144 <onMatch>ACCEPT</onMatch>
145 </filter>
146 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
147 <fileNamePattern>${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
148 <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
149 <maxFileSize>${maxFileSize}</maxFileSize>
150 </timeBasedFileNamingAndTriggeringPolicy>
151 <maxHistory>${maxHistory}</maxHistory>
152 <totalSizeCap>${totalSizeCap}</totalSizeCap>
153 </rollingPolicy>
154 <encoder>
155 <pattern>${pattern}</pattern>
156 </encoder>
157 </appender>
158 <!-- Asynchronicity Configurations -->
159 <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_DEBUG">
160 <queueSize>${queueSize}</queueSize>
161 <appender-ref ref="DEBUG_ROLLING" />
162 </appender>
163 <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_TRANSACTION">
164 <queueSize>${queueSize}</queueSize>
165 <appender-ref ref="TRANSACTION_ROLLING" />
166 </appender>
167 <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ERROR">
168 <queueSize>${queueSize}</queueSize>
169 <appender-ref ref="ERROR_ROLLING" />
170 </appender>
171 <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_AUDIT">
172 <queueSize>${queueSize}</queueSize>
173 <appender-ref ref="AUDIT_ROLLING" />
174 </appender>
175 <root level="INFO">
176 <appender-ref ref="ASYNC_ERROR" />
177 <appender-ref ref="ASYNC_DEBUG" />
178 <appender-ref ref="ASYNC_AUDIT" />
179 <appender-ref ref="ASYNC_TRANSACTION" />
180 <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
181 <then>
182 <appender-ref ref="ALL_ROLLING" />
183 </then>
184 </if>
185 </root>
186 <logger level="INFO" name="org.openecomp.sdc" />
187</configuration>