nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Runtime / LogFile

LogFile

Full name Microsoft.VisualBasic.ApplicationServices.Debugging.Logging.LogFile Assembly Microsoft.VisualBasic.Runtime Members 20

日志文件记录模块。因为在Linux平台上面,Windows的日志记录API可能不会正常工作, 所以需要这个日志模块来接替Windows的日志模块的工作

00 Remarks

这个类模块将输入的信息格式化保存到文本文件之中,记录的信息包括信息头,消息文本,以及消息等级

01 Syntax

Microsoft.VisualBasic.ApplicationServices.Debugging.Logging.LogFile

02 Methods

NameOverloadsSummary
.ctor 1
Open 1
WriteLine 3 向日志文件之中写入数据
SystemInfo 1 给出用于调试的系统的信息摘要
SaveLog 1 会自动拓展已经存在的日志数据
Trace 2
Debug 1
info 1
log 1
LogException 1
ToString 1
Save 1
Dispose 1

03 Properties

NameOverloadsSummary
fileName 1 没有路径名称和拓展名,仅包含有单独的文件名
NowTimeNormalizedString 1 将时间字符串里面的":"符号去除之后,剩余的字符串可以用于作为路径来使用
filePath 1
MimeType 1

04 Members

method .ctor #
#ctor(String, Boolean, Int32, Boolean, Boolean, LoggingDriver)
Parameters
NameTypeDescription
pathString

This logfile will saved to.

bufferSizeBoolean

当日志的记录数目达到这个数目的时候就会将日志数据写入到文件之中

method Open #
Open(String, Boolean, LoggingDriver)
Parameters
NameTypeDescription
filepathString

-

appendBoolean

-

splitLoggingDriver

LoggingDriver(header As String, message As String, level As MSG_TYPES)

method WriteLine #
WriteLine(String, String, MSG_TYPES)

向日志文件之中写入数据

Parameters
NameTypeDescription
msgString

-

objString

-

typeMSG_TYPES

-

method WriteLine overload 2 #
WriteLine(String, String())
Parameters
NameTypeDescription
sString

-

argsString()

{[Object] As String, Optional Type As MsgType = MsgType.INF, Optional WriteToScreen As Boolean = True}

method SystemInfo #
SystemInfo

给出用于调试的系统的信息摘要

method SaveLog #
SaveLog

会自动拓展已经存在的日志数据

property fileName #
fileName

没有路径名称和拓展名,仅包含有单独的文件名

property NowTimeNormalizedString #
NowTimeNormalizedString

将时间字符串里面的":"符号去除之后,剩余的字符串可以用于作为路径来使用

property filePath #
filePath
property MimeType #
MimeType
method Trace #
Trace(Func(Of String, Byte(), String), String, Byte())
method Trace overload 2 #
Trace(String, Object())
method Debug #
Debug(String, Object())
method info #
info(String, String)
method log #
log(MSG_TYPES, StringBuilder, String)
method LogException #
LogException(String, String)
method ToString #
ToString()
method WriteLine overload 3 #
WriteLine(String)
method Save #
Save()
method Dispose #
Dispose()