Perl5b3 problem with Syslog.pm 
Author Message
 Perl5b3 problem with Syslog.pm

I am having problems with Syslog.pm on Soalris 2.3.
[Aside: Perl compiles and passes 100% of tests :-)]

The problem is that nothing (absolutely nothing) is getting
to syslog (running in debug mode). This means that the socket
setup is not working BUT there is no error message and the
socket call "appears" to work.

I have had to change some lines in Syslog.pm (hard coded variables):
-----<DIFF>----
40d39
< require 'sys/socket.ph';
122,124c121
<     chomp($message) ;
<     print "DEBUG: send(SYSLOG,\"<$sum> $whoami: $message\",0)\n" ;
<     unless (send(SYSLOG,"<$sum> $whoami: $message",0)) {
---

Quote:
>     unless (send(SYSLOG,"<$sum>$whoami: $message",0)) {

145c142
<     $name = "Syslog::$name";
---
Quote:
>     $name = "syslog'$name";

150d146
<
153,154c149,150
<     $af_unix = &AF_UNIX;
<     $af_inet = &AF_INET;
---
Quote:
>     $af_unix = 1;
>     $af_inet = 2;

156,157c152,153
<     $stream = &SOCK_STREAM;
<     $datagram = &SOCK_DGRAM;
---
Quote:
>     $stream = 1;
>     $datagram = 2;

190d185
<     send(SYSLOG,"<36> TEST: MESSAGE",0) ;
----<END DIFF>----

The code fragment looks like:

Quote:
>use Syslog;
>Syslog::openlog("SECURE (4.0) [$$] ",'cons','local5');
>Syslog::syslog('warning','this is a better test: %d', time);
>Syslog::closelog();
>Syslog::openlog("SECURE (4.0) [$$] ",'cons','auth');
>Syslog::syslog('warning','this is an auth.warning test: %d', time);
>Syslog::closelog();

The results look like this:

Quote:
>DEBUG: send(SYSLOG,"<172> SECURE (4.0) [6932] : this is a better test: 780627370",0)
>DEBUG: send(SYSLOG,"<36> SECURE (4.0) [6932] : this is an auth.warning test: 780627371",0)

--
---------*---------*---------*---------*---------*---------*---------

What:    UNIX Systems Manager                universe and everything
Where:   Citibank, Sydney, Australia         is UNIX (/nev/dull)!


Sat, 15 Mar 1997 09:04:44 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problems with Syslog.pm (Perl5.000)

2. Syslog.pm problems in Linux

3. Syslog.pm problem

4. Problem with syslog.ph & Sys::Syslog

5. HELP: Syslog.pm under perl5b2a

6. Syslog.pm

7. Logs aren't updated using syslog.pm

8. Syslog.pm with Solaris2.4 ????

9. LIBRARY: Syslog.pm

10. need help with syslog.pm

11. Help getting Syslog.pm to work

12. Syslog.pm error, LOG_CODE does not exist

 

 
Powered by phpBB® Forum Software