1Log::Dispatch::Syslog(3U)ser Contributed Perl DocumentatiLoong::Dispatch::Syslog(3)
2
3
4

NAME

6       Log::Dispatch::Syslog - Object for logging to system log.
7

VERSION

9       version 2.27
10

SYNOPSIS

12         use Log::Dispatch;
13
14         my $log = Log::Dispatch->new(
15             outputs => [
16                 [
17                     'Syslog',
18                     min_level => 'info',
19                     ident     => 'Yadda yadda'
20                 ]
21             ]
22         );
23
24         $log->emerg("Time to die.");
25

DESCRIPTION

27       This module provides a simple object for sending messages to the system
28       log (via UNIX syslog calls).
29
30       Note that logging may fail if you try to pass UTF-8 characters in the
31       log message. If logging fails and warnings are enabled, the error
32       message will be output using Perl's "warn".
33

CONSTRUCTOR

35       The constructor takes the following parameters in addition to the
36       standard parameters documented in Log::Dispatch::Output:
37
38       ·   ident ($)
39
40           This string will be prepended to all messages in the system log.
41           Defaults to $0.
42
43       ·   logopt ($)
44
45           A string containing the log options (separated by any separator you
46           like).  See the openlog(3) and Sys::Syslog docs for more details.
47           Defaults to ''.
48
49       ·   facility ($)
50
51           Specifies what type of program is doing the logging to the system
52           log.  Valid options are 'auth', 'authpriv', 'cron', 'daemon',
53           'kern', 'local0' through 'local7', 'mail, 'news', 'syslog', 'user',
54           'uucp'.  Defaults to 'user'
55
56       ·   socket ($ or \@)
57
58           Tells what type of socket to use for sending syslog messages.
59           Valid options are listed in "Sys::Syslog".
60
61           If you don't provide this, then we let "Sys::Syslog" simply pick
62           one that works, which is the preferred option, as it makes your
63           code more portable.
64
65           If you pass an array reference, it is dereferenced and passed to
66           "Sys::Syslog::setlogsock()".
67

AUTHOR

69       Dave Rolsky <autarch@urth.org>
70
72       This software is Copyright (c) 2010 by Dave Rolsky.
73
74       This is free software, licensed under:
75
76         The Artistic License 2.0
77
78
79
80perl v5.12.2                      2010-10-16          Log::Dispatch::Syslog(3)
Impressum