Skip to content

Commit

Permalink
* 修改日志级别
Browse files Browse the repository at this point in the history
  • Loading branch information
fjn committed Jan 19, 2021
1 parent 498bd51 commit b6bbcf4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,18 @@ public static void clearChoices() {
*/
public static void setCurrent(DataSourceKey key) {
Preconditions.checkNotNull(key);
logger.warn("set {}", key);
if (logger.isDebugEnabled()) {
logger.debug("set {}", key);
}
CURRENT_SELECTED.set(key);
addChoice(key);
}

public static DataSourceKey getCurrent() {
DataSourceKey key = CURRENT_SELECTED.get();
logger.warn("get {}", key);
if (logger.isDebugEnabled()) {
logger.debug("get {}", key);
}
return key;
}

Expand All @@ -241,7 +245,9 @@ public static DataSourceKey getCurrent() {
*/
public static void removeCurrent() {
DataSourceKey current = getCurrent();
logger.warn("remove {}", current);
if (logger.isDebugEnabled()) {
logger.debug("remove {}", current);
}
CURRENT_SELECTED.reset();
removeChoice(current);
}
Expand Down
Binary file not shown.

0 comments on commit b6bbcf4

Please sign in to comment.