NAME

LWP::ConsoleLogger::Easy - Start logging your LWP useragent the easy way.

VERSION

version 0.000002

SYNOPSIS

    use LWP::ConsoleLogger::Easy qw( debug_ua );
    use WWW::Mechanize;

    my $mech = WWW::Mechanize->new;
    my $logger = debug_ua( $mech );
    $mech->get(...);

    # now watch the console for debugging output

DESCRIPTION

This module gives you the easiest possible (and the most verbose) introduction to LWP::ConsoleLogger. It turns on all logging by default. I'd suggest going with the defaults to start with and then turning down the verbosity after that.

FUNCTIONS

debug_ua

This module exports one function: debug_ua(). It's essentially an easy wrapper around LWP::ConsoleLogger, allowing you to get up and running quickly with just a couple of lines of code. This method instantiates LWP logging and also returns an LWP::ConsoleLogger object, which you may then tweak to your heart's desire.

    my $ua_logger = debug_ua( $mech );
    $ua_logger->content_pre_filter( sub {...} );
    $ua_logger->logger( Log::Dispatch->new(...) );

    $mech->get(...);

AUTHOR

Olaf Alders <olaf@wundercounter.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Olaf Alders.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.