Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems in Sys::Syslog and stdarg.ph #684

Closed
p5pRT opened this issue Oct 5, 1999 · 2 comments
Closed

problems in Sys::Syslog and stdarg.ph #684

p5pRT opened this issue Oct 5, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 5, 1999

Migrated from rt.perl.org#1574 (status was 'resolved')

Searchable as RT1574$

@p5pRT
Copy link
Author

p5pRT commented Oct 5, 1999

From noel@burton-krahn.com

I found two problems with Sys​::Syslog​:

(1) There's an error in stdarg.ph, required by Syslog.pm​:

  Constant subroutine __need___va_list undefined at /usr/lib/perl5/5.00503/i386-linux/stdarg.ph line 9.

  The answer is to comment out line 9 by hand

ed /usr/lib/perl5/5.00503/i386-linux/stdarg.ph <<EOF
9 s/^/#/
wq
EOF

(2) Sys​::Syslog also doesn't seem to work unless you use
  setlogsock('unix'). That tells it to use the syslog unix domain
  socket, instead of the default inet (UDP or TCP) socket.

Here's my test program which works (after editing stdarg.ph)​:

#! /usr/bin/perl -w

use Sys​::Syslog qw(​:DEFAULT setlogsock);

setlogsock('unix');
openlog("Sys​::Syslog", "cons,pid", "user");
syslog("info", "testing syslog at %s", scalar(localtime()));
closelog();

--Noel

@p5pRT
Copy link
Author

p5pRT commented Oct 5, 1999

From [Unknown Contact. See original ticket]

OS​: Linux 2.2.10 (RedHat-6.0)
Perl​: 5.005_03 (perl-5.00503-2.i386.rpm)

I found two problems with Sys​::Syslog​:

(1) There's an error in stdarg.ph, required by Syslog.pm​:

  Constant subroutine __need___va_list undefined at /usr/lib/perl5/5.00503/i386-linux/stdarg.ph line 9.

  The answer is to comment out line 9 by hand

ed /usr/lib/perl5/5.00503/i386-linux/stdarg.ph <<EOF
9 s/^/#/
wq
EOF

(2) Sys​::Syslog also doesn't seem to work unless you use
  setlogsock('unix'). That tells it to use the syslog unix domain
  socket, instead of the default inet (UDP or TCP) socket.

Here's my test program which works (after editing stdarg.ph)​:

#! /usr/bin/perl -w

use Sys​::Syslog qw(​:DEFAULT setlogsock);

setlogsock('unix');
openlog("Sys​::Syslog", "cons,pid", "user");
syslog("info", "testing syslog at %s", scalar(localtime()));
closelog();

--Noel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant