sungy has asked for the wisdom of the Perl Monks concerning the following question:
Also I realized that the source is not register in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\ Please help and how I can register the event source, many thanks.sub writeeventlog { use Win32::EventLog; my $eventLog = Win32::EventLog->new('MyProgram') my %eventRecord = ( 'Source' => 'MyProgram', 'Computer' => 0, 'Length' => 0, 'RecordNumber' => 0, 'TimeGenerated' => 0, 'Timewritten' => 0, 'ClosingReocrdNumber' => 0, 'Category' => NULL, 'EventID' => 0, 'EventType' => EVENTLOG_ERROR_TYPE, 'Strings' => 'Test.' 'Data' => 'Test.', ); $eventLog->Report(\%eventRecord); $eventLog->Close(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Write to WIndows Event Log
by NetWallah (Canon) on Sep 09, 2005 at 20:49 UTC | |
by InfiniteSilence (Curate) on Sep 09, 2005 at 21:03 UTC | |
|
Re: Write to WIndows Event Log
by InfiniteSilence (Curate) on Sep 09, 2005 at 20:14 UTC | |
|
Re: Write to WIndows Event Log
by shonorio (Hermit) on Sep 09, 2005 at 20:38 UTC | |
|
Re: Write to WIndows Event Log
by jdporter (Paladin) on Mar 14, 2006 at 13:03 UTC | |
|
Re: Write to WIndows Event Log
by wilsond (Scribe) on Jan 21, 2009 at 08:27 UTC |