Полезная информация

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: BackupChapter 19
Win32 Modules and Extensions
Next: Reference: Report


$log->Read(flags, offset, \%eventinfo)

Reads an entry from the event log and returns the information in the eventinfo hash. offset specifies the record number you want to start at in the log. flags sets options for how you want to read the log, which can be any combination of the following:


Eventlog is read in forward chronological order.


Eventlog is read in reverse chronological order.


The read begins at the record specified by the $RecordOffset parameter. Must also specify EVENT_LOG_FORWARDS_READ or EVENTLOG_BACKWARDS_READ.


The read continues sequentially from the last read call.

The final argument is the output object for the event read. \ventinfo is a reference to a hash that contains keys for each part of the event description. This same structure is used when you report new events to the event log using the Report method. The eventinfo hash looks like this:

%event = (
    EventID             => val,
    EventType           => val,
    Category            => val,
    ClosingRecordNumber => val,
    Source              => val,
    Computer            => val,
    Strings             => val,
    Data                => val,

Previous: Reference: BackupPerl in a NutshellNext: Reference: Report
Reference: BackupBook IndexReference: Report