From 458ab342695267cc62e5309d5c361a0a01b2d465 Mon Sep 17 00:00:00 2001 From: Amalka Subasinghe Date: Mon, 12 Dec 2022 11:39:01 +0000 Subject: [PATCH] updated EntgraLogger methods (#30) Co-authored-by: Amalka Subasinghe Co-authored-by: Pahansith Gunathilake Reviewed-on: https://repository.entgra.net/community/device-mgt-core/pulls/30 Co-authored-by: Amalka Subasinghe Co-committed-by: Amalka Subasinghe --- .../pom.xml | 2 +- .../extensions/logger/spi/EntgraLogger.java | 54 +++++-------------- 2 files changed, 14 insertions(+), 42 deletions(-) diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml index d340500b82..fc57038041 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/pom.xml @@ -51,7 +51,7 @@ Entgra Logger Bundle io.entgra.device.mgt.extensions.logger, - org.apache.commons.logging;version="[1.2,2) + org.apache.commons.logging io.entgra.device.mgt.extensions.logger.* diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/src/main/java/io/entgra/device/mgt/extensions/logger/spi/EntgraLogger.java b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/src/main/java/io/entgra/device/mgt/extensions/logger/spi/EntgraLogger.java index ba34e1552f..c959eb4885 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/src/main/java/io/entgra/device/mgt/extensions/logger/spi/EntgraLogger.java +++ b/components/device-mgt-extensions/io.entgra.device.mgt.extensions.logger/src/main/java/io/entgra/device/mgt/extensions/logger/spi/EntgraLogger.java @@ -24,57 +24,29 @@ import org.apache.commons.logging.Log; public interface EntgraLogger extends Log { - void info(String message); + void info(Object object, LogContext logContext); + + void info(Object object, Throwable t, LogContext logContext); - void info(String message, Throwable t); + void debug(Object object, LogContext logContext); - void info(String message, LogContext logContext); + void debug(Object object, Throwable t, LogContext logContext); - void debug(String message); + void error(Object object, LogContext logContext); - void debug(String message, Throwable t); + void error(Object object, Throwable t, LogContext logContext); - void debug(String message, LogContext logContext); + void fatal(Object object, LogContext logContext); - void error(String message); + void fatal(Object object, Throwable t, LogContext logContext); - void error(String message, Throwable t); + void trace(Object object, LogContext logContext); - void error(String message, LogContext logContext); + void trace(Object object, Throwable t, LogContext logContext); - void error(String message, Throwable t, LogContext logContext); + void warn(Object object, LogContext logContext); - void warn(String message); - - void warn(String message, Throwable t); - - void warn(String message, LogContext logContext); - - void warn(String message, Throwable t, LogContext logContext); - - void trace(String message); - - void trace(String message, Throwable t); - - void trace(String message, LogContext logContext); - - void fatal(String message); - - void fatal(String message, Throwable t); - - void fatal(String message, LogContext logContext); - - boolean isDebugEnabled(); - - boolean isErrorEnabled(); - - boolean isFatalEnabled(); - - boolean isInfoEnabled(); - - boolean isTraceEnabled(); - - boolean isWarnEnabled(); + void warn(Object object, Throwable t, LogContext logContext); void clearLogContext();