public enum DebugLogger extends java.lang.Enum<DebugLogger>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
void |
info(java.lang.String msg)
记录日志 INFO level.
|
void |
info(java.lang.String format,
java.lang.Object... args)
记录日志 INFO level.
|
static DebugLogger |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DebugLogger[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DebugLogger INSTANCE
public static DebugLogger[] values()
for (DebugLogger c : DebugLogger.values()) System.out.println(c);
public static DebugLogger valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic void info(java.lang.String msg)
msg - 日志信息public void info(java.lang.String format,
java.lang.Object... args)
例子:
DebugLogger.INSTANCE.info("无格式日志");
String arg1 = "arg1";
int arg2 = 222;
Class arg3 = String.class;
String argN = "argN";
DebugLogger.INSTANCE.info("有格式日志记录--{}---{}--{}--{}", arg1, arg2, arg3, argN);
format - 日志信息. 如: "有格式日志记录--{}---{}--{}--{}"args - 可变参数