X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fchat%2Fbackend%2Fstorage%2Ffiles%2FFilesStorageStrategy.java;h=aaa615986075f1dc627e38b13ffdb00e239a9d4e;hb=2800b80bb0a02feb70ab9d0c804b2fcc9915f479;hp=fd8939b64f06bd7a6c7e9480423bca299895d929;hpb=74d8298a250f51a1846a92dadf15126ec9ce46f2;p=demos%2Fkafka%2Fchat diff --git a/src/main/java/de/juplo/kafka/chat/backend/storage/files/FilesStorageStrategy.java b/src/main/java/de/juplo/kafka/chat/backend/storage/files/FilesStorageStrategy.java index fd8939b6..aaa61598 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/storage/files/FilesStorageStrategy.java +++ b/src/main/java/de/juplo/kafka/chat/backend/storage/files/FilesStorageStrategy.java @@ -33,6 +33,8 @@ public class FilesStorageStrategy implements StorageStrategy private final Path storagePath; private final ShardingStrategy shardingStrategy; private final ObjectMapper mapper; + private final Level loggingLevel; + private final boolean showOperatorLine; @Override @@ -52,8 +54,8 @@ public class FilesStorageStrategy implements StorageStrategy return chatRoomInfoFlux .log( FilesStorageStrategy.class.getSimpleName(), - Level.FINE, - true) + loggingLevel, + showOperatorLine) .doFirst(() -> { try @@ -106,8 +108,8 @@ public class FilesStorageStrategy implements StorageStrategy .from(new JsonFilePublisher(chatroomsPath(), mapper, type)) .log( FilesStorageStrategy.class.getSimpleName(), - Level.FINE, - true) + loggingLevel, + showOperatorLine) .map(chatRoomInfoTo -> { UUID chatRoomId = chatRoomInfoTo.getId(); @@ -145,8 +147,8 @@ public class FilesStorageStrategy implements StorageStrategy return messageFlux .log( FilesStorageStrategy.class.getSimpleName(), - Level.FINE, - true) + loggingLevel, + showOperatorLine) .doFirst(() -> { try @@ -199,8 +201,8 @@ public class FilesStorageStrategy implements StorageStrategy .from(new JsonFilePublisher(chatroomPath(chatRoomId), mapper, type)) .log( FilesStorageStrategy.class.getSimpleName(), - Level.FINE, - true) + loggingLevel, + showOperatorLine) .map(MessageTo::toMessage); }