public class Formater extends Object
Modifier and Type | Method and Description |
---|---|
static StackTraceElement |
currentStackLine()
获得当前栈元素信息
|
void |
fillTokens(Message message)
构造消息格式化 Token
|
String |
format(Message message)
格式化消息
|
protected String |
getDateStamp() |
static String |
getFormatedLogFilePath()
获取格式化后的日志文件路径
|
List<String> |
getLogLevel()
获取日志记录级别信息
|
protected static OutputStream[] |
getOutputStreams()
获取输出流
|
boolean |
messageWritable(Message message)
消息类型是否可以记录
|
static Formater |
newInstance()
获得一个实例
|
protected void |
setDateStamp(String dateStamp) |
String |
simpleFormat(Message message)
简单格式化
|
void |
writeFormatedLog(Message message)
写入消息对象,在进行格式化后的写入
|
void |
writeLog(String msg)
写入消息
|
public Formater(String template)
template
- 模板protected String getDateStamp()
protected void setDateStamp(String dateStamp)
public static StackTraceElement currentStackLine()
public void fillTokens(Message message)
message
- 消息对象public String simpleFormat(Message message)
message
- 消息对象public boolean messageWritable(Message message)
message
- 消息对象public void writeFormatedLog(Message message)
message
- 消息对象public void writeLog(String msg)
msg
- 消息字符串public static String getFormatedLogFilePath()
public static Formater newInstance()
protected static OutputStream[] getOutputStreams()
Copyright © 2020 Voovan. All rights reserved.