public interface OperationLogHandler<T>
| 限定符和类型 | 方法和说明 |
|---|---|
T |
buildLog(OperationLogging operationLogging,
org.aspectj.lang.ProceedingJoinPoint joinPoint)
创建操作日志
|
void |
handleLog(T operationLog)
处理日志,可以在这里进行存储,或者输出
|
T |
recordExecutionInfo(T log,
org.aspectj.lang.ProceedingJoinPoint joinPoint,
long executionTime,
Throwable throwable,
boolean isSaveResult,
Object result)
目标方法执行完成后进行信息补充记录, 如执行时长,异常信息,还可以通过切点记录返回值,如果需要的话
|
T buildLog(OperationLogging operationLogging, org.aspectj.lang.ProceedingJoinPoint joinPoint)
operationLogging - 操作日志注解joinPoint - 当前执行方法的切点信息T recordExecutionInfo(T log, org.aspectj.lang.ProceedingJoinPoint joinPoint, long executionTime, Throwable throwable, boolean isSaveResult, Object result)
log - 操作日志对象 buildLog(com.hccake.ballcat.common.log.operation.annotation.OperationLogging, org.aspectj.lang.ProceedingJoinPoint)joinPoint - 当前执行方法的切点信息executionTime - 方法执行时长throwable - 方法执行的异常,为 null 则表示无异常isSaveResult - 是否记录返回值result - 方法执行的返回值void handleLog(T operationLog)
operationLog - 操作日志Copyright © 2023. All rights reserved.