MPMinus::Log - MPMinus logger
Version 1.00
use MPMinus::Log; my $logger = new MPMinus::Log( "ident string" ); $logger->log_info(" ... blah-blah-blah ... "); $logger->log(Apache2::Const::LOG_INFO, " ... blah-blah-blah ... "); $m->log_info(" ... blah-blah-blah ... "); $m->log(Apache2::Const::LOG_INFO, " ... blah-blah-blah ... ");
This module provides log methods for MPMinus logging.
Also You can call log-methods using the MPMinus context (MPMinus object), e.g.:
$m->log_info(" ... blah-blah-blah ... ");
In this case, you must remember that the ident value is undefined.
my $logger = new MPMinus::Log( "ident string" );
First parameter is string prefix (signature, ident) that prepended to every message.
$logger->log( $level, @message ); $m->log( $level, @message );
The method just logs the supplied message corresponding to the LogLevel levels.
Messages will be logged to the virtualhost logfile (ErrorLog of your Apache virtualhost)
$level can take the following values:
debug (default), info, notice (note), warning (warn), error (err), crit, alert, emerg (emergency), fatal, except (exception)
Also $level can take the following Apache2 constants:
Apache2::Const::LOG_DEBUG, Apache2::Const::LOG_INFO, Apache2::Const::LOG_NOTICE, Apache2::Const::LOG_WARNING, Apache2::Const::LOG_ERR, Apache2::Const::LOG_CRIT, Apache2::Const::LOG_ALERT, Apache2::Const::LOG_EMERG
See also Apache2::Log
What to log. Strings list array
The method returns work status
$logger->log_debug( " ... blah-blah-blah ... " ); $m->log_debug( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'debug', " ... blah-blah-blah ... " )
$logger->log_info( " ... blah-blah-blah ... " ); $m->log_info( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'info', " ... blah-blah-blah ... " )
$logger->log_notice( " ... blah-blah-blah ... " ); $m->log_notice( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'notice', " ... blah-blah-blah ... " )
$logger->log_warning( " ... blah-blah-blah ... " ); $m->log_warning( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'warning', " ... blah-blah-blah ... " )
$logger->log_error( " ... blah-blah-blah ... " ); $m->log_error( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'error', " ... blah-blah-blah ... " )
$logger->log_crit( " ... blah-blah-blah ... " ); $m->log_crit( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'crit', " ... blah-blah-blah ... " )
$logger->log_alert( " ... blah-blah-blah ... " ); $m->log_alert( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'alert', " ... blah-blah-blah ... " )
$logger->log_emerg( " ... blah-blah-blah ... " ); $m->log_emerg( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'emerg', " ... blah-blah-blah ... " )
$logger->log_fatal( " ... blah-blah-blah ... " ); $m->log_fatal( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'fatal', " ... blah-blah-blah ... " )
$logger->log_except( " ... blah-blah-blah ... " ); $m->log_except( " ... blah-blah-blah ... " );
Alias for call: $m->log( 'except', " ... blah-blah-blah ... " )
See CHANGES file
CHANGES
mod_perl2, Apache2::Log
mod_perl2
See TODO file
TODO
* none noted
Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE file and https://dev.perl.org/licenses/
LICENSE
To install MPMinus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MPMinus
CPAN shell
perl -MCPAN -e shell install MPMinus
For more information on module installation, please visit the detailed CPAN module installation guide.