Method | Description | |
---|---|---|
LogEntry ( |
写入一条日志信息
|
Method | Description | |
---|---|---|
GetDateTime ( |
获取转换时区后的日志记录时间
|
|
GetPadding ( |
获取日志消息的填充,将会自动添加在日志消息的每一行的开头
|
|
GetTypePrefix ( |
获取日志消息的类型前缀,将会自动添加在每一行消息以标识这个消息的类型
|
|
ReleaseWriter ( |
释放文本编写器
|
|
SplitMultiLine ( string message ) : string[] |
将多行消息按照换行符拆分成多个字符串
|
|
TextLogger ( |
创建 TextLogger 对象
|
|
Write ( |
使用指定的前缀写入多行日志
|
|
WriteLogMessage ( |
派生类实现此方法写入日志
|
protected GetDateTime ( |
||
entry | 日志条目 | |
return | System.DateTime |
protected GetPadding ( |
||
entry | 当前要记录的日志 | |
return | string |
protected GetTypePrefix ( |
||
type | 当前要记录的日志 | |
return | string |
protected ReleaseWriter ( |
||
writer | ||
return | void |
protected SplitMultiLine ( string message ) : string[] | ||
message | string | 多行消息 |
return | string[] |
protected TextLogger ( |
||
filter | 日志筛选器 | |
timezone | 时区信息(默认为UTC-0) | |
return | System |
protected Write ( |
||
entry | 要写入的日志条目 | |
padding | string | 填充字符串,将会添加在每一行日志的前面 |
message | string | 要写入的日志消息 |
return | void |
protected abstract WriteLogMessage ( |
||
entry | 要写入的日志条目 | |
contents | string | 要写入的日志内容 |
return | void |