From 5a42804ef9cb6d7fd868f26e4fd6bdc9279d75eb Mon Sep 17 00:00:00 2001 From: Nikita Smirnov <46124551+Nikita-Smirnov-Exactpro@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:50:19 +0400 Subject: [PATCH] [TH2-5148] Fixed conn write sailfish service logs into last sailfish workspace layer problem (#192) * Disabled appenders --- README.md | 5 ++++- gradle.properties | 2 +- .../exactpro/th2/conn/MicroserviceMain.java | 18 +++++++++--------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 954c4df..1370f7f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Connect (4.1.0) +# Connect (4.1.1) The "Connect" component is responsible for the communication with a target system. This component implements the logic of the interaction protocol, receiving and sending messages from and to the system, respectively. @@ -127,6 +127,9 @@ spec: ## Release notes +### 4.1.1 ++ Fixed conn write sailfish service logs into last sailfish workspace layer problem + ### 4.1.0 + Migrate to th2 gradle plugin `0.1.1` diff --git a/gradle.properties b/gradle.properties index c015a37..5113223 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -release_version = 4.1.0 \ No newline at end of file +release_version = 4.1.1 \ No newline at end of file diff --git a/src/main/java/com/exactpro/th2/conn/MicroserviceMain.java b/src/main/java/com/exactpro/th2/conn/MicroserviceMain.java index 8547a9d..3872cee 100644 --- a/src/main/java/com/exactpro/th2/conn/MicroserviceMain.java +++ b/src/main/java/com/exactpro/th2/conn/MicroserviceMain.java @@ -133,8 +133,10 @@ public static void main(String[] args) { processor.onComplete(); }); - IServiceFactory serviceFactory = new ServiceFactory(workspaceFolder, - Files.createTempDirectory("sailfish-workspace").toFile()); + IServiceFactory serviceFactory = ServiceFactory + .builder(workspaceFolder, Files.createTempDirectory("sailfish-workspace").toFile()) + .useServiceAppenders(false) + .build(); disposer.register(() -> { LOGGER.info("Close service factory"); serviceFactory.close(); @@ -280,13 +282,11 @@ private static Object getParamValue(ISettingsProxy settings, String parameterNam LOGGER.info("AvailableProcessors '{}'", Runtime.getRuntime().availableProcessors()); ConnectableFlowable messageConnectable = flowable - .doOnNext(message -> { - LOGGER.trace( - "Message before observeOn with sequence {} and direction {}", - message.getSequence(), - message.getDirection() - ); - }) + .doOnNext(message -> LOGGER.trace( + "Message before observeOn with sequence {} and direction {}", + message.getSequence(), + message.getDirection() + )) .observeOn(PIPELINE_SCHEDULER) .doOnNext(connectivityMessage -> { LOGGER.debug("Start handling connectivity message {}", connectivityMessage);