public enum AdapterLevel extends Enum<AdapterLevel>
适配日志级别,通过这个日志级别来适配映射 log4j、log4j2 和 logback 的日志级别,通过统一接口来屏蔽差异
Created by yangguanchao on 17/4/28.
| Enum Constant and Description |
|---|
DEBUG
A general debugging event.
|
ERROR
An error in the application, possibly recoverable.
|
INFO
An event for informational purposes.
|
TRACE
A fine-grained debug message, typically capturing the flow through the application.
|
WARN
An event that might possible lead to an error.
|
| Modifier and Type | Method and Description |
|---|---|
static AdapterLevel |
getAdapterLevel(String adapterLogLevelMsg) |
String |
getLogLevelMsg() |
String |
toString() |
static AdapterLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AdapterLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AdapterLevel ERROR
public static final AdapterLevel WARN
public static final AdapterLevel INFO
public static final AdapterLevel DEBUG
public static final AdapterLevel TRACE
public static AdapterLevel[] values()
for (AdapterLevel c : AdapterLevel.values()) System.out.println(c);
public static AdapterLevel valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static AdapterLevel getAdapterLevel(String adapterLogLevelMsg)
public String getLogLevelMsg()
public String toString()
toString in class Enum<AdapterLevel>Copyright © 2024. All rights reserved.