diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api/pom.xml index 08c184a676..9ec44fb8e0 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.api/pom.xml @@ -131,7 +131,6 @@ org.ops4j.pax.logging pax-logging-api provided - org.wso2.carbon.identity.inbound.auth.oauth2 diff --git a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension/pom.xml b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension/pom.xml index 6bcad291c4..87b20c6188 100644 --- a/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension/pom.xml +++ b/components/apimgt-extensions/io.entgra.device.mgt.core.apimgt.application.extension/pom.xml @@ -55,7 +55,6 @@ org.ops4j.pax.logging pax-logging-api provided - org.wso2.carbon.apimgt diff --git a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml index 6d697f1055..6689068e68 100644 --- a/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/io.entgra.device.mgt.core.certificate.mgt.api/pom.xml @@ -158,7 +158,6 @@ org.ops4j.pax.logging pax-logging-api provided - io.entgra.device.mgt.core diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index ce7fb6b507..314beb5e65 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -62,7 +62,6 @@ org.ops4j.pax.logging pax-logging-api provided - org.wso2.carbon diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/pom.xml b/components/logger/io.entgra.device.mgt.core.notification.logger/pom.xml index 8af7693b98..d04ffa9e13 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/pom.xml +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/pom.xml @@ -35,7 +35,7 @@ org.ops4j.pax.logging pax-logging-api - provided + org.testng @@ -45,6 +45,11 @@ io.entgra.device.mgt.core io.entgra.device.mgt.core.device.mgt.extensions.logger + + org.slf4j + slf4j-ext + 1.7.29 + @@ -58,7 +63,6 @@ org.apache.maven.plugins maven-compiler-plugin - 1.8 1.8 @@ -75,12 +79,13 @@ ${io.entgra.device.mgt.core.version} Device Notification Logger Bundle - io.entgra.device.mgt.core.device.mgt.extensions.logger;version="[5.0,6)", - io.entgra.device.mgt.core.device.mgt.extensions.logger.spi;version="[5.0,6)", io.entgra.device.mgt.core.notification.logger, io.entgra.device.mgt.core.notification.logger.util, + io.entgra.device.mgt.core.device.mgt.extensions.logger;version="[5.0,6)", + io.entgra.device.mgt.core.device.mgt.extensions.logger.spi;version="[5.0,6)", + org.slf4j, + org.slf4j.ext, org.apache.commons.logging;version="[1.2,2)" - io.entgra.device.mgt.core.notification.logger.* @@ -90,5 +95,4 @@ - \ No newline at end of file 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..e5b9fff02b 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 @@ -23,7 +23,8 @@ import io.entgra.device.mgt.core.notification.logger.AppInstallLogContext; import io.entgra.device.mgt.core.notification.logger.util.MDCContextUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.MDC; +import org.slf4j.MDC; + public class EntgraAppInstallLoggerImpl implements EntgraLogger { 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..b928be9583 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 @@ -23,7 +23,8 @@ import io.entgra.device.mgt.core.notification.logger.DeviceConnectivityLogContex import io.entgra.device.mgt.core.notification.logger.util.MDCContextUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.MDC; +import org.slf4j.MDC; + public class EntgraDeviceConnectivityLoggerImpl implements EntgraLogger { 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..acd32c8947 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 @@ -23,7 +23,8 @@ import io.entgra.device.mgt.core.notification.logger.DeviceEnrolmentLogContext; import io.entgra.device.mgt.core.notification.logger.util.MDCContextUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.MDC; +import org.slf4j.MDC; + public class EntgraDeviceEnrolmentLoggerImpl implements EntgraLogger { 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..1ef664a750 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 @@ -23,7 +23,8 @@ import io.entgra.device.mgt.core.notification.logger.DeviceLogContext; import io.entgra.device.mgt.core.notification.logger.util.MDCContextUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.MDC; +import org.slf4j.MDC; + public class EntgraDeviceLoggerImpl implements EntgraLogger { 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..7672e65ec1 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 @@ -23,7 +23,8 @@ import io.entgra.device.mgt.core.notification.logger.GroupMgtLogContext; import io.entgra.device.mgt.core.notification.logger.util.MDCContextUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.MDC; +import org.slf4j.MDC; + public class EntgraGroupMgtLoggerImpl implements EntgraLogger { 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..3511b94036 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 @@ -23,7 +23,8 @@ import io.entgra.device.mgt.core.notification.logger.PolicyLogContext; import io.entgra.device.mgt.core.notification.logger.util.MDCContextUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.MDC; +import org.slf4j.MDC; + public class EntgraPolicyLoggerImpl implements EntgraLogger { 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..67855c0e21 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 @@ -23,7 +23,8 @@ import io.entgra.device.mgt.core.notification.logger.RoleMgtLogContext; import io.entgra.device.mgt.core.notification.logger.util.MDCContextUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.MDC; +import org.slf4j.MDC; + public class EntgraRoleMgtLoggerImpl implements EntgraLogger { 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..292a1a68c7 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 @@ -23,7 +23,7 @@ import io.entgra.device.mgt.core.notification.logger.UserLoginLogContext; import io.entgra.device.mgt.core.notification.logger.util.MDCContextUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.MDC; +import org.slf4j.MDC; public class EntgraUserLoginLoggerImpl implements EntgraLogger { 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..7470eab617 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 @@ -23,7 +23,8 @@ import io.entgra.device.mgt.core.notification.logger.UserMgtLogContext; import io.entgra.device.mgt.core.notification.logger.util.MDCContextUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.log4j.MDC; +import org.slf4j.MDC; + public class EntgraUserMgtLoggerImpl implements EntgraLogger { diff --git a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/util/MDCContextUtil.java b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/util/MDCContextUtil.java index 1c9afa6948..4ec012e0ca 100644 --- a/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/util/MDCContextUtil.java +++ b/components/logger/io.entgra.device.mgt.core.notification.logger/src/main/java/io/entgra/device/mgt/core/notification/logger/util/MDCContextUtil.java @@ -18,8 +18,8 @@ package io.entgra.device.mgt.core.notification.logger.util; import io.entgra.device.mgt.core.notification.logger.*; -import org.apache.log4j.MDC; - +import org.slf4j.MDC; +// public final class MDCContextUtil { public static void populateDeviceMDCContext(final DeviceLogContext mdcContext) { @@ -54,7 +54,7 @@ public final class MDCContextUtil { MDC.put("IsUserRegistered", "Registered"); } if (mdcContext.isDeviceRegistered()) { - MDC.put("IsDeviceRegistered", mdcContext.isDeviceRegistered()); + MDC.put("IsDeviceRegistered", String.valueOf(mdcContext.isDeviceRegistered())); } if (mdcContext.getTenantDomain() != null) { MDC.put("TenantDomain", mdcContext.getTenantDomain()); diff --git a/features/logger/io.entgra.device.mgt.core.notification.logger.feature/pom.xml b/features/logger/io.entgra.device.mgt.core.notification.logger.feature/pom.xml index e0a5acd7ae..dbcbe8d7f7 100644 --- a/features/logger/io.entgra.device.mgt.core.notification.logger.feature/pom.xml +++ b/features/logger/io.entgra.device.mgt.core.notification.logger.feature/pom.xml @@ -40,7 +40,7 @@ org.ops4j.pax.logging pax-logging-api - provided + org.testng