An Event Report : EventLog « Win32 « Perl






An Event Report

   


use Win32::EventLog;

$eventLog = Win32::EventLog->new('System') || die $!;
%eventRecord = (
      'Source'       => 0,
      'Computer'     => 0,
      'Length'       => 0,
      'RecordNumber' => 0,
      'TimeGenerated'=> 0,
      'Timewritten'  => 0,
      'ClosingRecordNumber' => 0,
      'Category'     => 2,
      'EventID'      => 4242,
      'EventType'    => EVENTLOG_INFORMATION_TYPE,
      'Strings'      => "Used to identify the data",
      'Data'         => "Informational data about the message",
      );
$eventLog->Report(\%eventRecord);

   
    
    
  








Related examples in the same category

1.Checking the Windows Event Log