Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Log::Any 0.14

    Download button

    No screenshots available
    Downloads: 116  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jonathan Swartz | More programs
    Perl Artistic License / FREE
    November 2nd, 2011, 19:23 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Log::Any description

    Bringing loggers and listeners together

    Log::Any is a Perl module that allows CPAN modules to safely and efficiently log messages, while letting the application choose (or decline to choose) a logging mechanism such as Log::Dispatch or Log::Log4perl.

    Log::Any has a very tiny footprint and no dependencies beyond Perl 5.6, which makes it appropriate for even small CPAN modules to use. It defaults to 'null' logging activity, so a module can safely log without worrying about whether the application has chosen (or will ever choose) a logging mechanism.

    The application, in turn, may choose one or more logging mechanisms via Log::Any::Adapter.

    SYNOPSIS

    In a CPAN or other module:

     package Foo;
     use Log::Any qw($log);

     $log->error("an error occurred");
     $log->debugf("arguments are: %s", \@_)
     if $log->is_debug();

     my $log2 = Log::Any->get_logger(category => 'My::Class');


    In your application:

     use Log::Any::Adapter;
     
     # Send all logs to Log::Log4perl
     Log::Any::Adapter->set('Log4perl');

     # Send all logs to Log::Dispatch
     my $log = Log::Dispatch->new(outputs => [[ ... ]]);
     Log::Any::Adapter->set( 'Dispatch', dispatcher => $log );

     # See Log::Any::Adapter documentation for more options



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    log messages | Perl module | loggers | listeners | log

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM