The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CTK::Plugin::Log - Logger plugin

VERSION

Version 1.00

SYNOPSIS

    use CTK;
    use CTK::Log qw/:constants/;

    my $ctk = new CTK(
            plugins     => "log",
            ident       => "myapp",
            logfile     => "test.log",
            logger_init => 1,
        );
    print $ctk->log_debug("Logger say: %s", "foo");

DESCRIPTION

Logger plugin

ident

Specifies ident string for each log-record

See "ident" in CTK::Log

logfile

Specifies log file

See "file" in CTK::Log

logdir

Really not used

logger_init

Flag enabling the logger autoloading

If flag is enabled, then the data from the configuration will be used for logger initialization

METHODS

logger
    die $ctk->logger->error unless $ctk->logger->status;

Returns logger-object

logger_init
    $ctk->logger_init( ... );

Init logger. See "new" in CTK::Log

log_debug
    $ctk->log_debug( "format %s", "value", ... );

Sends debug message in sprintf fromat to log. See CTK::Log

log_info
    $ctk->log_info( "format %s", "value", ... );

Sends informational message in sprintf fromat to log. See CTK::Log

log_notice
    $ctk->log_notice( "format %s", "value", ... );

Sends notice message in sprintf fromat to log. See CTK::Log

log_warning, log_warn
    $ctk->log_warning( "format %s", "value", ... );

Sends warning message in sprintf fromat to log. See CTK::Log

log_error
    $ctk->log_error( "format %s", "value", ... );

Sends error message in sprintf fromat to log. See CTK::Log

log_crit
    $ctk->log_crit( "format %s", "value", ... );

Sends critical message in sprintf fromat to log. See CTK::Log

log_alert
    $ctk->log_alert( "format %s", "value", ... );

Sends alert message in sprintf fromat to log. See CTK::Log

log_emerg
    $ctk->log_emerg( "format %s", "value", ... );

Sends emergency message in sprintf fromat to log. See CTK::Log

log_fatal
    $ctk->log_fatal( "format %s", "value", ... );

Sends fatal message in sprintf fromat to log. See CTK::Log

log_except, log_exception
    $ctk->log_except( "format %s", "value", ... );

Sends exception message in sprintf fromat to log. See CTK::Log

init

Initializer method. Internal use only

HISTORY

See Changes file

DEPENDENCIES

CTK, CTK::Plugin, CTK::Log

TO DO

See TODO file

BUGS

* none noted

SEE ALSO

CTK, CTK::Plugin, CTK::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/