GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LOG::DISPATCH::SYSLOG (3)

.ds Aq ’

NAME

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

CONTENTS

VERSION

version 2.54

SYNOPSIS



  use Log::Dispatch;

  my $log = Log::Dispatch->new(
      outputs => [
          [
              Syslog,
              min_level => info,
              ident     => Yadda yadda
          ]
      ]
  );

  $log->emerg("Time to die.");



DESCRIPTION

This module provides a simple object for sending messages to the system log (via UNIX syslog calls).

Note that logging may fail if you try to pass UTF-8 characters in the log message. If logging fails and warnings are enabled, the error message will be output using Perl’s warn.

CONSTRUCTOR

The constructor takes the following parameters in addition to the standard parameters documented in Log::Dispatch::Output:
o ident ($)

This string will be prepended to all messages in the system log. Defaults to $0.

o logopt ($)

A string containing the log options (separated by any separator you like). See the openlog(3) and Sys::Syslog docs for more details. Defaults to ’’.

o facility ($)

Specifies what type of program is doing the logging to the system log. Valid options are ’auth’, ’authpriv’, ’cron’, ’daemon’, ’kern’, ’local0’ through ’local7’, ’mail, ’news’, ’syslog’, ’user’, ’uucp’. Defaults to ’user’

o socket ($, \@, or \%)

Tells what type of socket to use for sending syslog messages. Valid options are listed in Sys::Syslog.

If you don’t provide this, then we let Sys::Syslog simply pick one that works, which is the preferred option, as it makes your code more portable.

If you pass an array reference, it is dereferenced and passed to Sys::Syslog::setlogsock().

If you pass a hash reference, it is passed to Sys::Syslog::setlogsock() as is.

o lock ($)

If this is set to a true value, then the calls to setlogsock(), openlog(), syslog(), and closelog() will all be guarded by a thread-locked variable.

This is only relevant when running you are using Perl threads in your application. Setting this to a true value will cause the threads and threads::shared modules to be loaded.

This defaults to false.

AUTHOR

Dave Rolsky <autarch@urth.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2016 by Dave Rolsky.

This is free software, licensed under:



  The Artistic License 2.0 (GPL Compatible)



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 LOG::DISPATCH::SYSLOG (3) 2016-01-18

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.