LogPathBase 类 |
命名空间: HslCommunication.LogNet
LogPathBase 类型公开以下成员。
名称 | 说明 | |
---|---|---|
LogPathBase | 初始化 LogPathBase 类的一个新实例 |
名称 | 说明 | |
---|---|---|
ConsoleOutput |
获取或设置当前的日志信息在存储的时候是否在控制台进行输出,默认不输出。 (继承自 LogNetBase。)Gets or sets whether the current log information is output on the console when it is stored. It is not output by default. | |
HourDeviation |
获取或设置当前日志时间的小时偏差信息,用来解决某些情况下时区设置异常导致记录时间一直不正确的问题,默认为 0,也就是不处理。可以为正数,也可以为负数。 (继承自 LogNetBase。)Obtain or set the hourly deviation information of the current log time to solve the problem that the recording time has been incorrect due to abnormal time zone setting in some cases, and the default is 0, that is, it is not processed. Can be positive or negative. | |
LogNetStatistics |
获取或设置当前的日志记录统计信息,如果你需要统计最近30天的日志,就需要对其实例化,详细参照LogStatistics (继承自 LogNetBase。)Get or set the current log record statistics. If you need to count the logs of the last 30 days, you need to instantiate it. For details, please refer to LogStatistics | |
LogSaveMode |
日志存储模式,1:单文件,2:按大小存储,3:按时间存储 (继承自 LogNetBase。)Log storage mode, 1: single file, 2: storage by size, 3: storage by time | |
LogStxAsciiCode |
获取或设置在记录文件日志的时候,是否记录不可见字符STX(也即是ASCII字符集的0x02)。默认为 True, 也即是记录这个字符,在日志分析的时候,可以更加方便的分析。 (继承自 LogNetBase。)Gets or sets whether to record the invisible character STX (that is, 0x02 of the ASCII character set) when recording the file log. The default is True, that is, this character is recorded, which can be analyzed more conveniently during log analysis. | |
LogThreadID |
获取或设置是否记录线程ID的数据信息,默认为 True,表示记录,否则,需要设置为 False (继承自 LogNetBase。)Get or set whether to record the data information of the thread ID, the default is True, which means record, otherwise, it needs to be set to False |
名称 | 说明 | |
---|---|---|
Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (继承自 LogNetBase。) | |
Dispose(Boolean) |
释放资源
(继承自 LogNetBase。) | |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) | |
FiltrateKeyword |
过滤掉指定的关键字的日志,该信息不存储,但仍然触发BeforeSaveToFile事件 (继承自 LogNetBase。)Filter out the logs of the specified keywords, the information is not stored, but the BeforeSaveToFile event is still triggered | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) | |
GetExistLogFileNames |
返回所有的日志文件名称,返回一个列表 Returns all log file names, returns a list | |
GetFileSaveName | (继承自 LogNetBase。) | |
GetHashCode | Serves as the default hash function. (继承自 Object。) | |
GetType | Gets the Type of the current instance. (继承自 Object。) | |
HslMessageFormat |
根据需要存储的日志消息,获取实际存储的字符串,重写本方法就可以自定义输出内容 (继承自 LogNetBase。)According to the log message that needs to be stored, get the actual stored string, and the rewrite method can customize the output content | |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) | |
OnWriteCompleted |
当写入文件完成的时候触发,这时候已经释放了文件的句柄了。 (重写 LogNetBaseOnWriteCompleted(Boolean).)Triggered when writing to the file is complete, and the file handle has been released. | |
RecordMessage |
通过指定消息等级,关键字,日志信息进行消息记录 (继承自 LogNetBase。)Record messages by specifying message level, keywords, and log information | |
RemoveFiltrate |
移除过滤的关键字存储 (继承自 LogNetBase。)Remove filtered keyword storage | |
SetMessageDegree |
设置日志的存储等级,高于该等级的才会被存储 (继承自 LogNetBase。)Set the storage level of the logs. Only the logs above this level will be stored. | |
ToString | Returns a string that represents the current object. (重写 LogNetBaseToString.) | |
WriteAnyString |
写入任意字符串 (继承自 LogNetBase。)Write arbitrary string | |
WriteDebug(String) |
写入一条调试日志 (继承自 LogNetBase。)Write a debug log | |
WriteDebug(String, String) |
写入一条带关键字的调试日志 (继承自 LogNetBase。)Write a debug log with keywords | |
WriteDescrition |
写入一条解释性的信息,不属于消息等级控制的范畴 (继承自 LogNetBase。)Write an explanatory message that is not part of message level control | |
WriteError(String) |
写入一条错误日志 (继承自 LogNetBase。)Write an error log | |
WriteError(String, String) |
写入一条带关键字的错误日志 (继承自 LogNetBase。)Write an error log with keywords | |
WriteException(String, Exception) |
写入一条带关键字的异常信息 (继承自 LogNetBase。)Write an exception log with keywords | |
WriteException(String, String, Exception) |
写入一条带关键字和描述信息的异常信息 (继承自 LogNetBase。)Write an exception log with keywords and text | |
WriteFatal(String) |
写入一条致命日志 (继承自 LogNetBase。)Write an fatal log | |
WriteFatal(String, String) |
写入一条带关键字的致命日志 (继承自 LogNetBase。)Write an fatal log with keywords | |
WriteInfo(String) |
写入一条普通日志 (继承自 LogNetBase。)Write an infomation log | |
WriteInfo(String, String) |
写入一条带关键字的普通日志 (继承自 LogNetBase。)Write an information log with keywords | |
WriteNewLine |
写入一行换行符 (继承自 LogNetBase。)Write a newline | |
WriteWarn(String) |
写入一条警告日志 (继承自 LogNetBase。)Write an warn log | |
WriteWarn(String, String) |
写入一条带关键字的警告日志 (继承自 LogNetBase。)Write an warn log with keywords |
名称 | 说明 | |
---|---|---|
BeforeSaveToFile |
存储之前引发的事件,允许额外的操作,比如打印控制台,存储数据库等等 (继承自 LogNetBase。)Store previously raised events, allowing additional operations, such as print console, store database, etc. |
名称 | 说明 | |
---|---|---|
controlFileQuantity |
控制文件的数量,小于1则不进行任何操作,当设置为10的时候,就限制文件数量为10。 Control the number of files. If it is less than 1, no operation is performed. When it is set to 10, the number of files is limited to 10. | |
fileName |
当前正在存储的文件名 File name currently being stored | |
filePath |
存储文件的路径,如果设置为空,就不进行存储。 The path for storing the file. If it is set to empty, it will not be stored. | |
m_fileSaveLock |
文件存储的锁
(继承自 LogNetBase。) |
名称 | 说明 | |
---|---|---|
ToJsonString |
获取当前对象的JSON格式表示的字符串。 (由 HslExtension 定义。)Gets the string represented by the JSON format of the current object. |