NAME

LinkLocal::IPv4::Interface::Logger - A Moose-wrapped syslog interface.

SYNOPSIS

my $logger = LinkLocal::IPv4::Interface::Logger->new();

$logger->open_log( indent => 'IPv4' );
$logger->error("This is an error test");
$logger->emerg("This is an emerg test");
$logger->close_log();

$logger->open_log( indent => 'IPv4--Test', facility => 'local3' );
$logger->debug("This is a debug test");
$logger->notice("This is a notice test");
$logger->close_log();

DESCRIPTION

This package provides for a Moose'ish encapsulation of basic syslog functionality. It is in most ways a simple delegation or mapping to those calls and macros present via Sys::Syslog, but does so in an OOPish and Moose'ish way.

ATTRIBUTES

Public Attributes

N/A

Private Attributes

_logger

The wrapped logger object instance.

METHODS

Constructors

new

The default constructor takes no arguments and returns an instance of the Logger object.

Public Methods

open_log

Opens up the syslog instance for writing. Can take optional indent, options and facility arguments although sane defaults are provided by MooseX::Params::Validate.

emerg
alert
critical
error
warning
notice
info
debug

Each of the above public methods take a message argument and logs it at the appropriate level.

close_log

Close the syslog instance for writing.

Private Methods

_set_log_mask

This private method is used to set a default log level mask. Called by the logger's builder method modifier.

_build_logger

Builds a logger object instance from the Sys::Syslog interface and wraps it as a Moose class type.

SEE ALSO

Refer to RFC-3927, Dynamic Configuration of IPv4 Link-Local Adresses, the complete text of which can be found in the top level of the package archive.

perl, Moose, MooseX::Params::Validate, Sys::Syslog, Try::Tiny

This project is also hosted on github at: git@github.com:raymroz/LinkLocal--IPv4.git

BUGS

What's a bug???

AUTHOR

Tony Li Xu, <tonylixu@gmail.com>, Ray Mroz, <mroz@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2010 Ray Mroz

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

10 POD Errors

The following errors were encountered while parsing the POD:

Around line 233:

You forgot a '=back' before '=head3'

Around line 235:

'=item' outside of any '=over'

Around line 237:

You forgot a '=back' before '=head3'

Around line 239:

'=item' outside of any '=over'

Around line 247:

Unknown directive: =over4

Around line 251:

'=item' outside of any '=over'

Around line 256:

You forgot a '=back' before '=head3'

Around line 258:

'=item' outside of any '=over'

Around line 286:

You forgot a '=back' before '=head3'

Around line 288:

'=item' outside of any '=over'