Hi folks. It seems like there were a couple of old questions regarding Win32::Eventlog here, but I don't see mine. I'm polling a small slew of computers logs, and everything works fine.. well.. there are a few servers that I don't think I'm hitting, and I'm getting no error on it.
In my "process this server" code, I've got the following little snippet.
unless ( $log = Win32::EventLog->new("System",$computer) ) {
log_data("Unable to open system log for $computer",4);
next;
}
log_data is merely a logging routine I have in there.. but the important thing is that (1) I never log that error message, and (2) I don't skip to the 'next' server if I *should* have failed my new() statement. I know this because I threw a computer named CRACKHEAD into the mix. I'm finding no events in the Crackhead eventlog, but I really expect to find no Crackhead, and to be informed accordingly.
Has anyone come across such a silliness before? I can't get my Win32::Eventlog::new to fail =(
-=rev=-
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.