日志文件记录模块。因为在Linux平台上面,Windows的日志记录API可能不会正常工作, 所以需要这个日志模块来接替Windows的日志模块的工作
LogFile
00 Remarks
这个类模块将输入的信息格式化保存到文本文件之中,记录的信息包括信息头,消息文本,以及消息等级
01 Syntax
Microsoft.VisualBasic.ApplicationServices.Debugging.Logging.LogFile
02 Methods
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| fileName | 1 | 没有路径名称和拓展名,仅包含有单独的文件名 |
| NowTimeNormalizedString | 1 | 将时间字符串里面的":"符号去除之后,剩余的字符串可以用于作为路径来使用 |
| filePath | 1 | |
| MimeType | 1 |
04 Members
Parameters
| Name | Type | Description |
|---|---|---|
path | String | This logfile will saved to. |
bufferSize | Boolean | 当日志的记录数目达到这个数目的时候就会将日志数据写入到文件之中 |
Parameters
| Name | Type | Description |
|---|---|---|
filepath | String | - |
append | Boolean | - |
split | LoggingDriver | LoggingDriver(header As |
向日志文件之中写入数据
Parameters
| Name | Type | Description |
|---|---|---|
msg | String | - |
obj | String | - |
type | MSG_TYPES | - |
WriteLine(
String, String())Parameters
| Name | Type | Description |
|---|---|---|
s | String | - |
args | String() | {[Object] As String, Optional Type As MsgType = MsgType.INF, Optional WriteToScreen As Boolean = True} |
SystemInfo
给出用于调试的系统的信息摘要
SaveLog
会自动拓展已经存在的日志数据
fileName
没有路径名称和拓展名,仅包含有单独的文件名
NowTimeNormalizedString
将时间字符串里面的":"符号去除之后,剩余的字符串可以用于作为路径来使用
filePath
MimeType
Trace(
String, Object())Debug(
String, Object())info(
String, String)LogException(
String, String)ToString()
WriteLine(
String)Save()
Dispose()