Class OpLogValidateInterceptor

java.lang.Object
org.shoulder.log.operation.logger.intercept.OpLogValidateInterceptor
All Implemented Interfaces:
OperationLoggerInterceptor

public class OpLogValidateInterceptor extends Object implements OperationLoggerInterceptor
用于对日志格式由一定要求时,与OperationLogValidator 配合使用在记录前进行校验
Author:
lym
  • Constructor Details

    • OpLogValidateInterceptor

      public OpLogValidateInterceptor(OperationLogValidator operationLogValidator)
  • Method Details

    • beforeLog

      public void beforeLog(OperationLogDTO opLog)
      Description copied from interface: OperationLoggerInterceptor
      在记录日志之前。 可以继续针对自己的应用统一补充某些有规律的值 可以进行一些格式校验,以免记录的日志某些字段超长(加入存储是关系型数据库则推荐使用)
      Specified by:
      beforeLog in interface OperationLoggerInterceptor
      Parameters:
      opLog - 待验证的日志实体