NAME

MPMinus::Log - MPMinus logger

VERSION

Version 1.00

SYNOPSIS

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 ... ");

DESCRIPTION

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.

new

my $logger = new MPMinus::Log( "ident string" );

First parameter is string prefix (signature, ident) that prepended to every message.

METHODS

log, syslog, logsys
$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

$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

@message

What to log. Strings list array

The method returns work status

log_debug, debug
$logger->log_debug( " ... blah-blah-blah ... " );
$m->log_debug( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'debug', " ... blah-blah-blah ... " )

log_info, info
$logger->log_info( " ... blah-blah-blah ... " );
$m->log_info( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'info', " ... blah-blah-blah ... " )

log_notice, notice
$logger->log_notice( " ... blah-blah-blah ... " );
$m->log_notice( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'notice', " ... blah-blah-blah ... " )

log_warning, log_warn, warn
$logger->log_warning( " ... blah-blah-blah ... " );
$m->log_warning( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'warning', " ... blah-blah-blah ... " )

log_error, log_err, error
$logger->log_error( " ... blah-blah-blah ... " );
$m->log_error( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'error', " ... blah-blah-blah ... " )

log_crit, crit
$logger->log_crit( " ... blah-blah-blah ... " );
$m->log_crit( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'crit', " ... blah-blah-blah ... " )

log_alert, alert
$logger->log_alert( " ... blah-blah-blah ... " );
$m->log_alert( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'alert', " ... blah-blah-blah ... " )

log_emerg, emerg
$logger->log_emerg( " ... blah-blah-blah ... " );
$m->log_emerg( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'emerg', " ... blah-blah-blah ... " )

log_fatal, fatal
$logger->log_fatal( " ... blah-blah-blah ... " );
$m->log_fatal( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'fatal', " ... blah-blah-blah ... " )

log_except, log_exception, except, exception
$logger->log_except( " ... blah-blah-blah ... " );
$m->log_except( " ... blah-blah-blah ... " );

Alias for call: $m->log( 'except', " ... blah-blah-blah ... " )

HISTORY

See CHANGES file

DEPENDENCIES

mod_perl2, Apache2::Log

TO DO

See TODO file

BUGS

* none noted

SEE ALSO

mod_perl2, Apache2::Log

AUTHOR

Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved

LICENSE

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/