From 27cbf329e79a4dc5c7032abd966710a374ceb0a2 Mon Sep 17 00:00:00 2001 From: anton Date: Tue, 21 Apr 2020 20:17:32 +0300 Subject: [PATCH] add file logging mode --- .../java/ru/art/logging/LoggerConfigurationService.java | 6 +++++- .../main/java/ru/art/logging/LoggingModuleConstants.java | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/application-logging/src/main/java/ru/art/logging/LoggerConfigurationService.java b/application-logging/src/main/java/ru/art/logging/LoggerConfigurationService.java index a8bf2e480..88ae6b42c 100644 --- a/application-logging/src/main/java/ru/art/logging/LoggerConfigurationService.java +++ b/application-logging/src/main/java/ru/art/logging/LoggerConfigurationService.java @@ -93,7 +93,11 @@ static Set loadLoggingModes() { return appenderRefs.stream() .map(AppenderRef::getRef) .filter(Objects::nonNull) - .map(ref -> ref.equalsIgnoreCase(SocketAppender.class.getSimpleName()) ? SOCKET : CONSOLE) + .map(ref -> ref.equalsIgnoreCase(SocketAppender.class.getSimpleName()) + ? SOCKET + : ref.equalsIgnoreCase(FileAppender.class.getSimpleName()) + ? FILE + : CONSOLE) .collect(toSet()); } diff --git a/application-logging/src/main/java/ru/art/logging/LoggingModuleConstants.java b/application-logging/src/main/java/ru/art/logging/LoggingModuleConstants.java index b0513d084..4ebf131d5 100644 --- a/application-logging/src/main/java/ru/art/logging/LoggingModuleConstants.java +++ b/application-logging/src/main/java/ru/art/logging/LoggingModuleConstants.java @@ -30,6 +30,7 @@ public interface LoggingModuleConstants { enum LoggingMode { CONSOLE, + FILE, SOCKET }