From de38dcba1a6d220872b6918e4ddffa57c5ed2305 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Mon, 30 Sep 2024 16:21:27 +0000 Subject: [PATCH] Removing unused logging utilities class Signed-off-by: Peter Nied --- .../migrations/bulkload/common/Logging.java | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 RFS/src/main/java/org/opensearch/migrations/bulkload/common/Logging.java diff --git a/RFS/src/main/java/org/opensearch/migrations/bulkload/common/Logging.java b/RFS/src/main/java/org/opensearch/migrations/bulkload/common/Logging.java deleted file mode 100644 index da6897540..000000000 --- a/RFS/src/main/java/org/opensearch/migrations/bulkload/common/Logging.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.opensearch.migrations.bulkload.common; - -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.core.LoggerContext; -import org.apache.logging.log4j.core.config.Configuration; - -import com.beust.jcommander.IStringConverter; -import com.beust.jcommander.ParameterException; - -public class Logging { - private Logging() {} - - public static void setLevel(Level level) { - LoggerContext ctx = (LoggerContext) LogManager.getContext(false); - Configuration config = ctx.getConfiguration(); - config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME).setLevel(level); - ctx.updateLoggers(); - } - - public static class ArgsConverter implements IStringConverter { - @Override - public Level convert(String value) { - switch (value) { - case "debug": - return Level.DEBUG; - case "info": - return Level.INFO; - case "warn": - return Level.WARN; - case "error": - return Level.ERROR; - default: - throw new ParameterException("Invalid source version: " + value); - } - } - } -}