1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2020 Huawei Technologies Co., Ltd.
7 It is a logging framework from SO. Here basically we are having 2 interceptors which extends AbstractSoapInterceptor.
9 SOAPLoggingInInterceptor:
10 +++++++++++++++++++++++++++
12 * This interceptor is responsible for Capturing requestId , client ip address , invocation id, service name, instance id, entry timestamp , log timestamp, Elapsed time for each request and update the MDC logger with staus In-progress.
14 SOAPLoggingOutInterceptor:
15 ++++++++++++++++++++++++++++
16 * This interceptor is responsible for log timestamp , elapsed time for each request and checks for if there is any exception update the MDC loggers with 500 response code otherwise update the status as completed.
19 cxf-logging Used By below components of SO:
20 ++++++++++++++++++++++++++++++++++++++++++++
21 The cxf-logging framework is used by below components of so.
23 mso-openstack-adapter.
24 mso-requests-db-adapter.
26 mso-infrastructure-bpmn.
28 cxf-logging dependency for using in other components:
29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
32 <groupId>org.onap.so</groupId>
33 <artifactId>cxf-logging</artifactId>
34 <version>${project.version}</version>
41 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
43 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
45 <modelVersion>4.0.0</modelVersion>
48 <groupId>org.onap.so</groupId>
49 <artifactId>so</artifactId>
50 <version>1.6.0-SNAPSHOT</version>
53 <name>CXFLogging</name>
54 <description>Common CXF Logging Classes</description>
59 <groupId>org.apache.cxf</groupId>
60 <artifactId>cxf-rt-rs-client</artifactId>
61 <version>${cxf.version}</version>
66 <groupId>org.apache.cxf</groupId>
67 <artifactId>cxf-rt-bindings-soap</artifactId>
68 <version>${cxf.version}</version>
74 <groupId>org.apache.cxf</groupId>
75 <artifactId>cxf-rt-transports-http</artifactId>
76 <version>${cxf.version}</version>
82 <groupId>javax.servlet</groupId>
83 <artifactId>javax.servlet-api</artifactId>
89 <groupId>org.slf4j</groupId>
90 <artifactId>slf4j-ext</artifactId>
96 <groupId>org.slf4j</groupId>
97 <artifactId>slf4j-api</artifactId>
106 <directory>src/main/resources</directory>
107 <filtering>true</filtering>
113 <directory>src/main/java</directory>
117 <include>*.java</include>
127 <artifactId>cxf-logging</artifactId>
133 Here we can do configure the logger properties for the cxf-logging.
137 <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}"/>
139 <property name="p_lvl" value="%level"/>
141 <property name="p_log" value="%logger"/>
143 <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/>
145 <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/>
147 <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/>
149 <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/>
151 <property name="p_thr" value="%thread"/>
153 <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/>
155 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
159 <pattern>${pattern}</pattern>
165 <appender name="test"
166 class="org.onap.so.utils.TestAppender" />
168 <logger name="com.att.ecomp.audit" level="info" additivity="false">
170 <appender-ref ref="STDOUT" />
174 <logger name="com.att.eelf.metrics" level="info" additivity="false">
176 <appender-ref ref="STDOUT" />
180 <logger name="com.att.eelf.error" level="WARN" additivity="false">
182 <appender-ref ref="STDOUT" />
186 <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false">
187 <appender-ref ref="STDOUT" />
189 <appender-ref ref="test" />
193 <logger name="org.flywaydb" level="DEBUG" additivity="false">
194 <appender-ref ref="STDOUT" />
198 <logger name="ch.vorburger" level="WARN" additivity="false">
199 <appender-ref ref="STDOUT" />
204 <appender-ref ref="STDOUT" />
205 <appender-ref ref="test" />