[Omaha.pm] RE: Net::Dev::Tools::Syslog -- local?

Jay Hannah jhannah at omnihotels.com
Wed Sep 15 13:41:52 CDT 2004


Yikes... Just stumbled into an ugly hack where I can do networked syslog from inside Sys::Syslog...

-----------------
#!/usr/bin/perl
use Sys::Syslog qw(:DEFAULT setlogsock);

$Sys::Syslog::host = "king";   # <--- Ugly hack
setlogsock("inet");
openlog("ProgramX", 'ndelay', 'user');
syslog('notice', 'Test 1');
syslog('notice', 'What?: Test 2');
closelog;
----------------

Ponder... Perhaps I need to throw an doc/code patch at perl5-porters for Sys::Syslog...

j


> -----Original Message-----
> From: Jay Hannah [mailto:jhannah at omnihotels.com]
> Sent: Tuesday, September 14, 2004 6:05 PM
> To: 'sparsons at cpan.org'
> Cc: 'root at omnihotels.com'
> Subject: Net::Dev::Tools::Syslog -- local?
> 
> 
> 
> Hi Scott --
> 
> I'm trying to write an abstraction for syslog'ing for our 
> company (local and remote, many servers). Sometimes I'm 
> remote, UDP port 514 is open, and in those cases 
> Net::Dev::Tools::Syslog works great. Thanks!
> 
> Other times, though, I'm local and UDP port 514 is not open. 
> "logger" from the command line still works, and I assume 
> Sys::Syslog would also work using types 'unix' or 'stream'...
> 
> It appears to me that I need to use *both* 
> Net::Dev::Tools::Syslog and Sys::Syslog in my environment. I 
> can't seem to find any package that does what both do in a 
> single bundle. Am I missing something obvious to you?
> 
> Thanks,
> 
> Jay Hannah
> Director of Development
> Omni Hotels Reservation Center
> Tel: (402) 952-6573
> Mobile: (402) 578-3976
> Email: jhannah at omnihotels.com
> 
> The Omni Majestic -- a unique boutique concept -- takes you 
> back in time with concierge style service in the heart of St. 
> Louis.  Learn more at www.omnimajestic.com.
> 




More information about the Omaha-pm mailing list