1Agent::Channel::Syslog(U3s)er Contributed Perl DocumentatAigoennt::Channel::Syslog(3)
2
3
4
6 Log::Agent::Channel::Syslog - syslog logging channel for
7 Log::Agent::Logger
8
10 require Log::Agent::Channel::Syslog;
11
12 my $channel = Log::Agent::Channel::Syslog->make(
13 # Specific attributes
14 -prefix => prefix,
15 -facility => "user",
16 -showpid => 1,
17 -socktype => { port => 514, type => "udp" },
18 -logopt => "ndelay",
19 );
20
22 The syslog logging channels directs operations to syslog() via the
23 Sys::Syslog(3) interface.
24
25 The creation routine make() takes the following switches:
26
27 "-facility" => facility
28 Tell syslog() which facility to use (e.g. "user", "auth",
29 "daemon"). Unlike the Sys::Syslog(3) interface, the facility is
30 set once and for all: every message logged through this channel
31 will use the same facility.
32
33 "-logopt" => syslog options
34 Specifies logging options, under the form of a string containing
35 zero or more of the words ndelay, cons or nowait.
36
37 "-prefix" => prefix
38 The prefix here is syslog's identification string.
39
40 "-showpid" => flag
41 Set to true to have the PID of the process logged. It is false by
42 default.
43
44 "-socktype" => options
45 Configures the logging socket.
46
47 The given options are passed without interpretation to
48 "setlogsock()" hence refer to Sys::Sylog(3) for the exhaustive set
49 of configuration options there.
50
51 If you run "rsyslogd" over TCP on a non-standard port 60514 for
52 instance, you could say:
53
54 -socktype => { port => 60514, type => "tcp" }
55
56 but there are many other configuration possibilities.
57
59 Raphael Manfredi <Raphael_Manfredi@pobox.com>
60
62 Log::Agent::Logger(3), Sys::Syslog(3).
63
64
65
66perl v5.34.0 2021-07-22 Agent::Channel::Syslog(3)