public class Utility
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
logEnable |
| Constructor and Description |
|---|
Utility() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkAuthenticationValidation(java.lang.String authenticationType)
Checks whether the authentication type is rightly entered with no typo
error.
|
static void |
log(org.apache.logging.log4j.Logger logger,
java.lang.Exception e) |
static void |
log(org.apache.logging.log4j.Logger logger,
java.lang.String message,
org.apache.logging.log4j.Level logLevel)
Depending on the logging LEVEL, the message is logged.
|
static void |
log(org.apache.logging.log4j.Logger logger,
java.lang.String exceptionMessage,
java.lang.Object obj,
org.apache.logging.log4j.Level logLevel)
Depending on the logging LEVEL, the message is logged.
|
static void |
logResponseCodeMessage(int responseCode,
org.apache.logging.log4j.Logger logger) |
static java.lang.String |
retrieveGetIDFromRequestTarget(java.lang.String requestTarget) |
public static boolean checkAuthenticationValidation(java.lang.String authenticationType)
authenticationType - : HTTP or JWTpublic static void log(org.apache.logging.log4j.Logger logger,
java.lang.String exceptionMessage,
java.lang.Object obj,
org.apache.logging.log4j.Level logLevel)
logger - : Logging object (Log4j2).exceptionMessage - : Custom message for logging the log file.obj - : object to get exception message.logLevel - : Level at which logging should occur
[INFO,ERROR,DEBUG,FATAL].public static void log(org.apache.logging.log4j.Logger logger,
java.lang.String message,
org.apache.logging.log4j.Level logLevel)
logger - : Logging object (Log4j2).message - : Custom message for logging the log file.logLevel - : Level at which logging should occur
[INFO,ERROR,DEBUG,FATAL].public static void log(org.apache.logging.log4j.Logger logger,
java.lang.Exception e)
logger - : Logging object (Log4j2).e - : Exception caught during the process.public static java.lang.String retrieveGetIDFromRequestTarget(java.lang.String requestTarget)
requestTarget - : request target from where we will retrieve Idpublic static void logResponseCodeMessage(int responseCode,
org.apache.logging.log4j.Logger logger)
responseCode - :responseCode to log .logger - :Log4j objectCopyright © 2021. All Rights Reserved.