Class AbstractLoggingAspect
- java.lang.Object
-
- de.hybris.platform.ruleengineservices.aspect.AbstractLoggingAspect
-
- Direct Known Subclasses:
ActionLogger,RuleEvaluationLogger
public abstract class AbstractLoggingAspect extends java.lang.ObjectAbstract 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 haveAspectannotation to be able to act as Spring Aspect.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEBUGstatic java.lang.StringDEFAULT_LOG_LEVELstatic java.lang.StringINFOstatic java.lang.StringTRACEstatic java.lang.StringWARN
-
Constructor Summary
Constructors Constructor Description AbstractLoggingAspect()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.slf4j.LoggergetLogger()protected java.lang.StringgetLogInfoFromArgs(java.util.List<?> args)Returns String representation of argument set of intercepted method.protected java.lang.StringgetLogLevel()protected java.lang.StringgetLongSignatureName(org.aspectj.lang.JoinPoint joinPoint)protected java.lang.StringgetSignatureName(org.aspectj.lang.JoinPoint joinPoint)protected abstract booleanisEligibleForJoinPoint(org.aspectj.lang.JoinPoint joinPoint)Checks if thejoinPointis eligible to process.protected booleanisLoggingEligibleForJoinPoint(org.aspectj.lang.JoinPoint joinPoint)Checks if thejoinPointis eligible for logging.protected voidlogAtDebugLevel(java.lang.String signatureName, java.lang.String logInfo)protected voidlogAtInfoLevel(java.lang.String signatureName, java.lang.String logInfo)protected voidlogAtTraceLevel(java.lang.String signatureName, java.lang.String logInfo)protected voidlogAtWarnLevel(java.lang.String signatureName, java.lang.String logInfo)protected voidlogJoinPoint(org.aspectj.lang.JoinPoint joinPoint)Does logging for the interceptedjoinPoint.voidsetLogLevel(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 thejoinPointis eligible for logging.
-
isEligibleForJoinPoint
protected abstract boolean isEligibleForJoinPoint(org.aspectj.lang.JoinPoint joinPoint)
Checks if thejoinPointis 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)
-
-