mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix custom log printing issue
This commit is contained in:
commit
00d79ae6d9
@ -131,7 +131,6 @@
|
||||
<groupId>org.ops4j.pax.logging</groupId>
|
||||
<artifactId>pax-logging-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<!-- <version>${pax.logging.api.version}</version>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.identity.inbound.auth.oauth2</groupId>
|
||||
|
||||
@ -55,7 +55,6 @@
|
||||
<groupId>org.ops4j.pax.logging</groupId>
|
||||
<artifactId>pax-logging-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<!-- <version>${pax.logging.api.version}</version>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon.apimgt</groupId>
|
||||
|
||||
@ -158,7 +158,6 @@
|
||||
<groupId>org.ops4j.pax.logging</groupId>
|
||||
<artifactId>pax-logging-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<!-- <version>${pax.logging.api.version}</version>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.entgra.device.mgt.core</groupId>
|
||||
|
||||
@ -62,7 +62,6 @@
|
||||
<groupId>org.ops4j.pax.logging</groupId>
|
||||
<artifactId>pax-logging-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<!-- <version>${pax.logging.api.version}</version>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.wso2.carbon</groupId>
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>org.ops4j.pax.logging</groupId>
|
||||
<artifactId>pax-logging-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<!-- <scope>provided</scope>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
@ -45,6 +45,11 @@
|
||||
<groupId>io.entgra.device.mgt.core</groupId>
|
||||
<artifactId>io.entgra.device.mgt.core.device.mgt.extensions.logger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-ext</artifactId>
|
||||
<version>1.7.29</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
@ -58,7 +63,6 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<!-- <version>3.8.1</version>-->
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
@ -75,12 +79,13 @@
|
||||
<Bundle-Version>${io.entgra.device.mgt.core.version}</Bundle-Version>
|
||||
<Bundle-Description>Device Notification Logger Bundle</Bundle-Description>
|
||||
<Import-Package>
|
||||
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)"
|
||||
<!-- org.apache.log4j;version="[2,3)"-->
|
||||
</Import-Package>
|
||||
<Export-Package>
|
||||
io.entgra.device.mgt.core.notification.logger.*
|
||||
@ -90,5 +95,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
<dependency>
|
||||
<groupId>org.ops4j.pax.logging</groupId>
|
||||
<artifactId>pax-logging-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
<!-- <scope>provided</scope>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user