forked from justauth/JustAuth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request justauth#110 from hangsman/master
feat: 增加全局日志配置类
- Loading branch information
Showing
6 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/** | ||
* 针对JustAuth简单封装的日志打印工具,可用过{@link me.zhyd.oauth.log.Log.Config}开关日志和指定日志级别 | ||
* 针对JustAuth简单封装的日志打印工具,可用过{@link me.zhyd.oauth.config.JustAuthLogConfig}开关日志和指定日志级别 | ||
*/ | ||
package me.zhyd.oauth.log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters