• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Tie/H30-Apr-2014-565335

t/H30-Apr-2014-8553

ChangesH A D30-Apr-20142.6 KiB6147

MANIFESTH A D30-Apr-2014304 1211

META.jsonH A D30-Apr-2014951 4443

META.ymlH A D30-Apr-2014543 2524

Makefile.PLH A D30-Apr-2014655 2321

READMEH A D30-Apr-20143.9 KiB13591

README

1Tie::Syslog
2===========
3
4SYNOPSIS
5========
6
7    use Tie::Syslog;
8
9    $Tie::Syslog::ident  = "my logging tag";
10    $Tie::Syslog::logopt = "pid,ndelay';
11
12    # Tie STDOUT to Syslog, so that every print()ed message will be logged
13    tie *STDOUT, 'Tie::Syslog', {
14        facility => 'LOG_LOCAL0',
15        priority => 'LOG_INFO',
16    };
17
18    # Now tie STDERR also, getting parameters from the tied STDOUT
19    tie *STDERR, { tied *STDOUT };
20
21    # ...or...
22
23    # tie STDERR with defaults from tied STDOUT, but override priority:
24    tie *STDERR, { tied *STDOUT }, {
25        priority => 'LOG_ERR',
26    };
27
28    ######
29    # Compatibility with old configuration style:
30
31    tie *STDOUT, 'Tie::Syslog',
32        'local0.debug',         # facility.loglevel
33        'myname',               # identity
34        'pid,ndelay',           # Other Sys::Syslog options, comma-separated
35        'unix';                 # setlogsock socket type: unix or inet
36
37    tie *STDERR, 'Tie::Syslog',
38        'local0.warning',       # facility.loglevel
39        'myname',               # USE THE SAME AS ABOVE!
40        'pid,ndelay',           # USE THE SAME AS ABOVE!
41        'unix';                 # USE THE SAME AS ABOVE!
42
43    # Tying by copying from another tied handle is not supported in
44    # old-compatibility-mode
45
46    # old-compatibility-mode defaults to 'local0.error'
47
48    # socket type is IGNORED
49
50
51
52DESCRIPTION
53===========
54
55From the original README:
56    This module allows you to tie a filehandle (output only) to
57    syslog. This becomes useful in general when you want to
58    capture any activity that happens on STDERR and see that it
59    is syslogged for later perusal. You can also create an arbitrary
60    filehandle, say LOG, and send stuff to syslog by printing to
61    this filehandle. This module depends on the Sys::Syslog module
62    to actually get info to syslog.
63
64    When used with STDERR, combined with the good habit of using
65    the perl -w switch, this module happens to be useful in
66    catching unexpected errors in any of your code, or team's
67    code. Tie::Syslog is pretty brain-dead. However, it can
68    become quite flexible if you investigate your options with
69    the actual syslog daemon. Syslog has a variety of options
70    available, including notifying console, logging to other
71    machines running syslog, or email support in the event of
72    Bad Things. Consult your syslog documentation to get
73    /etc/syslog.conf setup by your sysadmin and use Tie::Syslog
74    to get information into those channels.
75
76Tie::Syslog v2.00 is a complete rewrite of the original Tie::Syslog v1.x,
77trying to preserve as much as possible the old syntax and the original
78philosophy. All the dirty work has been moved to Sys::Syslog.
79
80
81
82INSTALLATION
83============
84
85To install this module, run the following commands:
86
87	perl Makefile.PL
88	make
89	make test
90	make install
91
92
93SUPPORT AND DOCUMENTATION
94=========================
95
96After installing, you can find documentation for this module with the
97perldoc command.
98
99    perldoc Tie::Syslog
100
101You can also look for information at:
102
103    RT, CPAN's request tracker (report bugs here)
104        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Tie-Syslog
105
106    AnnoCPAN, Annotated CPAN documentation
107        http://annocpan.org/dist/Tie-Syslog
108
109    CPAN Ratings
110        http://cpanratings.perl.org/d/Tie-Syslog
111
112    Search CPAN
113        http://search.cpan.org/dist/Tie-Syslog/
114
115
116
117LICENSE AND COPYRIGHT
118=====================
119
120Copyright (c) 1999-2002 Broc Seib. All rights reserved.
121
122Copyright (C) 2012 Giacomo Montagner <kromg@entirelyunlike.net>
123
124This program is free software; you can redistribute it and/or
125modify it under the same terms as Perl itself.
126
127See http://dev.perl.org/licenses/ for more information.
128
129
130BUGS AND FEATURES
131=================
132
133Please report any bugs or feature requests to <bug-tie-syslog at rt.cpan.org>, or through
134the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Tie-Syslog.
135