Log::Any::Plugin - Adapter-modifying plugins for Log::Any
version 0.001
use Log::Any::Adapter; use Log::Any::Plugin; # Create your adapter as normal Log::Any::Adapter->set( 'SomeAdapter' ); # Add plugin to modify its behaviour Log::Any::Plugin->add( 'Stringify' ); # Multiple plugins may be used together Log::Any::Plugin->add( 'Levels', level => 'debug' );
Log::Any::Plugin is a method for augmenting arbitrary instances of Log::Any::Adapters.
Log::Any::Plugins work much in the same manner as Moose 'around' modifiers to augment logging behaviour of pre-existing adapters.
Many of the Log::Any::Adapters have extended functionality, such as being able to selectively disable various log levels, or to handle multiple arguments.
In order for Log::Any to be truly 'any', only the common subset of adapter functionality can be used. Any specific adapter functionality must be avoided if there is a possibility of using a different adapter at a later date.
Log::Any::Plugins provide a method to augment adapters with missing functionality so that a superset of adapter functionality can be used.
This is the single method for adding plugins to adapters. It works in a similar function to Log::Any::Adapter->set()
$plugin
The plugin class to add to the currently active adapter. If the class is in the Log::Any::Plugin:: namespace, you can simply specify the name, otherwise prefix a '+'.
eg. '+My::Plugin::Class'
%plugin_args
These are plugin specific arguments. See the individual plugin documentation for what options are supported.
Log::Any, Log::Any::Plugin::Levels, Log::Any::Plugin::Stringify
Thanks to Strategic Data for sponsoring the development of this module.
Stephen Thirlwall <sdt@cpan.org>
This software is copyright (c) 2011 by Stephen Thirlwall.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Log::Any::Plugin, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Any::Plugin
CPAN shell
perl -MCPAN -e shell install Log::Any::Plugin
For more information on module installation, please visit the detailed CPAN module installation guide.