Lines Matching defs:syslog

18         standard => [qw(openlog syslog closelog setlogmask)],
78 use vars qw($host); # host to send syslog messages to (see notes at end)
91 my $syslog_path = undef; # syslog path for "stream" and "unix" mechanisms
166 $ident ||= basename($0) || getlogin() || getpwuid($<) || 'syslog';
275 if (getservbyname('syslog', 'tcp') || getservbyname('syslogng', 'tcp')) {
284 if (getservbyname('syslog', 'udp')) {
305 sub syslog {
320 croak "syslog: expecting argument \$priority" unless defined $priority;
321 croak "syslog: expecting argument \$format" unless defined $mask;
323 croak "syslog: invalid level/facility: $priority" if $priority =~ /^-\d+$/;
334 croak "syslog: invalid level/facility: $word"
337 croak "syslog: too many levels given: $word" if defined $numpri;
342 croak "syslog: too many facilities given: $word" if defined $numfac;
348 croak "syslog: level must be given" unless defined $numpri;
527 # a syslog service using the selected methods, trying each one in the
555 $err_sub->(join "\n\t- ", "no connection to syslog available", @errs);
569 my $syslog = getservbyname('syslog', 'tcp');
570 $syslog = getservbyname('syslogng', 'tcp') unless defined $syslog;
571 if (!defined $syslog) {
572 push @$errs, "getservbyname failed for syslog/tcp and syslogng/tcp";
586 $addr = sockaddr_in($syslog, $addr);
617 my $syslog = getservbyname('syslog', 'udp');
618 if (!defined $syslog) {
619 push @$errs, "getservbyname failed for syslog/udp";
633 $addr = sockaddr_in($syslog, $addr);
659 # might want syslog_path to be variable based on syslog.h (if only
700 push @$errs, "_PATH_LOG not available in syslog.h and no user-supplied socket path";
772 # would cause the error to be returned. Unfortunately the syslog
828 Sys::Syslog - Perl interface to the UNIX syslog(3) calls
841 syslog $priority, $format, @args;
848 C<Sys::Syslog> is an interface to the UNIX C<syslog(3)> program.
849 Call C<syslog()> with a string priority and a list of C<printf()> args
850 just like C<syslog(3)>.
864 C<:standard> exports the standard C<syslog(3)> functions:
866 openlog closelog setlogmask syslog
870 C<:extended> exports the Perl specific functions for C<syslog(3)>:
876 C<:macros> exports the symbols corresponding to most of your C<syslog(3)>
891 Opens the syslog.
896 C<syslog(3)> documentation for the facilities available in your system.
900 This function will croak if it can't connect to the syslog daemon.
904 B<You should use C<openlog()> before calling C<syslog()>.>
922 C<nofatal> - When set to true, C<openlog()> and C<syslog()> will only
923 emit warnings instead of dying if the connection to the syslog can't
945 Open the syslog with options C<ndelay> and C<pid>, and with facility C<LOCAL0>:
954 =item B<syslog($priority, $message)>
956 =item B<syslog($priority, $format, @args)>
968 If you didn't use C<openlog()> before using C<syslog()>, C<syslog()> will
974 syslog("info", $message); # informational level
975 syslog(LOG_INFO, $message); # informational level
977 syslog("info|local0", $message); # information level, Local0 facility
978 syslog(LOG_INFO|LOG_LOCAL0, $message); # information level, Local0 facility
986 were provided. If the code calling C<syslog()> might execute with
988 C<syslog($priority, "%s", $message)> instead of C<syslog($priority,
1029 C<openlog()> or C<syslog()> and returns true on success,
1036 C<"native"> - use the native C functions from your C<syslog(3)> library
1046 C<"tcp"> - connect to a TCP socket, on the C<syslog/tcp> or C<syslogng/tcp>
1051 C<"udp"> - connect to a UDP socket, on the C<syslog/udp> service.
1148 No C<syslog> before C<openlog>.
1162 syslog('info', '%s', 'this is another test');
1163 syslog('mail|warning', 'this is a better test: %d', time);
1166 syslog('debug', 'this is the last test');
1171 syslog('notice', 'fooprogram: this is really done');
1176 syslog('info', 'problem was %m'); # %m == $! in syslog(3)
1182 syslog('info', 'something happened over here');
1343 =item C<no connection to syslog available>
1345 B<(F)> C<syslog()> failed to connect to the specified socket.
1362 =item C<syslog: expecting argument %s>
1364 B<(F)> You forgot to give C<syslog()> the indicated argument.
1366 =item C<syslog: invalid level/facility: %s>
1370 =item C<syslog: too many levels given: %s>
1374 =item C<syslog: too many facilities given: %s>
1378 =item C<syslog: level must be given>
1399 L<syslog(3)>
1402 L<http://www.opengroup.org/onlinepubs/000095399/basedefs/syslog.h.html>
1404 GNU C Library documentation on syslog,
1407 Solaris 10 documentation on syslog,
1408 L<http://docs.sun.com/app/docs/doc/816-5168/syslog-3c?a=view>
1410 Mac OS X documentation on syslog,
1411 L<http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/syslog.3.html>
1413 IRIX 6.5 documentation on syslog,
1414 L<http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&fname=3c+syslog>
1416 AIX 5L 5.3 documentation on syslog,
1417 L<http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.basetechref/doc/basetrf2/syslog.htm>
1419 HP-UX 11i documentation on syslog,
1420 L<http://docs.hp.com/en/B2355-60130/syslog.3C.html>
1422 Tru64 5.1 documentation on syslog,
1430 I<RFC 3164 - The BSD syslog Protocol>, L<http://www.faqs.org/rfcs/rfc3164.html>
1434 I<RFC 3195 - Reliable Delivery for syslog>, L<http://www.faqs.org/rfcs/rfc3195.html>
1455 Dependency on F<syslog.ph> replaced with XS code by Tom Hughes
1479 C<bug-sys-syslog (at) rt.cpan.org>, or through the web interface at