LWP::ConsoleLogger::Easy - Start logging your LWP useragent the easy way.
version 0.000003
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
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.
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(...);
Olaf Alders <olaf@wundercounter.com>
This software is Copyright (c) 2014 by MaxMind, Inc..
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install LWP::ConsoleLogger, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LWP::ConsoleLogger
CPAN shell
perl -MCPAN -e shell install LWP::ConsoleLogger
For more information on module installation, please visit the detailed CPAN module installation guide.