GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LOG::DISPATCH::ARRAYWITHLIMITS (3)

.ds Aq ’

NAME

Log::Dispatch::ArrayWithLimits - Log to array, with some limits applied

CONTENTS

VERSION

This document describes version 0.04 of Log::Dispatch::ArrayWithLimits (from Perl distribution Log-Dispatch-ArrayWithLimits), released on 2015-01-03.

SYNOPSIS



 use 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");



DESCRIPTION

This module functions similarly to Log::Dispatch::Array, with a few differences:
o only the messages (strings) are stored
o allow specifying array variable name (e.g. My::array instead of \@My:array)

This makes it possible to use in Log::Log4perl configuration, which is a text file.

o can apply some limits

Currently only max_elems (the maximum number of elements in the array) is available. Future limits will be added.

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.

METHODS

    new(%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>).

SEE ALSO

Log::Dispatch

Log::Dispatch::Array

HOMEPAGE

Please visit the project’s homepage at <https://metacpan.org/release/Log-Dispatch-ArrayWithLimits>.

SOURCE

Source repository is at <https://github.com/sharyanto/perl-Log-Dispatch-ArrayWithLimits>.

BUGS

Please 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.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 LOG::DISPATCH::ARRAYWITHLIMITS (3) 2015-01-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.