|
NAMELog::Dispatch::ArrayWithLimits - Log to array, with some limits appliedVERSIONThis document describes version 0.050 of Log::Dispatch::ArrayWithLimits (from Perl distribution Log-Dispatch-ArrayWithLimits), released on 2019-01-09.SYNOPSISuse Log::Dispatch::ArrayWithLimits; my $file = Log::Dispatch::ArrayWithLimits( min_level => 'info', array => $ary, # default: [], you can always refer by name e.g. 'My::array' to refer to @My::array max_elems => 100, # defaults unlimited ); $file->log(level => 'info', message => "Your comment\n"); DESCRIPTIONThis module functions similarly to Log::Dispatch::Array, with a few differences:
Logging to an in-process array can be useful when debugging/testing, or when you want to let users of your program connect to your program to request viewing the ogs being produced. METHODSnew(%args)Constructor. This method takes a hash of parameters. The following options are valid: "min_level" and "max_level" (see Log::Dispatch documentation); "array" (a reference to an array, or if value is string, will be taken as name of array variable; this is so this module can be used/configured e.g. by Log::Log4perl because configuration is specified via a text file), "max_elems".log_message(message => STR)Send a message to the appropriate output. Generally this shouldn't be called directly but should be called through the "log()" method (in LLog::Dispatch::Output>).HOMEPAGEPlease visit the project's homepage at <https://metacpan.org/release/Log-Dispatch-ArrayWithLimits>.SOURCESource repository is at <https://github.com/perlancar/perl-Log-Dispatch-ArrayWithLimits>.BUGSPlease report any bugs or feature requests on the bugtracker website <https://rt.cpan.org/Public/Dist/Display.html?Name=Log-Dispatch-ArrayWithLimits>When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. SEE ALSOLog::DispatchLog::Dispatch::Array AUTHORperlancar <perlancar@cpan.org>COPYRIGHT AND LICENSEThis software is copyright (c) 2019, 2014 by perlancar@cpan.org.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |