public class ConsoleColorLog extends ConsoleLog
Constructor and Description |
---|
ConsoleColorLog(Class<?> clazz)
构造
|
ConsoleColorLog(String name)
构造
|
Modifier and Type | Method and Description |
---|---|
void |
log(String fqcn,
Level level,
Throwable t,
String format,
Object... arguments)
打印 ERROR 等级的日志
|
static void |
setColorFactory(Function<Level,AnsiColor> colorFactory)
设置颜色工厂,根据日志级别,定义不同的颜色
|
debug, error, getName, info, isDebugEnabled, isEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, setLevel, trace, warn
debug, debug, debug, error, error, error, info, info, info, log, log, trace, trace, trace, warn, warn, warn
public ConsoleColorLog(String name)
name
- 类名public ConsoleColorLog(Class<?> clazz)
clazz
- 类public static void setColorFactory(Function<Level,AnsiColor> colorFactory)
colorFactory
- 颜色工厂函数public void log(String fqcn, Level level, Throwable t, String format, Object... arguments)
Log
log
in interface Log
log
in class ConsoleLog
fqcn
- 完全限定类名(Fully Qualified Class Name),用于定位日志位置level
- 级别t
- 错误对象format
- 消息模板arguments
- 参数Copyright © 2024. All rights reserved.