in reply to Re^3: Using Win32::Eventlog
in thread Using Win32::Eventlog

Gyuk! I knew there were more reasons I didn't like Windows...

Thanks for the info, though. That explains a lot. Everything seems to work, if I pass in the log names that the Event Viewer shows; so I guess it will handle more than just the three standard logs (of course, maybe that was a fluke...). I tried giving the full paths to the files. New didn't give an error, but when I queried for the number of records, I got nothing. I don't think I can count on it to handle backup, then.

I guess I'll build a hash lookup table and check it against the .evt files on the server to see what logs are there to be backed up. Too bad there isn't a list of the event logs in the environment. This will be a bit convoluted and brain dead, but oh well...

Again, many thanks!

--Al

Replies are listed 'Best First'.
Re^5: Using Win32::Eventlog
by BrowserUk (Patriarch) on Jan 14, 2009 at 18:50 UTC
    I knew there were more reasons I didn't like Windows...

    Hm. Did it ever strike you that maybe if you tried to use Windows as Windows, rather that as some *nix substitute, you might get on better?

    The windows event log apis are designed to log significant events to the systems event logs, regardless of the application that generated them. They are not designed as a general purpose logging api. It's done that way that the user has one place to go to look for critical events, rather than having to plunder their entire file system looking for where some application might have stuck its log file.

    If you're looking for a general purpose application logging mechanism, use one of those on CPAN in the LOG::* namespace that writes a standard flats ascii file rather than Windows proprietary binary format.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.