Koha-Contrib-Tamil
view release on metacpan or search on metacpan
lib/Koha/Contrib/Tamil/Logger.pm view on Meta::CPAN
package Koha::Contrib::Tamil::Logger;
# ABSTRACT: Base class pour logger
$Koha::Contrib::Tamil::Logger::VERSION = '0.074';
use Moose;
use Modern::Perl;
use FindBin qw( $Bin );
use Log::Dispatch;
use Log::Dispatch::Screen;
use Log::Dispatch::File;
has log_filename => (
is => 'rw',
isa => 'Str',
default => "./koha-contrib-tamil.log",
);
has log => (
is => 'rw',
isa => 'Log::Dispatch',
lazy => 1,
default => sub {
my $self = shift;
my $log = Log::Dispatch->new();
$log->add( Log::Dispatch::Screen->new(
name => 'screen',
min_level => 'notice',
) );
$log->add( Log::Dispatch::File->new(
name => 'file1',
min_level => 'debug',
filename => $self->log_filename,
) );
return $log;
}
);
no Moose;
__PACKAGE__->meta->make_immutable;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Koha::Contrib::Tamil::Logger - Base class pour logger
=head1 VERSION
version 0.074
=head1 SYNOPSYS
package MonModule
use Moose;
extends qw/ Koha::Contrib::Tamil::Logger /;
( run in 0.529 second using v1.01-cache-2.11-cpan-2e0ccfb7a10 )