EventLogInformation 类

定义

允许您访问活动事件日志和事件日志文件的运行时属性。Allows you to access the run-time properties of active event logs and event log files. 这些属性包括日志中的事件数、日志大小、确定日志是否已满的值以及上次写入或访问日志的时间。These properties include the number of events in the log, the size of the log, a value that determines whether the log is full, and the last time the log was written to or accessed.

public ref class EventLogInformation sealed
public sealed class EventLogInformation
type EventLogInformation = class
Public NotInheritable Class EventLogInformation
继承
EventLogInformation

示例

有关使用此类的代码示例,请参阅 如何:配置和读取事件日志属性For example code using this class, see How to: Configure and Read Event Log Properties.

属性

Attributes

获取与日志关联的日志文件的文件特性。Gets the file attributes of the log file associated with the log.

CreationTime

获取与事件日志关联的日志文件的创建时间。Gets the time that the log file associated with the event log was created.

FileSize

获取与事件日志关联的文件的大小(以字节为单位)。Gets the size of the file, in bytes, associated with the event log.

IsLogFull

获取一个布尔值,该值确定日志文件是否已达到其最大大小(日志已满)。Gets a Boolean value that determines whether the log file has reached its maximum size (the log is full).

LastAccessTime

获取上次访问与事件日志关联的日志文件的时间。Gets the last time the log file associated with the event log was accessed.

LastWriteTime

获取上次将数据写入与事件日志关联的日志文件的时间。Gets the last time data was written to the log file associated with the event log.

OldestRecordNumber

获取事件日志中的最早事件记录数。Gets the number of the oldest event record in the event log.

RecordCount

获取事件日志中的事件记录数。Gets the number of event records in the event log.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于