提交 10e445e8 编写于 作者: H HeJin

feat: 增加全局日志配置类

上级 d6cbceca
package me.zhyd.oauth.config;
import me.zhyd.oauth.log.Log;
/**
* JustAuth 日志配置类
* @author HeJin
* @date 2021/1/9 20:28
*/
public class JustAuthLogConfig {
/**
* 设置日志级别
* @param level 日志级别
*/
public static void setLevel(Log.Level level){
Log.Config.level = level;
}
/**
* 关闭日志
*/
public static void disable(){
Log.Config.enable = false;
}
/**
* 开启日志
*/
public static void enable(){
Log.Config.enable = true;
}
}
...@@ -136,15 +136,15 @@ public class Log { ...@@ -136,15 +136,15 @@ public class Log {
* @author yadong.zhang (yadong.zhang0415(a)gmail.com) * @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.10.0 * @since 1.10.0
*/ */
static class Config { public static class Config {
/** /**
* 需要打印的日志级别 * 需要打印的日志级别
*/ */
static Level level = Level.DEBUG; public static Level level = Level.DEBUG;
/** /**
* 是否启用日志打印功能,默认启用 * 是否启用日志打印功能,默认启用
*/ */
static boolean enable = true; public static boolean enable = true;
} }
} }
/** /**
* 针对JustAuth简单封装的日志打印工具,可用过{@link me.zhyd.oauth.log.Log.Config}开关日志和指定日志级别 * 针对JustAuth简单封装的日志打印工具,可用过{@link me.zhyd.oauth.config.JustAuthLogConfig}开关日志和指定日志级别
*/ */
package me.zhyd.oauth.log; package me.zhyd.oauth.log;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册