public class LoggerImpl extends Object implements io.github.kloping.spt.interfaces.Logger
| Modifier and Type | Field and Description |
|---|---|
static Color |
DEBUG_COLOR |
DateFormat |
dfn
日志文件格式
|
DateFormat |
difference
区分每日 已达到隔日切换日志文件的效果
|
static Color |
ERROR_COLOR |
static Color |
INFO_COLOR |
static LoggerImpl |
INSTANCE |
String |
logFileDir
日志文件路径
|
static Color |
NORMAL_COLOR |
static Color |
NORMAL_LOW_COLOR |
| Constructor and Description |
|---|
LoggerImpl() |
| Modifier and Type | Method and Description |
|---|---|
File |
getFile() |
void |
Log(String mess,
Integer level) |
void |
setFormat(SimpleDateFormat format) |
int |
setLogLevel(int level) |
void |
setOutFile(String path)
必须设置为 %s 以替换 日期的字符串格式 默认 ".
|
void |
setPrefix(String prefix) |
public static final LoggerImpl INSTANCE
public static final Color NORMAL_LOW_COLOR
public static final Color NORMAL_COLOR
public static final Color INFO_COLOR
public static final Color DEBUG_COLOR
public static final Color ERROR_COLOR
public DateFormat difference
public DateFormat dfn
public String logFileDir
public File getFile()
public void setOutFile(String path)
setOutFile in interface io.github.kloping.spt.interfaces.Loggerpath - public void setFormat(SimpleDateFormat format)
setFormat in interface io.github.kloping.spt.interfaces.Loggerpublic void Log(String mess, Integer level)
Log in interface io.github.kloping.spt.interfaces.Loggerpublic int setLogLevel(int level)
setLogLevel in interface io.github.kloping.spt.interfaces.Loggerpublic void setPrefix(String prefix)
setPrefix in interface io.github.kloping.spt.interfaces.LoggerCopyright © 2025. All rights reserved.