Locale::TextDomain::OO::Role::Logger - Provides a logger method
$Id: Logger.pm 461 2014-01-09 07:57:37Z steffenw $
1.006
This module provides a logger method for for Locale::TextDomain:OO.
with qw( Locale::TextDomain::OO::Role::Logger );
Store logger code to get some information what lexicon is used or why the translation process is using a fallback.
$lexicon_hash->logger( sub { my ($message, $arg_ref) = @_; my $type = $arg_ref->{type}; Log::Log4perl->get_logger(...)->$type($message); return; }, );
$arg_ref contains
object => $self, # the object itself type => 'debug', # the log category event => 'lexicon,load', # event category
Get back
$code_ref_or_undef = $self->logger;
Inside of this distribution is a directory named example. Run this *.pl files.
nothing
none
not known
none
Steffen Winkler
Copyright (c) 2013 - 2014,
Steffen Winkler
<steffenw at cpan.org>
.
All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.