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::SYSLOG::FAST::SIMPLE (3)

.ds Aq ’

NAME

Log::Syslog::Fast::Simple - Wrapper around Log::Syslog::Fast that adds some flexibility at the expense of additional runtime overhead.

CONTENTS

SYNOPSIS



  use Log::Syslog::Fast::Simple;

  # Simple usage:
  $logger = Log::Syslog::Fast::Simple->new;
  $logger->send("log message");

  # More customized usage:
  $logger = Log::Syslog::Fast::Simple->new(
      loghost  => myloghost,
      port     => 6666,
      facility => LOG_LOCAL2,
      severity => LOG_INFO,
      sender   => mymachine,
      name     => myapp,
  );
  $logger->send("log message", time, LOG_LOCAL3, LOG_DEBUG);



DESCRIPTION

This module wraps Log::Syslog::Fast to provide a constructor with reasonable defaults and a send() method that optionally accepts override parameters for facility and severity.

METHODS

Log::Syslog::Fast::Simple->new(%params); Create a new Log::Syslog::Fast::Simple object with given parameters (may be a hash or hashref). Takes the following named parameters which have the same meaning as in Log::Syslog::Fast.
proto Defaults to LOG_UDP
loghost Defaults to 127.0.0.1
port Defaults to 514
facility Defaults to LOG_LOCAL0
severity Defaults to LOG_INFO
sender Defaults to Sys::Hostname::hostname
name Defaults to a cleaned $0
$logger->send($logmsg, [$time], [$severity], [$facility]) Send a syslog message through the configured logger. If $time is not provided, the current time is used. If $severity or $facility are not provided, the default provided at construction time is used.

EXPORT

Same as Log::Syslog::Fast.

SEE ALSO

Log::Syslog::Fast

AUTHOR

Adam Thomason, <athomason@sixapart.com>

COPYRIGHT AND LICENSE

Copyright (C) 2009-2011 by Say Media, Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.

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


perl v5.20.3 LOG::SYSLOG::FAST::SIMPLE (3) 2015-05-07

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