From 06ed6e4e26e523bde3526b3b22bac1aa17d88ce0 Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Fri, 1 Sep 2023 12:03:35 -0300 Subject: [PATCH] Add legacy message --- .../src/main/java/io/split/client/SplitFactoryImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/src/main/java/io/split/client/SplitFactoryImpl.java b/client/src/main/java/io/split/client/SplitFactoryImpl.java index 80f4df244..e11346d72 100644 --- a/client/src/main/java/io/split/client/SplitFactoryImpl.java +++ b/client/src/main/java/io/split/client/SplitFactoryImpl.java @@ -115,6 +115,7 @@ public class SplitFactoryImpl implements SplitFactory { private static final Logger _log = LoggerFactory.getLogger(SplitFactory.class); + private static final String LEGACY_LOG_MESSAGE = "The sdk initialize in localhost mode using Legacy file. The splitFile or inputStream doesn't add it to the config."; private final static long SSE_CONNECT_TIMEOUT = 30000; private final static long SSE_SOCKET_TIMEOUT = 70000; @@ -645,17 +646,17 @@ private SplitChangeFetcher createSplitChangeFetcher(SplitClientConfig splitClien FileTypeEnum fileType = splitClientConfig.fileType(); if (splitFile != null && inputStream != null) { _log.warn("splitFile or inputStreamProvider should have a value, not both"); - _log.warn("The sdk initialize in localhost mode using Legacy file. The splitFile or inputStream doesn't add it to the config."); + _log.warn(LEGACY_LOG_MESSAGE); return new LegacyLocalhostSplitChangeFetcher(splitFile); } if (inputStream != null && fileType == null) { _log.warn("If inputStreamProvider is not null, then fileType must also have a non-null value"); - _log.warn("The sdk initialize in localhost mode using Legacy file. The splitFile or inputStream doesn't add it to the config."); + _log.warn(LEGACY_LOG_MESSAGE); return new LegacyLocalhostSplitChangeFetcher(splitFile); } if (inputStream == null && splitFile == null){ _log.warn("splitFile or inputStreamProvider should have a value"); - _log.warn("The sdk initialize in localhost mode using Legacy file. The splitFile or inputStream doesn't add it to the config."); + _log.warn(LEGACY_LOG_MESSAGE); return new LegacyLocalhostSplitChangeFetcher(splitFile); } if (splitFile != null) { @@ -684,7 +685,7 @@ private SplitChangeFetcher createSplitChangeFetcher(SplitClientConfig splitClien return new LegacyLocalhostSplitChangeFetcher(splitFile); } } - _log.warn("The sdk initialize in localhost mode using Legacy file. The splitFile or inputStream doesn't add it to the config."); + _log.warn(LEGACY_LOG_MESSAGE); return new LegacyLocalhostSplitChangeFetcher(splitFile); } } \ No newline at end of file