Al_Gee has asked for the wisdom of the Perl Monks concerning the following question:
I have a need to copy Windows event logs to a backup location on a number of servers. I was going to use Win32::EventLog, but I am having some difficulty.
We have standard event logs as well as some non-standard .evt files. It took me awhile to realize that I couldn't just read the .evt files in the c:\windows\system32\config directory and use those names as the SourceName for my call to Win32::EventLog->new(). It seems, though, that I can pass the names as the Event Viewer knows them (e.g., the Application event log is actually AppEvent.evt, but you need to use 'Application' rather than 'AppEvent').
Is there some way that I can capture the names as the Event Viewer knows/understands them (in other words, replace my reading of the config directory with something that gives me the correct names), or am I going to be stuck passing them in from the command line or some such? Thanks-- Al
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Win32::Eventlog
by BrowserUk (Patriarch) on Jan 13, 2009 at 21:11 UTC | |
by Al_Gee (Initiate) on Jan 14, 2009 at 15:12 UTC | |
by BrowserUk (Patriarch) on Jan 14, 2009 at 16:29 UTC | |
by Al_Gee (Initiate) on Jan 14, 2009 at 18:05 UTC | |
by BrowserUk (Patriarch) on Jan 14, 2009 at 18:50 UTC | |
|
Re: Using Win32::Eventlog
by zentara (Cardinal) on Jan 13, 2009 at 20:10 UTC | |
|
Re: Using Win32::Eventlog
by mr_mischief (Monsignor) on Jan 13, 2009 at 19:46 UTC |