点击或拖拽改变大小

HslMessageItem 类

单条日志的记录信息,包含了消息等级,线程号,关键字,文本信息
Record information of a single log, including message level, thread number, keywords, text information
继承层次
SystemObject
  HslCommunication.LogNetHslMessageItem

命名空间:  HslCommunication.LogNet
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public class HslMessageItem

HslMessageItem 类型公开以下成员。

构造函数
  名称说明
公共方法HslMessageItem
实例化一个默认的对象
Instantiate a default object
Top
属性
  名称说明
公共属性Cancel
是否取消写入到文件中去,在事件 BeforeSaveToFile 触发的时候捕获即可设置。
Whether to cancel writing to the file, can be set when the event BeforeSaveToFile is triggered.
公共属性Degree
消息的等级,包括DEBUG,INFO,WARN,ERROR,FATAL,NONE共计六个等级
Message levels, including DEBUG, INFO, WARN, ERROR, FATAL, NONE total six levels
公共属性Id
单个记录信息的标识ID,程序重新运行时清空,代表程序从运行以来的日志计数,不管存储的或是未存储的
The ID of a single record of information. It is cleared when the program is re-run. It represents the log count of the program since it was run, whether stored or unstored.
公共属性KeyWord
消息的关键字
Keyword of the message
公共属性Text
消息文本,记录日志的时候给定
Message text, given when logging
公共属性ThreadId
线程ID,发生异常时的线程号
Thread ID, the thread number when the exception occurred
公共属性Time
记录日志的时间,而非存储日志的时间
The time the log was recorded, not the time it was stored
Top
方法
  名称说明
公共方法Equals (继承自 Object。)
受保护的方法Finalize (继承自 Object。)
公共方法GetHashCode (继承自 Object。)
公共方法GetType (继承自 Object。)
受保护的方法MemberwiseClone (继承自 Object。)
公共方法ToString (重写 ObjectToString.)
公共方法ToStringWithoutKeyword
返回表示当前对象的字符串,剔除了关键字
Returns a string representing the current object, excluding keywords
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
参见