Log::Agent::Channel::Syslog(3pm)

Log::Agent::Channel::Syslog3pm

Syslog logging channel for log::agent::logger

Usage

 require Log::Agent::Channel::Syslog;
 my $channel = Log::Agent::Channel::Syslog->make(
     # Specific attributes
     -prefix     => prefix,
     -facility   => "user",
     -showpid    => 1,
     -socktype   => { port => 514, type => "udp" },
     -logopt     => "ndelay",
 );

Overview

The syslog logging channels directs operations to syslog() via the Sys::Syslog(3) interface.

The creation routine make() takes the following switches:

"-facility" => facility

Tell syslog() which facility to use (e.g. "user", "auth", "daemon"). Unlike the Sys::Syslog(3) interface, the facility is set once and for all: every message logged through this channel will use the same facility.

"-logopt" => syslog options

Specifies logging options, under the form of a string containing zero or more of the words ndelay, cons or nowait.

"-prefix" => prefix

The prefix here is syslog's identification string.

"-showpid" => flag

Set to true to have the PID of the process logged. It is false by default.

"-socktype" => options

Configures the logging socket.

The given options are passed without interpretation to "setlogsock()" hence refer to Sys::Sylog(3) for the exhaustive set of configuration options there.

If you run "rsyslogd" over TCP on a non-standard port 60514 for instance, you could say:

        -socktype => { port => 60514, type => "tcp" }

but there are many other configuration possibilities.

Releases

12 releases since Debian 3.0 (Woody); the text changed 7 times.

  1. 3.0
  2. 3.1
  3. 4.0–5.0
  4. 6.0–7
  5. 8
  6. 9–10
  7. 11
  8. 12–13

Author

Raphael Manfredi <[email protected]>

From liblog-agent-perl 1.005-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.