修改日志打印逻辑.

This commit is contained in:
lijiahang
2023-07-21 14:39:19 +08:00
parent 26868254e3
commit 99725eb97a
12 changed files with 117 additions and 49 deletions

View File

@@ -1,5 +1,7 @@
package com.orion.ops.framework.common.annotation;
import com.orion.ops.framework.common.constant.IgnoreLogMode;
import java.lang.annotation.*;
/**
@@ -13,4 +15,12 @@ import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface IgnoreLog {
/**
* 日志忽略模式
*
* @return 日志忽略模式
*/
IgnoreLogMode value() default IgnoreLogMode.ALL;
}

View File

@@ -0,0 +1,34 @@
package com.orion.ops.framework.common.constant;
/**
* 日志忽略模式
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/21 9:54
*/
public enum IgnoreLogMode {
/**
* 不打印任何日志
*/
ALL,
/**
* 不打印参数
*/
ARGS,
/**
* 不打印返回值
*/
RET,
/**
* 不打印参数以及返回值
*/
ARGS_RET,
;
}