public class ConsoleLog extends AbstractLog
Constructor and Description |
---|
ConsoleLog(Class<?> clazz)
构造
|
ConsoleLog(String name)
构造
|
Modifier and Type | Method and Description |
---|---|
void |
debug(String fqcn,
Throwable t,
String format,
Object... arguments)
打印 DEBUG 等级的日志
|
void |
error(String fqcn,
Throwable t,
String format,
Object... arguments)
打印 ERROR 等级的日志
|
String |
getName() |
void |
info(String fqcn,
Throwable t,
String format,
Object... arguments)
打印 INFO 等级的日志
|
boolean |
isDebugEnabled() |
boolean |
isEnabled(Level level)
是否开启指定日志
|
boolean |
isErrorEnabled() |
boolean |
isInfoEnabled() |
boolean |
isTraceEnabled() |
boolean |
isWarnEnabled() |
void |
log(String fqcn,
Level level,
Throwable t,
String format,
Object... arguments)
打印 ERROR 等级的日志
|
static void |
setLevel(Level customLevel)
设置自定义的日志显示级别
|
void |
trace(String fqcn,
Throwable t,
String format,
Object... arguments)
打印 TRACE 等级的日志
|
void |
warn(String fqcn,
Throwable t,
String format,
Object... arguments)
打印 WARN 等级的日志
|
debug, debug, debug, error, error, error, info, info, info, log, log, trace, trace, trace, warn, warn, warn
public ConsoleLog(Class<?> clazz)
clazz
- 类public ConsoleLog(String name)
name
- 类名public String getName()
public static void setLevel(Level customLevel)
customLevel
- 自定义级别public boolean isTraceEnabled()
public void trace(String fqcn, Throwable t, String format, Object... arguments)
TraceLog
fqcn
- 完全限定类名(Fully Qualified Class Name),用于定位日志位置t
- 错误对象format
- 消息模板arguments
- 参数public boolean isDebugEnabled()
public void debug(String fqcn, Throwable t, String format, Object... arguments)
DebugLog
fqcn
- 完全限定类名(Fully Qualified Class Name),用于定位日志位置t
- 错误对象format
- 消息模板arguments
- 参数public boolean isInfoEnabled()
public void info(String fqcn, Throwable t, String format, Object... arguments)
InfoLog
fqcn
- 完全限定类名(Fully Qualified Class Name),用于定位日志位置t
- 错误对象format
- 消息模板arguments
- 参数public boolean isWarnEnabled()
public void warn(String fqcn, Throwable t, String format, Object... arguments)
WarnLog
fqcn
- 完全限定类名(Fully Qualified Class Name),用于定位日志位置t
- 错误对象format
- 消息模板arguments
- 参数public boolean isErrorEnabled()
public void error(String fqcn, Throwable t, String format, Object... arguments)
ErrorLog
fqcn
- 完全限定类名(Fully Qualified Class Name),用于定位日志位置t
- 错误对象format
- 消息模板arguments
- 参数public void log(String fqcn, Level level, Throwable t, String format, Object... arguments)
Log
fqcn
- 完全限定类名(Fully Qualified Class Name),用于定位日志位置level
- 级别t
- 错误对象format
- 消息模板arguments
- 参数Copyright © 2024. All rights reserved.