ManaTools::Shared::Logging

Section: User Contributed Perl Documentation (3)
Updated: 2017-07-06
Page Index
 

NAME

ManaTools::Shared::Logging - Class to manage logging  

SYNOPSIS

use ManaTools::Shared::Logging;

my $obj = ManaTools::Shared::Logging->new(loc => $loc);

$obj->D(``debug test string %d'', 1) . ``\n''; $obj->I(``info test string %d'', 2) . ``\n''; $obj->W(``warning test string %d'', 3) . ``\n''; $obj->E(``error test string %d'', 4) . ``\n'';  

DESCRIPTION

This class wraps Sys::Syslog to manage logging  

SUPPORT

You can find documentation for this module with the perldoc command:

perldoc ManaTools::Shared::Logging  

SEE ALSO

Sys::Syslog  

AUTHOR

Maarten Vanraes <alien@rmail.be>  

COPYRIGHT and LICENSE

Copyright (C) 2015-2016, Maarten Vanraes.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.

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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA  

FUNCTIONS

 

new

INPUT

    hash ref containing
        loc:         optional ManaTools::Shared::Locales to translate before logging

DESCRIPTION

    new is inherited from Moose, to create a Logging object

 

new

INPUT

    hash ref containing
        ident:         optional string used as identifier into syslog

DESCRIPTION

    new is inherited from Moose, to create a Logging object

 

BUILD

INPUT

    $self: this object

DESCRIPTION

    The BUILD method is called after a Moose object is created,
    Into this method additional data are initialized.
    This method just calls openlog if "ident" is set.

 

DEMOLISH

INPUT

    $val: boolean value indicating whether or not this method
        was called as part of the global destruction process
        (when the Perl interpreter exits)

DESCRIPTION

    Moose provides a hook for object destruction with the
    DEMOLISH method as it does for construtor with BUILD

 

R

INPUT

    $self: this object
    $syslog: syslog class and priority
    $s: text

DESCRIPTION

    outputs a string to syslog with given class and priority

 

P

INPUT

    $self: this object
    $syslog: syslog class and priority
    $s_singular: msg id singular
    $s_plural: msg id plural
    $nb: value for plural

DESCRIPTION

    outputs the given string localized (see dngettext) to syslog
    with the given class and priority

 

S

INPUT

    $self: this object
    $syslog: syslog class and priority
    $s: text

DESCRIPTION

    outputs a localized string to syslog with given class and priority

 

I

INPUT

    $self: this object
    $s: text

DESCRIPTION

    outputs a localized string to syslog as info|local1

 

W

INPUT

    $self: this object
    $s: text

DESCRIPTION

    outputs a localized string to syslog as warning

 

E

INPUT

    $self: this object
    $s: text

DESCRIPTION

    outputs a localized string to syslog as err

 

D

INPUT

    $self: this object
    $s: text

DESCRIPTION

    outputs a localized string to syslog as debug

 

setmask

INPUT

    $self: this object
    $mask: new log mask

DESCRIPTION

    Sets the log mask for the current process to $mask and returns the old mask.
    See Sys::Syslog::setlogmask for details.


 

Index

NAME
SYNOPSIS
DESCRIPTION
SUPPORT
SEE ALSO
AUTHOR
COPYRIGHT and LICENSE
FUNCTIONS
new
new
BUILD
DEMOLISH
R
P
S
I
W
E
D
setmask