<parent>
<groupId>org.onap.oparent</groupId>
<artifactId>oparent</artifactId>
- <version>1.1.2-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-analytics</artifactId>
<packaging>pom</packaging>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
<name>logging-analytics</name>
<url>http://maven.apache.org</url>
<modules>
<parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-analytics</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>logging-pylog</artifactId>
- <version>1.2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>logging-pylog</name>
<description>onap python logging library</description>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/test/java"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/logging-library">
<attributes>
<attribute name="module" value="true"/>
<parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-reference</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>logging-demo</artifactId>
<packaging>war</packaging>
<name>logging-demo</name>
<properties>
<jackson-2-version>2.5.1</jackson-2-version>
- <spring.version>4.3.6.RELEASE</spring.version>
+ <spring.version>4.3.6.RELEASE</spring.version>
+ <logback.version>1.2.3</logback.version>
</properties>
<build>
<plugins>
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-library</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-mock-service</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <version>${logback.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>${logback.version}</version>
+ </dependency>
</dependencies>
</project>
*/
package org.onap.demo.logging;
+import javax.servlet.http.HttpServletRequest;
+
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@Service("daoFacade")
+/**
+ * Run with http://localhost:8080/logging-demo/rest/health/health
+ *
+ */
public class ApplicationService implements ApplicationServiceLocal {
@Override
- public Boolean health() {
+ public Boolean health(HttpServletRequest servletRequest) {
Boolean health = true;
// TODO: check database
+ // Log outside the AOP framework - to simulate existing component logs between the ENTRY/EXIT markers
+ LoggerFactory.getLogger(this.getClass()).info("Running /health");
return health;
}
*/
package org.onap.demo.logging;
+import javax.servlet.http.HttpServletRequest;
+
public interface ApplicationServiceLocal {
- Boolean health();
+ Boolean health(HttpServletRequest request);
}
--- /dev/null
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.logging
+ * ================================================================================
+ * Copyright © 2018 Amdocs
+ * All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.demo.logging;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.After;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.onap.logging.ref.slf4j.ONAPLogAdapter;
+import org.slf4j.LoggerFactory;
+
+@Aspect
+public class LoggingAspect {
+
+ @Before("execution(* org.onap.demo.logging.*.*(..))")
+ public void logBefore(JoinPoint joinPoint) {
+ Object[] args = joinPoint.getArgs();
+ Object servletRequest = args[0];
+ ONAPLogAdapter.HttpServletRequestAdapter requestAdapter =
+ new ONAPLogAdapter.HttpServletRequestAdapter((HttpServletRequest)servletRequest);
+ final ONAPLogAdapter adapter = new ONAPLogAdapter(
+ LoggerFactory.getLogger(joinPoint.getTarget().getClass()));
+ try {
+ adapter.entering(requestAdapter);
+ } finally {
+ }
+ }
+
+ @After("execution(* org.onap.demo.logging.*.*(..))")
+ public void logAfter(JoinPoint joinPoint) {
+ final ONAPLogAdapter adapter = new ONAPLogAdapter(
+ LoggerFactory.getLogger(joinPoint.getTarget().getClass()));
+ adapter.exiting();
+ }
+}
package org.onap.demo.logging;
import javax.inject.Inject;
+import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Application;
+import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import org.springframework.beans.factory.annotation.Qualifier;
@Path("/health")
public class RestHealthServiceImpl extends Application {
+
+ @Context private HttpServletRequest servletRequest;
+
@Inject
@Qualifier("daoFacade")
private ApplicationServiceLocal applicationServiceLocal;
@Path("/health")
@Produces(MediaType.TEXT_HTML)
public String getHealth() {
- return applicationServiceLocal.health().toString();
+
+ return applicationServiceLocal.health(servletRequest).toString();
}
}
@Path("/read")
public class RestServiceImpl extends Application {
- @Inject
- @Qualifier("daoFacade")
+ @Inject
+ @Qualifier("daoFacade")
private ApplicationServiceLocal applicationServiceLocal;
-
- @GET
- @Path("/test")
- @Produces(MediaType.TEXT_HTML)
- public String getTest() {
- return "testing: " + applicationServiceLocal;
- }
- private ApplicationServiceLocal getApplicationService() {
- return applicationServiceLocal;
- }
+ @GET
+ @Path("/test")
+ @Produces(MediaType.TEXT_HTML)
+ public String getTest() {
+ return "testing: " + applicationServiceLocal;
+
+ }
+
+ private ApplicationServiceLocal getApplicationService() {
+ return applicationServiceLocal;
+ }
}
--- /dev/null
+<configuration>
+ <property name="p_tim" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}"/>
+ <property name="p_lvl" value="%level"/>
+ <property name="p_log" value="%logger"/>
+ <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/>
+ <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/>
+ <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/>
+ <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/>
+ <property name="p_thr" value="%thread"/>
+ <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"/>
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <file>output.log</file>
+ <encoder>
+ <pattern>${pattern}</pattern>
+ </encoder>
+ </appender>
+
+ <logger level="INFO" name="org.onap.logging.ref.slf4j" additivity="false">
+ <appender-ref ref="STDOUT" />
+ <appender-ref ref="FILE" />
+ </logger>
+
+ <root level="INFO">
+ <appender-ref ref="STDOUT" />
+ </root>
+</configuration>
</context:component-scan>
<!-- Rest controllers -->
<context:component-scan base-package="org.onap.demo.logging" />
+ <!-- enable logging AOP proxies -->
+ <aop:aspectj-autoproxy />
+ <beans>
+ <bean class="org.onap.demo.logging.LoggingAspect" /> <!-- required even though we annotate with @Aspect -->
+ </beans>
</beans>
--- /dev/null
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.logging
+ * ================================================================================
+ * Copyright © 2018 Amdocs
+ * All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.logging.demo;
+
+import static org.junit.Assert.*;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Test;
+import org.onap.demo.logging.ApplicationService;
+import org.springframework.mock.web.MockHttpServletRequest;
+import org.springframework.util.Assert;
+
+public class ApplicationServiceTest {
+
+ @Test
+ public final void testHealth() {
+ ApplicationService service = new ApplicationService();
+ Assert.notNull(service);
+ HttpServletRequest servletRequest = new MockHttpServletRequest();
+ Assert.notNull(servletRequest);
+ boolean health = service.health(servletRequest);
+ Assert.isTrue(health);
+ System.out.println("health : " + health);
+ }
+
+}
--- /dev/null
+FROM tomcat:8.0.48-jre8
+COPY target/logging-demo-*-SNAPSHOT.war /usr/local/tomcat/webapps/logging-demo.war
--- /dev/null
+#!/bin/bash
+#############################################################################
+#
+# Copyright © 2018 Amdocs.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#############################################################################
+# v20180625
+# https://wiki.onap.org/display/DW/Cloud+Native+Deployment
+# source from https://jira.onap.org/browse/LOG-135
+# Michael O'Brien
+
+mkdir target
+# reuse the same war for the service pods
+cp ../../logging-demo/target/*.war target
+docker build -t oomk8s/logging-demo-service -f DockerFile .
+docker images | grep logging-demo-service
+docker tag oomk8s/logging-demo-service oomk8s/logging-demo-service:0.0.3
+docker login
+docker push oomk8s/logging-demo-service:0.0.3
+#docker run -d -it --rm -p 8888:8080 oomk8s/logging-demo-service:latest
FROM tomcat:8.0.48-jre8
-COPY target/logging-demo-1.2.0-SNAPSHOT.war /usr/local/tomcat/webapps/logging-demo.war
+COPY target/logging-demo-*-SNAPSHOT.war /usr/local/tomcat/webapps/logging-demo.war
+#!/bin/bash
+#############################################################################
+#
+# Copyright © 2018 Amdocs.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#############################################################################
+# v20180625
+# https://wiki.onap.org/display/DW/Cloud+Native+Deployment
+# source from https://jira.onap.org/browse/LOG-135
+# Michael O'Brien
+
+
mkdir target
cp ../../logging-demo/target/*.war target
docker build -t oomk8s/logging-demo-nbi -f DockerFile .
docker images | grep logging-demo-nbi
-docker tag oomk8s/logging-demo-nbi oomk8s/logging-demo-nbi:0.0.1
+docker tag oomk8s/logging-demo-nbi oomk8s/logging-demo-nbi:0.0.3
docker login
-docker push oomk8s/logging-demo-nbi:0.0.1
+docker push oomk8s/logging-demo-nbi:0.0.3
#docker run -d -it --rm -p 8888:8080 oomk8s/logging-demo-nbi:latest
<parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-reference</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>logging-docker-root</artifactId>
<packaging>pom</packaging>
kind: Service
metadata:
labels:
- app: logdemo
- name: logdemo
- namespace: "{{ .Values.nsPrefix }}-logdemo"
+ app: logservice
+ name: logservice
+ namespace: "{{ .Values.nsPrefix }}-logservice"
spec:
ports:
- port: 8080
- nodePort: {{ .Values.nodePortPrefix }}99
+ nodePort: {{ .Values.nodePortPrefix }}98
selector:
- app: logdemo
+ app: logservice
type: NodePort
-#{{ if not .Values.disableLogdemoLogdemo }}
+#{{ if not .Values.disableLogserviceLogservice }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: logdemo
- namespace: "{{ .Values.nsPrefix }}-logdemo"
+ name: logservice
+ namespace: "{{ .Values.nsPrefix }}-logservice"
spec:
selector:
matchLabels:
- app: logdemo
+ app: logservice
template:
metadata:
labels:
- app: logdemo
- name: logdemo
+ app: logservice
+ name: logservice
spec:
containers:
- - image: {{ .Values.image.logdemo }}
+ - image: {{ .Values.image.logservice }}
imagePullPolicy: {{ .Values.pullPolicy }}
- name: logdemo
+ name: logservice
volumeMounts:
- name: localtime
mountPath: /etc/localtime
readOnly: true
- - name: logdemo-eteshare
+ - name: logservice-eteshare
mountPath: /share
ports:
- containerPort: 8080
- name: localtime
hostPath:
path: /etc/localtime
- - name: logdemo-eteshare
+ - name: logservice-eteshare
hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/logdemo/eteshare
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/logservice/eteshare
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
nodePortPrefix: 302
image:
readiness: oomk8s/readiness-check:1.0.0
- logdemo: oomk8s/logging-demo-nbi:0.0.1
+ logdemo: oomk8s/logging-demo-nbi:0.0.2
filebeat: docker.elastic.co/beats/filebeat:5.5.0
--- /dev/null
+apiVersion: v1
+description: A Helm chart for Kubernetes
+name: logdemoservice
+version: 0.1.0
--- /dev/null
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: logdemoservice
+ name: logdemoservice
+ namespace: "{{ .Values.nsPrefix }}-logdemoservice"
+spec:
+ ports:
+ - port: 8080
+ nodePort: {{ .Values.nodePortPrefix }}98
+ selector:
+ app: logdemoservice
+ type: NodePort
--- /dev/null
+#{{ if not .Values.disableLogdemoserviceLogdemoservice }}
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: logdemoservice
+ namespace: "{{ .Values.nsPrefix }}-logdemoservice"
+spec:
+ selector:
+ matchLabels:
+ app: logdemoservice
+ template:
+ metadata:
+ labels:
+ app: logdemoservice
+ name: logdemoservice
+ spec:
+ containers:
+ - image: {{ .Values.image.logdemoservice }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ name: logdemoservice
+ volumeMounts:
+ - mountPath: /var/log/onap
+ name: log-mock-demo-service-logs
+ ports:
+ - containerPort: 8080
+ readinessProbe:
+ tcpSocket:
+ port: 8080
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ - image: {{ .Values.image.filebeat }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ name: filebeat-onap
+ volumeMounts:
+ - mountPath: /usr/share/filebeat/filebeat.yml
+ name: filebeat-conf
+ - mountPath: /var/log/onap
+ name: log-mock-demo-service-logs
+ - mountPath: /usr/share/filebeat/data
+ name: log-mock-demo-service-data-filebeat
+ volumes:
+ - name: filebeat-conf
+ hostPath:
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ - name: log-mock-demo-service-logs
+ emptyDir: {}
+ - name: log-mock-demo-service-data-filebeat
+ emptyDir: {}
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ - name: logdemoservice-eteshare
+ hostPath:
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/logdemoservice/eteshare
+ imagePullSecrets:
+ - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#{{ end }}
--- /dev/null
+nsPrefix: onap
+pullPolicy: Always
+nodePortPrefix: 302
+image:
+ readiness: oomk8s/readiness-check:1.0.0
+ logdemoservice: oomk8s/logging-demo-service:0.0.1
+ filebeat: docker.elastic.co/beats/filebeat:5.5.0
<parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-reference</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>logging-kubernetes</artifactId>
<packaging>pom</packaging>
<parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-reference</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>logging-library</artifactId>
<properties>
</properties>
<dependencies>
+ <dependency>
+ <groupId>org.onap.logging-analytics</groupId>
+ <artifactId>logging-slf4j</artifactId>
+ <version>1.2.2-SNAPSHOT</version>
+ </dependency>
</dependencies>
</project>
<parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-reference</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>logging-mock-service</artifactId>
<packaging>jar</packaging>
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-library</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.logging-analytics</groupId>
+ <artifactId>logging-slf4j</artifactId>
+ <version>1.2.2-SNAPSHOT</version>
</dependency>
</dependencies>
-
</project>
<parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-reference</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>logging-slf4j-demo</artifactId>
<name>logging-slf4j-demo</name>
<packaging>war</packaging>
- <version>1.2.0-SNAPSHOT</version>
-
<properties>
<springframework.boot.version>1.5.10.RELEASE</springframework.boot.version>
</properties>
<parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-reference</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>logging-slf4j</artifactId>
<name>logging-slf4j</name>
<packaging>jar</packaging>
- <version>1.2.0-SNAPSHOT</version>
-
<dependencies>
<!-- Exported dependencies. -->
<dependency>
// Default the service name to the requestURI, in the event that
// no value has been provided.
- if (MDC.get(ONAPLogConstants.MDCs.SERVICE_NAME) == null) {
+ if (MDC.get(ONAPLogConstants.MDCs.SERVICE_NAME) == null ||
+ MDC.get(ONAPLogConstants.MDCs.SERVICE_NAME).equalsIgnoreCase(EMPTY_MESSAGE)) {
MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, request.getRequestURI());
}
MDC.clear();
}
}
+
+ /**
+ * Test ENTERING with an EMPTY_STRING serviceName.
+ */
+ @Test
+ public void testEnteringWithEMPTY_STRING_serviceName() {
+
+ final Logger logger = LoggerFactory.getLogger(this.getClass());
+ final ONAPLogAdapter adapter = new ONAPLogAdapter(logger);
+ final MockHttpServletRequest http = new MockHttpServletRequest();
+ http.setRequestURI("uri123");
+ http.setServerName("local123");
+ http.setRemoteAddr("remote123");
+ http.addHeader("X-ONAP-RequestID", "request123");
+ http.addHeader("X-ONAP-InvocationID", "invocation123");
+ http.addHeader("X-ONAP-PartnerName", "partner123");
+
+ try {
+ // an empty string should kick in setting the actual service name (treated same as null)
+ adapter.getServiceDescriptor().setServiceName("");
+ adapter.entering(http);
+ final Map<String, String> mdcs = MDC.getCopyOfContextMap();
+ assertThat(mdcs.get("RequestID"), is("request123"));
+ assertThat(mdcs.get("InvocationID"), is("invocation123"));
+ assertThat(mdcs.get("PartnerName"), is("partner123"));
+ assertThat(mdcs.get("ServiceName"), is("uri123"));
+ assertThat(mdcs.get("ServerFQDN"), is("local123"));
+ assertThat(mdcs.get("ClientIPAddress"), is("remote123"));
+
+ // Timestamp format and value:
+
+ final String invokeTimestampString = mdcs.get("InvokeTimestamp");
+ assertThat(invokeTimestampString, notNullValue());
+ assertThat(invokeTimestampString, endsWith("Z"));
+ final long invokeTimestamp = DatatypeConverter.parseDateTime(invokeTimestampString).getTimeInMillis();
+ assertThat(Math.abs(System.currentTimeMillis() - invokeTimestamp), lessThan(5000L));
+ }
+ finally {
+ MDC.clear();
+ }
+ }
@Test
public void testSetServiceDescriptor() {
<parent>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-analytics</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
</parent>
<artifactId>logging-reference</artifactId>
<packaging>pom</packaging>