diff options
author | Filip Krzywka <filip.krzywka@nokia.com> | 2019-03-29 14:52:25 +0100 |
---|---|---|
committer | Filip Krzywka <filip.krzywka@nokia.com> | 2019-04-02 10:12:04 +0200 |
commit | 5ddee4d3b85c1b180acb506099c44678edcc57d5 (patch) | |
tree | 60d8910b33efa7d163ac6f7d2714de245914b9c9 /sources/hv-collector-main/src | |
parent | 087a6ef92e53452faaaee0872ad5183b08268c30 (diff) |
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 <filip.krzywka@nokia.com>
Diffstat (limited to 'sources/hv-collector-main/src')
3 files changed, 12 insertions, 22 deletions
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<String>) { 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 @@ --> <configuration> <property name="COMPONENT_NAME" - value="dcae-hv-ves-collector"/> + value="dcae-hv-ves-collector"/> <property name="COMPONENT_SHORT_NAME" - value="hv-ves"/> + value="hv-ves"/> <property name="LOG_FILENAME" value="${COMPONENT_SHORT_NAME}"/> <property name="LOG_PATH" value="/var/log/ONAP/${COMPONENT_NAME}"/> @@ -57,7 +57,8 @@ | ${p_mdc}\t | ${p_thr}%n"/> - <property name="ONAP_LOG_PATTERN" value="%nopexception${p_log}|${p_tim}|${p_lvl}|${p_msg}|${p_mdc}|${p_exc}|${p_mak}|${p_thr}%n"/> + <property name="ONAP_LOG_PATTERN" + value="%nopexception${p_log}|${p_tim}|${p_lvl}|${p_msg}|${p_mdc}|${p_exc}|${p_mak}|${p_thr}%n"/> <property name="ONAP_LOG_PATTERN_FROM_WIKI" value="%nopexception%logger |%date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX,UTC} @@ -76,7 +77,7 @@ </appender> <appender name="ROLLING-FILE" - class="ch.qos.logback.core.rolling.RollingFileAppender"> + class="ch.qos.logback.core.rolling.RollingFileAppender"> <encoder> <pattern>${ONAP_LOG_PATTERN}</pattern> </encoder> @@ -93,8 +94,10 @@ <logger name="io.netty" level="INFO"/> <logger name="io.netty.util" level="WARN"/> <logger name="org.apache.kafka" level="INFO"/> + <logger name="org.onap.dcaegen2.services.sdk" level="INFO"/> + <logger name="org.onap.dcaegen2.services.sdk.rest.services.cbs.client.impl.CbsClientImpl" level="WARN"/> - <root level="INFO"> + <root level="DEBUG"> <appender-ref ref="CONSOLE"/> <appender-ref ref="ROLLING-FILE"/> </root> |