From 5ddee4d3b85c1b180acb506099c44678edcc57d5 Mon Sep 17 00:00:00 2001 From: Filip Krzywka Date: Fri, 29 Mar 2019 14:52:25 +0100 Subject: Merge configurations - changed temporarily HV-VES default log level to DEBUG as in current implementation we are applying LogLevel defined in configuration file only if we successfully retrieve one from configuration-module, which means that inside of this module we are logging on default level (from logback file). This should be fixed in future work - reduced log level on SDK's CbsClientImpl as it's logging frequency was too high Change-Id: If50df18df099c34bfc36d39b045140f9b9ad87f6 Issue-ID: DCAEGEN2-1347 Signed-off-by: Filip Krzywka --- sources/hv-collector-main/Dockerfile | 4 ++-- sources/hv-collector-main/src/main/docker/base.json | 12 ------------ .../main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt | 9 ++++----- sources/hv-collector-main/src/main/resources/logback.xml | 13 ++++++++----- 4 files changed, 14 insertions(+), 24 deletions(-) (limited to 'sources/hv-collector-main') diff --git a/sources/hv-collector-main/Dockerfile b/sources/hv-collector-main/Dockerfile index a1e89a73..cfd4a7bb 100644 --- a/sources/hv-collector-main/Dockerfile +++ b/sources/hv-collector-main/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/openjdk:11-jre-slim -LABEL copyright="Copyright (C) 2018 NOKIA" +LABEL copyright="Copyright (C) 2018-2019 NOKIA" LABEL license.name="The Apache Software License, Version 2.0" LABEL license.url="http://www.apache.org/licenses/LICENSE-2.0" LABEL maintainer="Nokia Wroclaw ONAP Team" @@ -19,4 +19,4 @@ COPY target/libs/internal/* ./ COPY src/main/docker/*.sh ./ COPY src/main/docker/base.json /etc/ves-hv/configuration/base.json -COPY target/hv-collector-main-*.jar ./ +COPY target/hv-collector-main-*.jar ./ \ No newline at end of file diff --git a/sources/hv-collector-main/src/main/docker/base.json b/sources/hv-collector-main/src/main/docker/base.json index 67576c80..e0b9c450 100644 --- a/sources/hv-collector-main/src/main/docker/base.json +++ b/sources/hv-collector-main/src/main/docker/base.json @@ -10,17 +10,5 @@ "requestIntervalSec": 5 }, "security": { - }, - "collector": { - "maxRequestSizeBytes": 1048576, - "kafkaServers": [ - "message-router-kafka:9092" - ], - "routing": [ - { - "fromDomain": "perf3gpp", - "toTopic": "HV_VES_PERF3GPP" - } - ] } } diff --git a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt index 22d8000e..dc207ef8 100644 --- a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt +++ b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/main.kt @@ -29,7 +29,6 @@ import org.onap.dcae.collectors.veshv.main.servers.VesServer import org.onap.dcae.collectors.veshv.model.ServiceContext import org.onap.dcae.collectors.veshv.utils.ServerHandle import org.onap.dcae.collectors.veshv.utils.logging.Logger -import org.onap.dcae.collectors.veshv.utils.neverComplete import org.onap.dcae.collectors.veshv.utils.registerShutdownHook import reactor.core.scheduler.Schedulers import java.util.concurrent.atomic.AtomicReference @@ -57,20 +56,20 @@ fun main(args: Array) { HealthState.INSTANCE.changeState(HealthDescription.HEALTHY) } .doOnError { - logger.error(ServiceContext::mdc) { "Failed to acquire configuration ${it.message}" } - logger.debug(ServiceContext::mdc) { "Detailed stack trace: $it" } + logger.error(ServiceContext::mdc) { "Failed to create configuration: ${it.message}" } + logger.withDebug(ServiceContext::mdc) { log("Detailed stack trace: ", it) } HealthState.INSTANCE.changeState(HealthDescription.DYNAMIC_CONFIGURATION_NOT_FOUND) } .doOnNext(::startServer) .doOnError(::logServerStartFailed) - .neverComplete() // TODO: remove after merging configuration stream with cbs + .then() .block() } private fun startServer(config: HvVesConfiguration) { stopRunningServer() Logger.setLogLevel(VES_HV_PACKAGE, config.logLevel) - logger.info { "Using configuration: $config" } + logger.debug(ServiceContext::mdc) { "Configuration: $config" } VesServer.start(config).let { registerShutdownHook { shutdownGracefully(it) } diff --git a/sources/hv-collector-main/src/main/resources/logback.xml b/sources/hv-collector-main/src/main/resources/logback.xml index 40f3c8a0..21c1fa31 100644 --- a/sources/hv-collector-main/src/main/resources/logback.xml +++ b/sources/hv-collector-main/src/main/resources/logback.xml @@ -20,9 +20,9 @@ --> + value="dcae-hv-ves-collector"/> + value="hv-ves"/> @@ -57,7 +57,8 @@ | ${p_mdc}\t | ${p_thr}%n"/> - + + class="ch.qos.logback.core.rolling.RollingFileAppender"> ${ONAP_LOG_PATTERN} @@ -93,8 +94,10 @@ + + - + -- cgit 1.2.3-korg