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
App::Regather::Logg(3) User Contributed Perl Documentation App::Regather::Logg(3)

App::Regather::Logg - logging class

    use App::Regather::Logg;
    my $log = new App::Regather::Logg( prognam    => 'MyAppName',
                                  foreground => $foreground_or_syslog,
                                  colors     => $wheather_to_use_term_colors );
    $log->cc( pr => 'info', fm => "App::Regather::Logg initialized ... (write to syslog)" );
    $log->cc( fg => 1, fm => "App::Regather::Logg initialized ... (write to STDOUT)" );
    ...
    my $mesg = $ldap->search( filter => "(objectClass=unsearchebleThing)");
    $log->logg_ldap_err( mesg => $mesg );

This is a class to log messages.

new
Creates a new App::Regather::Logg object
prognam => 'MyAppName'
program name
foreground => 1 | 0
STDOUT or syslog, default is: 0
colors => 1 | 0
wheather to use terminal colors, default is: 0

if set, then priorities are colored this way:

info => 'ansi113'

err => 'bold ansi255 on_ansi196' debug => 'ansi195'

warning => 'bold ansi237 on_ansi214'

for reference look at Term::ANSIColor

ts_fmt => 'strftime(3) format string'
timestamp format string, default is: "%a %F %T %Z (%z)"

conclude
main method to do the job
fg => 1 | 0
foreground: stdin or syslog
pr => 'level[|facility]'
priority
fm => "... %s ... : %m"
sprintf format string, with the addition that %m is replaced with "$!"
ls => [ $a, $b, ... ]
list of values to be passed to sprintf as arguments
nt => 1 | 0
wheather to send (notify) you this message with notify method
cc
alias for conclude method
conclude_ldap_err
method - wrapper around Net::LDAP::Message->error methods
mesg => Net::LDAP::Message object
cc_ldap_err
alias for conclude_ldap_err method
notify
method to be used to send log message via email
set_m
setter to set options from config file

on input it expects App::Regather::Config object section for App::Regather::Logg

set
setter to set one single pair key => value
key => value
get
getter

Sys::Syslog, Data::Printer, Term::ANSIColor

Zeus Panchenko <zeus@gnu.org.ua>

Copyright 2019 Zeus Panchenko.

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, 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/>.

2020-09-11 perl v5.32.1

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

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