X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fchat%2Fbackend%2Fstorage%2Ffiles%2FFilesStorageStrategy.java;h=7c1fef02f825f68a87050a0e427f3136050b607d;hb=7107fd0b4795d95b6c7f49cf4e765b82c16d016e;hp=aaa615986075f1dc627e38b13ffdb00e239a9d4e;hpb=2800b80bb0a02feb70ab9d0c804b2fcc9915f479;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 aaa61598..7c1fef02 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,7 @@ public class FilesStorageStrategy implements StorageStrategy private final Path storagePath; private final ShardingStrategy shardingStrategy; private final ObjectMapper mapper; + private final String loggingCategory = FilesStorageStrategy.class.getSimpleName(); private final Level loggingLevel; private final boolean showOperatorLine; @@ -53,7 +54,7 @@ public class FilesStorageStrategy implements StorageStrategy return chatRoomInfoFlux .log( - FilesStorageStrategy.class.getSimpleName(), + loggingCategory, loggingLevel, showOperatorLine) .doFirst(() -> @@ -107,7 +108,7 @@ public class FilesStorageStrategy implements StorageStrategy return Flux .from(new JsonFilePublisher(chatroomsPath(), mapper, type)) .log( - FilesStorageStrategy.class.getSimpleName(), + loggingCategory, loggingLevel, showOperatorLine) .map(chatRoomInfoTo -> @@ -146,7 +147,7 @@ public class FilesStorageStrategy implements StorageStrategy return messageFlux .log( - FilesStorageStrategy.class.getSimpleName(), + loggingCategory, loggingLevel, showOperatorLine) .doFirst(() -> @@ -200,7 +201,7 @@ public class FilesStorageStrategy implements StorageStrategy return Flux .from(new JsonFilePublisher(chatroomPath(chatRoomId), mapper, type)) .log( - FilesStorageStrategy.class.getSimpleName(), + loggingCategory, loggingLevel, showOperatorLine) .map(MessageTo::toMessage);