[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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@omnihotels.com]
> Sent: Tuesday, September 14, 2004 6:05 PM
> To: 'sparsons@cpan.org'
> Cc: 'root@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@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.
>