From a344b27a1ba91b816142caf6be662eb1c1a828fe Mon Sep 17 00:00:00 2001 From: prathabanKavin Date: Fri, 19 Jan 2024 10:09:24 +0530 Subject: [PATCH] Removing redundant methods from loggers --- .../extensions/logger/spi/EntgraLogger.java | 16 ------ .../impl/EntgraAppInstallLoggerImpl.java | 56 ------------------ .../EntgraDeviceConnectivityLoggerImpl.java | 56 ------------------ .../impl/EntgraDeviceEnrolmentLoggerImpl.java | 56 ------------------ .../logger/impl/EntgraDeviceLoggerImpl.java | 56 ------------------ .../logger/impl/EntgraGroupMgtLoggerImpl.java | 56 ------------------ .../logger/impl/EntgraPolicyLoggerImpl.java | 56 ------------------ .../logger/impl/EntgraRoleMgtLoggerImpl.java | 56 ------------------ .../impl/EntgraUserLoginLoggerImpl.java | 57 ------------------- .../logger/impl/EntgraUserMgtLoggerImpl.java | 56 ------------------ 10 files changed, 521 deletions(-) diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/logger/spi/EntgraLogger.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/logger/spi/EntgraLogger.java index 1329889c03..b906ac3fd8 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/logger/spi/EntgraLogger.java +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.logger/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/logger/spi/EntgraLogger.java @@ -47,22 +47,6 @@ public interface EntgraLogger extends Log { void warn(Object object, Throwable t, LogContext logContext); - void info(String message, LogContext logContext); - - void debug(String message, LogContext logContext); - - void error(String message, LogContext logContext); - - void error(String message, Throwable t, LogContext logContext); - - void warn(String message, LogContext logContext); - - void warn(String message, Throwable t, LogContext logContext); - - void trace(String message, LogContext logContext); - - void fatal(String message, LogContext logContext); - void clearLogContext(); } diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraAppInstallLoggerImpl.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraAppInstallLoggerImpl.java index 81f071c2af..e690c8118e 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraAppInstallLoggerImpl.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraAppInstallLoggerImpl.java @@ -51,13 +51,6 @@ public class EntgraAppInstallLoggerImpl implements EntgraLogger { log.info(o, throwable); } - @Override - public void info(String message, LogContext logContext) { - AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; - MDCContextUtil.populateAppInstallMDCContext(appInstallLogContext); - log.info(message); - } - @Override public void info(Object object, LogContext logContext) { AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; @@ -90,13 +83,6 @@ public class EntgraAppInstallLoggerImpl implements EntgraLogger { log.debug(o, throwable); } - @Override - public void debug(String message, LogContext logContext) { - AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; - MDCContextUtil.populateAppInstallMDCContext(appInstallLogContext); - log.debug(message); - } - @Override public void debug(Object object, LogContext logContext) { AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; @@ -129,20 +115,6 @@ public class EntgraAppInstallLoggerImpl implements EntgraLogger { log.error(o, throwable); } - @Override - public void error(String message, LogContext logContext) { - AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; - MDCContextUtil.populateAppInstallMDCContext(appInstallLogContext); - log.error(message); - } - - @Override - public void error(String message, Throwable t, LogContext logContext) { - AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; - MDCContextUtil.populateAppInstallMDCContext(appInstallLogContext); - log.error(message, t); - } - @Override public void error(Object object, LogContext logContext) { AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; @@ -175,20 +147,6 @@ public class EntgraAppInstallLoggerImpl implements EntgraLogger { log.warn(o, throwable); } - @Override - public void warn(String message, LogContext logContext) { - AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; - MDCContextUtil.populateAppInstallMDCContext(appInstallLogContext); - log.warn(message); - } - - @Override - public void warn(String message, Throwable t, LogContext logContext) { - AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; - MDCContextUtil.populateAppInstallMDCContext(appInstallLogContext); - log.warn(message, t); - } - @Override public void warn(Object object, LogContext logContext) { AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; @@ -221,13 +179,6 @@ public class EntgraAppInstallLoggerImpl implements EntgraLogger { log.trace(o, throwable); } - @Override - public void trace(String message, LogContext logContext) { - AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; - MDCContextUtil.populateAppInstallMDCContext(appInstallLogContext); - log.trace(message); - } - @Override public void trace(Object object, LogContext logContext) { AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; @@ -260,13 +211,6 @@ public class EntgraAppInstallLoggerImpl implements EntgraLogger { log.fatal(0, throwable); } - @Override - public void fatal(String message, LogContext logContext) { - AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; - MDCContextUtil.populateAppInstallMDCContext(appInstallLogContext); - log.fatal(message); - } - @Override public void fatal(Object object, LogContext logContext) { AppInstallLogContext appInstallLogContext = (AppInstallLogContext) logContext; diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceConnectivityLoggerImpl.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceConnectivityLoggerImpl.java index aaa62bf488..d68ce4b0fb 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceConnectivityLoggerImpl.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceConnectivityLoggerImpl.java @@ -51,13 +51,6 @@ public class EntgraDeviceConnectivityLoggerImpl implements EntgraLogger { log.info(o, throwable); } - @Override - public void info(String message, LogContext logContext) { - DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; - MDCContextUtil.populateDeviceConnectivityMDCContext(deviceConnectivityLogContext); - log.info(message); - } - @Override public void info(Object object, LogContext logContext) { DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; @@ -90,13 +83,6 @@ public class EntgraDeviceConnectivityLoggerImpl implements EntgraLogger { log.debug(o, throwable); } - @Override - public void debug(String message, LogContext logContext) { - DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; - MDCContextUtil.populateDeviceConnectivityMDCContext(deviceConnectivityLogContext); - log.debug(message); - } - @Override public void debug(Object object, LogContext logContext) { DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; @@ -129,20 +115,6 @@ public class EntgraDeviceConnectivityLoggerImpl implements EntgraLogger { log.error(o, throwable); } - @Override - public void error(String message, LogContext logContext) { - DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; - MDCContextUtil.populateDeviceConnectivityMDCContext(deviceConnectivityLogContext); - log.error(message); - } - - @Override - public void error(String message, Throwable t, LogContext logContext) { - DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; - MDCContextUtil.populateDeviceConnectivityMDCContext(deviceConnectivityLogContext); - log.error(message, t); - } - @Override public void error(Object object, LogContext logContext) { DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; @@ -175,20 +147,6 @@ public class EntgraDeviceConnectivityLoggerImpl implements EntgraLogger { log.warn(o, throwable); } - @Override - public void warn(String message, LogContext logContext) { - DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; - MDCContextUtil.populateDeviceConnectivityMDCContext(deviceConnectivityLogContext); - log.warn(message); - } - - @Override - public void warn(String message, Throwable t, LogContext logContext) { - DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; - MDCContextUtil.populateDeviceConnectivityMDCContext(deviceConnectivityLogContext); - log.warn(message, t); - } - @Override public void warn(Object object, LogContext logContext) { DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; @@ -221,13 +179,6 @@ public class EntgraDeviceConnectivityLoggerImpl implements EntgraLogger { log.trace(o, throwable); } - @Override - public void trace(String message, LogContext logContext) { - DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; - MDCContextUtil.populateDeviceConnectivityMDCContext(deviceConnectivityLogContext); - log.trace(message); - } - @Override public void trace(Object object, LogContext logContext) { DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; @@ -260,13 +211,6 @@ public class EntgraDeviceConnectivityLoggerImpl implements EntgraLogger { log.fatal(0, throwable); } - @Override - public void fatal(String message, LogContext logContext) { - DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; - MDCContextUtil.populateDeviceConnectivityMDCContext(deviceConnectivityLogContext); - log.fatal(message); - } - @Override public void fatal(Object object, LogContext logContext) { DeviceConnectivityLogContext deviceConnectivityLogContext = (DeviceConnectivityLogContext) logContext; diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceEnrolmentLoggerImpl.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceEnrolmentLoggerImpl.java index db0b7dd265..3e86b94ecd 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceEnrolmentLoggerImpl.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceEnrolmentLoggerImpl.java @@ -51,13 +51,6 @@ public class EntgraDeviceEnrolmentLoggerImpl implements EntgraLogger { log.info(o, throwable); } - @Override - public void info(String message, LogContext logContext) { - DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; - MDCContextUtil.populateDeviceEnrolmentMDCContext(deviceEnrolmentLogContext); - log.info(message); - } - @Override public void info(Object object, LogContext logContext) { DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; @@ -90,13 +83,6 @@ public class EntgraDeviceEnrolmentLoggerImpl implements EntgraLogger { log.debug(o, throwable); } - @Override - public void debug(String message, LogContext logContext) { - DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; - MDCContextUtil.populateDeviceEnrolmentMDCContext(deviceEnrolmentLogContext); - log.debug(message); - } - @Override public void debug(Object object, LogContext logContext) { DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; @@ -129,20 +115,6 @@ public class EntgraDeviceEnrolmentLoggerImpl implements EntgraLogger { log.error(o, throwable); } - @Override - public void error(String message, LogContext logContext) { - DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; - MDCContextUtil.populateDeviceEnrolmentMDCContext(deviceEnrolmentLogContext); - log.error(message); - } - - @Override - public void error(String message, Throwable t, LogContext logContext) { - DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; - MDCContextUtil.populateDeviceEnrolmentMDCContext(deviceEnrolmentLogContext); - log.error(message, t); - } - @Override public void error(Object object, LogContext logContext) { DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; @@ -175,20 +147,6 @@ public class EntgraDeviceEnrolmentLoggerImpl implements EntgraLogger { log.warn(o, throwable); } - @Override - public void warn(String message, LogContext logContext) { - DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; - MDCContextUtil.populateDeviceEnrolmentMDCContext(deviceEnrolmentLogContext); - log.warn(message); - } - - @Override - public void warn(String message, Throwable t, LogContext logContext) { - DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; - MDCContextUtil.populateDeviceEnrolmentMDCContext(deviceEnrolmentLogContext); - log.warn(message, t); - } - @Override public void warn(Object object, LogContext logContext) { DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; @@ -221,13 +179,6 @@ public class EntgraDeviceEnrolmentLoggerImpl implements EntgraLogger { log.trace(o, throwable); } - @Override - public void trace(String message, LogContext logContext) { - DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; - MDCContextUtil.populateDeviceEnrolmentMDCContext(deviceEnrolmentLogContext); - log.trace(message); - } - @Override public void trace(Object object, LogContext logContext) { DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; @@ -260,13 +211,6 @@ public class EntgraDeviceEnrolmentLoggerImpl implements EntgraLogger { log.fatal(0, throwable); } - @Override - public void fatal(String message, LogContext logContext) { - DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; - MDCContextUtil.populateDeviceEnrolmentMDCContext(deviceEnrolmentLogContext); - log.fatal(message); - } - @Override public void fatal(Object object, LogContext logContext) { DeviceEnrolmentLogContext deviceEnrolmentLogContext = (DeviceEnrolmentLogContext) logContext; diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceLoggerImpl.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceLoggerImpl.java index a51987463f..5d32f913f8 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceLoggerImpl.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraDeviceLoggerImpl.java @@ -51,13 +51,6 @@ public class EntgraDeviceLoggerImpl implements EntgraLogger { log.info(o, throwable); } - @Override - public void info(String message, LogContext logContext) { - DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; - MDCContextUtil.populateDeviceMDCContext(deviceLogContext); - log.info(message); - } - @Override public void info(Object object, LogContext logContext) { DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; @@ -90,13 +83,6 @@ public class EntgraDeviceLoggerImpl implements EntgraLogger { log.debug(o, throwable); } - @Override - public void debug(String message, LogContext logContext) { - DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; - MDCContextUtil.populateDeviceMDCContext(deviceLogContext); - log.debug(message); - } - @Override public void debug(Object object, LogContext logContext) { DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; @@ -129,20 +115,6 @@ public class EntgraDeviceLoggerImpl implements EntgraLogger { log.error(o, throwable); } - @Override - public void error(String message, LogContext logContext) { - DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; - MDCContextUtil.populateDeviceMDCContext(deviceLogContext); - log.error(message); - } - - @Override - public void error(String message, Throwable t, LogContext logContext) { - DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; - MDCContextUtil.populateDeviceMDCContext(deviceLogContext); - log.error(message, t); - } - @Override public void error(Object object, LogContext logContext) { DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; @@ -175,20 +147,6 @@ public class EntgraDeviceLoggerImpl implements EntgraLogger { log.warn(o, throwable); } - @Override - public void warn(String message, LogContext logContext) { - DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; - MDCContextUtil.populateDeviceMDCContext(deviceLogContext); - log.warn(message); - } - - @Override - public void warn(String message, Throwable t, LogContext logContext) { - DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; - MDCContextUtil.populateDeviceMDCContext(deviceLogContext); - log.warn(message, t); - } - @Override public void warn(Object object, LogContext logContext) { DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; @@ -221,13 +179,6 @@ public class EntgraDeviceLoggerImpl implements EntgraLogger { log.trace(o, throwable); } - @Override - public void trace(String message, LogContext logContext) { - DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; - MDCContextUtil.populateDeviceMDCContext(deviceLogContext); - log.trace(message); - } - @Override public void trace(Object object, LogContext logContext) { DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; @@ -260,13 +211,6 @@ public class EntgraDeviceLoggerImpl implements EntgraLogger { log.fatal(0, throwable); } - @Override - public void fatal(String message, LogContext logContext) { - DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; - MDCContextUtil.populateDeviceMDCContext(deviceLogContext); - log.fatal(message); - } - @Override public void fatal(Object object, LogContext logContext) { DeviceLogContext deviceLogContext = (DeviceLogContext) logContext; diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraGroupMgtLoggerImpl.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraGroupMgtLoggerImpl.java index e845acc2d2..808213532b 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraGroupMgtLoggerImpl.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraGroupMgtLoggerImpl.java @@ -51,13 +51,6 @@ public class EntgraGroupMgtLoggerImpl implements EntgraLogger { log.info(o, throwable); } - @Override - public void info(String message, LogContext logContext) { - GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; - MDCContextUtil.populateGroupMgtMDCContext(groupMgtLogContext); - log.info(message); - } - @Override public void info(Object object, LogContext logContext) { GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; @@ -90,13 +83,6 @@ public class EntgraGroupMgtLoggerImpl implements EntgraLogger { log.debug(o, throwable); } - @Override - public void debug(String message, LogContext logContext) { - GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; - MDCContextUtil.populateGroupMgtMDCContext(groupMgtLogContext); - log.debug(message); - } - @Override public void debug(Object object, LogContext logContext) { GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; @@ -129,20 +115,6 @@ public class EntgraGroupMgtLoggerImpl implements EntgraLogger { log.error(o, throwable); } - @Override - public void error(String message, LogContext logContext) { - GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; - MDCContextUtil.populateGroupMgtMDCContext(groupMgtLogContext); - log.error(message); - } - - @Override - public void error(String message, Throwable t, LogContext logContext) { - GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; - MDCContextUtil.populateGroupMgtMDCContext(groupMgtLogContext); - log.error(message, t); - } - @Override public void error(Object object, LogContext logContext) { GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; @@ -175,20 +147,6 @@ public class EntgraGroupMgtLoggerImpl implements EntgraLogger { log.warn(o, throwable); } - @Override - public void warn(String message, LogContext logContext) { - GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; - MDCContextUtil.populateGroupMgtMDCContext(groupMgtLogContext); - log.warn(message); - } - - @Override - public void warn(String message, Throwable t, LogContext logContext) { - GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; - MDCContextUtil.populateGroupMgtMDCContext(groupMgtLogContext); - log.warn(message, t); - } - @Override public void warn(Object object, LogContext logContext) { GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; @@ -221,13 +179,6 @@ public class EntgraGroupMgtLoggerImpl implements EntgraLogger { log.trace(o, throwable); } - @Override - public void trace(String message, LogContext logContext) { - GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; - MDCContextUtil.populateGroupMgtMDCContext(groupMgtLogContext); - log.trace(message); - } - @Override public void trace(Object object, LogContext logContext) { GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; @@ -260,13 +211,6 @@ public class EntgraGroupMgtLoggerImpl implements EntgraLogger { log.fatal(0, throwable); } - @Override - public void fatal(String message, LogContext logContext) { - GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; - MDCContextUtil.populateGroupMgtMDCContext(groupMgtLogContext); - log.fatal(message); - } - @Override public void fatal(Object object, LogContext logContext) { GroupMgtLogContext groupMgtLogContext = (GroupMgtLogContext) logContext; diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraPolicyLoggerImpl.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraPolicyLoggerImpl.java index 218252f260..b6868c8bc4 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraPolicyLoggerImpl.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraPolicyLoggerImpl.java @@ -51,13 +51,6 @@ public class EntgraPolicyLoggerImpl implements EntgraLogger { log.info(o, throwable); } - @Override - public void info(String message, LogContext logContext) { - PolicyLogContext policyLogContext = (PolicyLogContext) logContext; - MDCContextUtil.populatePolicyMDCContext(policyLogContext); - log.info(message); - } - @Override public void info(Object object, LogContext logContext) { PolicyLogContext policyLogContext = (PolicyLogContext) logContext; @@ -90,13 +83,6 @@ public class EntgraPolicyLoggerImpl implements EntgraLogger { log.debug(o, throwable); } - @Override - public void debug(String message, LogContext logContext) { - PolicyLogContext policyLogContext = (PolicyLogContext) logContext; - MDCContextUtil.populatePolicyMDCContext(policyLogContext); - log.debug(message); - } - @Override public void debug(Object object, LogContext logContext) { PolicyLogContext policyLogContext = (PolicyLogContext) logContext; @@ -129,20 +115,6 @@ public class EntgraPolicyLoggerImpl implements EntgraLogger { log.error(o, throwable); } - @Override - public void error(String message, LogContext logContext) { - PolicyLogContext policyLogContext = (PolicyLogContext) logContext; - MDCContextUtil.populatePolicyMDCContext(policyLogContext); - log.error(message); - } - - @Override - public void error(String message, Throwable t, LogContext logContext) { - PolicyLogContext policyLogContext = (PolicyLogContext) logContext; - MDCContextUtil.populatePolicyMDCContext(policyLogContext); - log.error(message, t); - } - @Override public void error(Object object, LogContext logContext) { PolicyLogContext policyLogContext = (PolicyLogContext) logContext; @@ -175,20 +147,6 @@ public class EntgraPolicyLoggerImpl implements EntgraLogger { log.warn(o, throwable); } - @Override - public void warn(String message, LogContext logContext) { - PolicyLogContext policyLogContext = (PolicyLogContext) logContext; - MDCContextUtil.populatePolicyMDCContext(policyLogContext); - log.warn(message); - } - - @Override - public void warn(String message, Throwable t, LogContext logContext) { - PolicyLogContext policyLogContext = (PolicyLogContext) logContext; - MDCContextUtil.populatePolicyMDCContext(policyLogContext); - log.warn(message, t); - } - @Override public void warn(Object object, LogContext logContext) { PolicyLogContext policyLogContext = (PolicyLogContext) logContext; @@ -221,13 +179,6 @@ public class EntgraPolicyLoggerImpl implements EntgraLogger { log.trace(o, throwable); } - @Override - public void trace(String message, LogContext logContext) { - PolicyLogContext policyLogContext = (PolicyLogContext) logContext; - MDCContextUtil.populatePolicyMDCContext(policyLogContext); - log.trace(message); - } - @Override public void trace(Object object, LogContext logContext) { PolicyLogContext policyLogContext = (PolicyLogContext) logContext; @@ -260,13 +211,6 @@ public class EntgraPolicyLoggerImpl implements EntgraLogger { log.fatal(0, throwable); } - @Override - public void fatal(String message, LogContext logContext) { - PolicyLogContext policyLogContext = (PolicyLogContext) logContext; - MDCContextUtil.populatePolicyMDCContext(policyLogContext); - log.fatal(message); - } - @Override public void fatal(Object object, LogContext logContext) { PolicyLogContext policyLogContext = (PolicyLogContext) logContext; diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraRoleMgtLoggerImpl.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraRoleMgtLoggerImpl.java index 3e3a831466..0e9389339e 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraRoleMgtLoggerImpl.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraRoleMgtLoggerImpl.java @@ -51,13 +51,6 @@ public class EntgraRoleMgtLoggerImpl implements EntgraLogger { log.info(o, throwable); } - @Override - public void info(String message, LogContext logContext) { - RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; - MDCContextUtil.populateRoleMgtMDCContext(roleMgtLogContext); - log.info(message); - } - @Override public void info(Object object, LogContext logContext) { RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; @@ -90,13 +83,6 @@ public class EntgraRoleMgtLoggerImpl implements EntgraLogger { log.debug(o, throwable); } - @Override - public void debug(String message, LogContext logContext) { - RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; - MDCContextUtil.populateRoleMgtMDCContext(roleMgtLogContext); - log.debug(message); - } - @Override public void debug(Object object, LogContext logContext) { RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; @@ -129,20 +115,6 @@ public class EntgraRoleMgtLoggerImpl implements EntgraLogger { log.error(o, throwable); } - @Override - public void error(String message, LogContext logContext) { - RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; - MDCContextUtil.populateRoleMgtMDCContext(roleMgtLogContext); - log.error(message); - } - - @Override - public void error(String message, Throwable t, LogContext logContext) { - RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; - MDCContextUtil.populateRoleMgtMDCContext(roleMgtLogContext); - log.error(message, t); - } - @Override public void error(Object object, LogContext logContext) { RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; @@ -175,20 +147,6 @@ public class EntgraRoleMgtLoggerImpl implements EntgraLogger { log.warn(o, throwable); } - @Override - public void warn(String message, LogContext logContext) { - RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; - MDCContextUtil.populateRoleMgtMDCContext(roleMgtLogContext); - log.warn(message); - } - - @Override - public void warn(String message, Throwable t, LogContext logContext) { - RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; - MDCContextUtil.populateRoleMgtMDCContext(roleMgtLogContext); - log.warn(message, t); - } - @Override public void warn(Object object, LogContext logContext) { RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; @@ -221,13 +179,6 @@ public class EntgraRoleMgtLoggerImpl implements EntgraLogger { log.trace(o, throwable); } - @Override - public void trace(String message, LogContext logContext) { - RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; - MDCContextUtil.populateRoleMgtMDCContext(roleMgtLogContext); - log.trace(message); - } - @Override public void trace(Object object, LogContext logContext) { RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; @@ -260,13 +211,6 @@ public class EntgraRoleMgtLoggerImpl implements EntgraLogger { log.fatal(0, throwable); } - @Override - public void fatal(String message, LogContext logContext) { - RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; - MDCContextUtil.populateRoleMgtMDCContext(roleMgtLogContext); - log.fatal(message); - } - @Override public void fatal(Object object, LogContext logContext) { RoleMgtLogContext roleMgtLogContext = (RoleMgtLogContext) logContext; diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraUserLoginLoggerImpl.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraUserLoginLoggerImpl.java index 087fc45eec..edc2ad70fe 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraUserLoginLoggerImpl.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraUserLoginLoggerImpl.java @@ -51,13 +51,6 @@ public class EntgraUserLoginLoggerImpl implements EntgraLogger { log.info(o, throwable); } - @Override - public void info(String message, LogContext logContext) { - UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; - MDCContextUtil.populateUserMDCContext(userLoginLogContext); - log.info(message); - } - @Override public void info(Object object, LogContext logContext) { UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; @@ -91,13 +84,6 @@ public class EntgraUserLoginLoggerImpl implements EntgraLogger { log.debug(o, throwable); } - @Override - public void debug(String message, LogContext logContext) { - UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; - MDCContextUtil.populateUserMDCContext(userLoginLogContext); - log.debug(message); - } - @Override public void debug(Object object, LogContext logContext) { UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; @@ -131,20 +117,6 @@ public class EntgraUserLoginLoggerImpl implements EntgraLogger { log.error(o, throwable); } - @Override - public void error(String message, LogContext logContext) { - UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; - MDCContextUtil.populateUserMDCContext(userLoginLogContext); - log.error(message); - } - - @Override - public void error(String message, Throwable t, LogContext logContext) { - UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; - MDCContextUtil.populateUserMDCContext(userLoginLogContext); - log.error(message, t); - } - @Override public void error(Object object, LogContext logContext) { UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; @@ -178,20 +150,6 @@ public class EntgraUserLoginLoggerImpl implements EntgraLogger { log.warn(o, throwable); } - @Override - public void warn(String message, LogContext logContext) { - UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; - MDCContextUtil.populateUserMDCContext(userLoginLogContext); - log.warn(message); - } - - @Override - public void warn(String message, Throwable t, LogContext logContext) { - UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; - MDCContextUtil.populateUserMDCContext(userLoginLogContext); - log.warn(message, t); - } - @Override public void warn(Object object, LogContext logContext) { UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; @@ -224,13 +182,6 @@ public class EntgraUserLoginLoggerImpl implements EntgraLogger { log.trace(o, throwable); } - @Override - public void trace(String message, LogContext logContext) { - UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; - MDCContextUtil.populateUserMDCContext(userLoginLogContext); - log.trace(message); - } - @Override public void trace(Object object, LogContext logContext) { UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; @@ -246,7 +197,6 @@ public class EntgraUserLoginLoggerImpl implements EntgraLogger { } - public void fatal(String message) { log.fatal(message); } @@ -265,13 +215,6 @@ public class EntgraUserLoginLoggerImpl implements EntgraLogger { log.fatal(0, throwable); } - @Override - public void fatal(String message, LogContext logContext) { - UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; - MDCContextUtil.populateUserMDCContext(userLoginLogContext); - log.fatal(message); - } - @Override public void fatal(Object object, LogContext logContext) { UserLoginLogContext userLoginLogContext = (UserLoginLogContext) logContext; diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraUserMgtLoggerImpl.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraUserMgtLoggerImpl.java index fe9fd0ee01..49f671504c 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraUserMgtLoggerImpl.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/impl/EntgraUserMgtLoggerImpl.java @@ -51,13 +51,6 @@ public class EntgraUserMgtLoggerImpl implements EntgraLogger { log.info(o, throwable); } - @Override - public void info(String message, LogContext logContext) { - UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; - MDCContextUtil.populateUserMgtMDCContext(userMgtLogContext); - log.info(message); - } - @Override public void info(Object object, LogContext logContext) { UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; @@ -90,13 +83,6 @@ public class EntgraUserMgtLoggerImpl implements EntgraLogger { log.debug(o, throwable); } - @Override - public void debug(String message, LogContext logContext) { - UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; - MDCContextUtil.populateUserMgtMDCContext(userMgtLogContext); - log.debug(message); - } - @Override public void debug(Object object, LogContext logContext) { UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; @@ -129,20 +115,6 @@ public class EntgraUserMgtLoggerImpl implements EntgraLogger { log.error(o, throwable); } - @Override - public void error(String message, LogContext logContext) { - UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; - MDCContextUtil.populateUserMgtMDCContext(userMgtLogContext); - log.error(message); - } - - @Override - public void error(String message, Throwable t, LogContext logContext) { - UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; - MDCContextUtil.populateUserMgtMDCContext(userMgtLogContext); - log.error(message, t); - } - @Override public void error(Object object, LogContext logContext) { UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; @@ -175,20 +147,6 @@ public class EntgraUserMgtLoggerImpl implements EntgraLogger { log.warn(o, throwable); } - @Override - public void warn(String message, LogContext logContext) { - UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; - MDCContextUtil.populateUserMgtMDCContext(userMgtLogContext); - log.warn(message); - } - - @Override - public void warn(String message, Throwable t, LogContext logContext) { - UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; - MDCContextUtil.populateUserMgtMDCContext(userMgtLogContext); - log.warn(message, t); - } - @Override public void warn(Object object, LogContext logContext) { UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; @@ -221,13 +179,6 @@ public class EntgraUserMgtLoggerImpl implements EntgraLogger { log.trace(o, throwable); } - @Override - public void trace(String message, LogContext logContext) { - UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; - MDCContextUtil.populateUserMgtMDCContext(userMgtLogContext); - log.trace(message); - } - @Override public void trace(Object object, LogContext logContext) { UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; @@ -260,13 +211,6 @@ public class EntgraUserMgtLoggerImpl implements EntgraLogger { log.fatal(0, throwable); } - @Override - public void fatal(String message, LogContext logContext) { - UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; - MDCContextUtil.populateUserMgtMDCContext(userMgtLogContext); - log.fatal(message); - } - @Override public void fatal(Object object, LogContext logContext) { UserMgtLogContext userMgtLogContext = (UserMgtLogContext) logContext; -- 2.36.3