add:es
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package org.nl.common.enums;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public enum LevelEnum{
|
||||
DEBUG,
|
||||
INFO,
|
||||
WARN,
|
||||
ERROR;
|
||||
public static LevelEnum checkLevel(String level){
|
||||
if (!StringUtils.isEmpty(level)){
|
||||
for (LevelEnum value : LevelEnum.values()) {
|
||||
if (value.name().equals(level)){
|
||||
return value;
|
||||
};
|
||||
}
|
||||
}
|
||||
return LevelEnum.DEBUG;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user