Log::Syslog::Fast::Simple - Wrapper around Log::Syslog::Fast that adds some flexibility at the expense of additional runtime overhead.
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);
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.
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.
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.
Same as Log::Syslog::Fast.
Adam Thomason, <firstname.lastname@example.org>
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.