Name : perl-MooX-Log-Any
| |
Version : 0.004004
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.1.1
| Date : 2023-01-27 18:31:10
|
Group : Development/Libraries/Perl
| Source RPM : perl-MooX-Log-Any-0.004004-lp154.1.1.src.rpm
|
Size : 0.03 MB
| |
Packager : https://www_suse_com/
| |
Summary : Role to add Log::Any
|
Description :
A logging role building a very lightweight wrapper to Log::Any for use with your Moo or Moose classes. Connecting a Log::Any::Adapter should be performed prior to logging the first log message, otherwise nothing will happen, just like with Log::Any
Using the logger within a class is as simple as consuming a role:
package MyClass; use Moo; with \'MooX::Log::Any\';
sub dummy { my $self = shift; $self->log->info(\"Dummy log entry\"); }
The logger needs to be setup before using the logger, which could happen in the main application:
package main; use Log::Any::Adapter; Log::Any::Adapter->set(\'Log4perl\')
use MyClass; my $myclass = MyClass->new(); $myclass->log->info(\"In my class\"); # Access the log of the object $myclass->dummy; # Will log \"Dummy log entry\"
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-M/15.4/noarch |