O'Reilly logo

Python Programming On Win32 by Mark Hammond, Andy Robinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Python EventLogRecord Object

A record from an Event Log contains quite a bit of information. Rather than attempt to encode this information in a tuple, a PyEventLogRecord object is used. These objects have the attributes described in Table 18.1.

Table 18.1. Attributes of a PyEventLogRecord

Attribute

Description

RecordNumber

The number of the Event Log record. This number could be used to seek to the specific record.

TimeGenerated

A Time object indicating the time the record was generated.

TimeWritten

A Time object indicating the time the record was actually written to the log.

EventID

An integer event ID, as defined by the application writing the record.

EventType

An integer defining the event type. Will be one of:

EVENTLOG_ERROR_TYPE

EVENTLOG_WARNING_TYPE

EVENTLOG_INFORMATION_TYPE

EVENTLOG_AUDIT_SUCCESS

EVENTLOG_AUDIT_FAILURE

EventCategory

An integer event category, as defined by the application writing the record.

SourceName

The name of the application that generated the Event Log record.

ComputerName

The name of the computer that generated this message.

StringInserts

The string inserts for this message.

Sid

The security identifier of a user to be associated with this record.

Data

The raw binary data for the Event Log record.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required