Class AbstractLoggingAspect
- java.lang.Object
-
- de.hybris.platform.ruleengineservices.aspect.AbstractLoggingAspect
-
- Direct Known Subclasses:
ActionLogger
,RuleEvaluationLogger
public abstract class AbstractLoggingAspect extends java.lang.Object
Abstract class of Logging Aspect for intercepting calls of class methods and log it attributes. Method isEligibleForJoinPoint must be implemented in subclasses. Method(s) with Aspect annotations (ex.Before
) have to be implemented in subclasses to specify joint-points to intercept and call logJoinPoint(...) in it. Subclasses have to haveAspect
annotation to be able to act as Spring Aspect.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEBUG
static java.lang.String
DEFAULT_LOG_LEVEL
static java.lang.String
INFO
static java.lang.String
TRACE
static java.lang.String
WARN
-
Constructor Summary
Constructors Constructor Description AbstractLoggingAspect()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.slf4j.Logger
getLogger()
protected java.lang.String
getLogInfoFromArgs(java.util.List<?> args)
Returns String representation of argument set of intercepted method.protected java.lang.String
getLogLevel()
protected java.lang.String
getLongSignatureName(org.aspectj.lang.JoinPoint joinPoint)
protected java.lang.String
getSignatureName(org.aspectj.lang.JoinPoint joinPoint)
protected abstract boolean
isEligibleForJoinPoint(org.aspectj.lang.JoinPoint joinPoint)
Checks if thejoinPoint
is eligible to process.protected boolean
isLoggingEligibleForJoinPoint(org.aspectj.lang.JoinPoint joinPoint)
Checks if thejoinPoint
is eligible for logging.protected void
logAtDebugLevel(java.lang.String signatureName, java.lang.String logInfo)
protected void
logAtInfoLevel(java.lang.String signatureName, java.lang.String logInfo)
protected void
logAtTraceLevel(java.lang.String signatureName, java.lang.String logInfo)
protected void
logAtWarnLevel(java.lang.String signatureName, java.lang.String logInfo)
protected void
logJoinPoint(org.aspectj.lang.JoinPoint joinPoint)
Does logging for the interceptedjoinPoint
.void
setLogLevel(java.lang.String logLevel)
-
-
-
Field Detail
-
DEBUG
public static final java.lang.String DEBUG
- See Also:
- Constant Field Values
-
WARN
public static final java.lang.String WARN
- See Also:
- Constant Field Values
-
TRACE
public static final java.lang.String TRACE
- See Also:
- Constant Field Values
-
INFO
public static final java.lang.String INFO
- See Also:
- Constant Field Values
-
DEFAULT_LOG_LEVEL
public static final java.lang.String DEFAULT_LOG_LEVEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLogger
protected org.slf4j.Logger getLogger()
-
logJoinPoint
protected void logJoinPoint(org.aspectj.lang.JoinPoint joinPoint)
Does logging for the interceptedjoinPoint
.
-
getSignatureName
protected java.lang.String getSignatureName(org.aspectj.lang.JoinPoint joinPoint)
-
getLongSignatureName
protected java.lang.String getLongSignatureName(org.aspectj.lang.JoinPoint joinPoint)
-
logAtDebugLevel
protected void logAtDebugLevel(java.lang.String signatureName, java.lang.String logInfo)
-
logAtTraceLevel
protected void logAtTraceLevel(java.lang.String signatureName, java.lang.String logInfo)
-
logAtInfoLevel
protected void logAtInfoLevel(java.lang.String signatureName, java.lang.String logInfo)
-
logAtWarnLevel
protected void logAtWarnLevel(java.lang.String signatureName, java.lang.String logInfo)
-
isLoggingEligibleForJoinPoint
protected boolean isLoggingEligibleForJoinPoint(org.aspectj.lang.JoinPoint joinPoint)
Checks if thejoinPoint
is eligible for logging.
-
isEligibleForJoinPoint
protected abstract boolean isEligibleForJoinPoint(org.aspectj.lang.JoinPoint joinPoint)
Checks if thejoinPoint
is eligible to process.
-
getLogInfoFromArgs
protected java.lang.String getLogInfoFromArgs(java.util.List<?> args)
Returns String representation of argument set of intercepted method.
-
getLogLevel
protected java.lang.String getLogLevel()
-
setLogLevel
public void setLogLevel(java.lang.String logLevel)
-
-