Gligan Calin Horea > Log-Log4perl-Appender-File-FixedSize > Log::Log4perl::Appender::File::FixedSize

Download:
Log-Log4perl/Log-Log4perl-Appender-File-FixedSize-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Log::Log4perl::Appender::File::FixedSize - Log::Log4perl appender which creates files limited in size

VERSION ^

Version 0.01

SYNOPSIS ^

This module allows you to create log files with a limited size. Once the file reaches the size limit it starts to overwrite the old content with the new one in the same order it was added.

Example:

    use Log::Log4perl::Appender::File::FixedSize;

    my $file = Log::Log4perl::Appender::File::FixedSize->new(
                        filename => '/tmp/log.txt',
                        size     => '10Mb',
    );
    ...
    
    $file->log(message => 'Hello world');

Log::Log4perl config ^

Here is an example how you can use this module with Log::Log4perl

        log4perl.rootLogger=DEBUG, test
    
        log4perl.appender.test=Log::Log4perl::Appender::File::FixedSize
        log4perl.appender.test.filename=test.log
        log4perl.appender.test.mode=append
        log4perl.appender.test.size=1M
    
        log4perl.appender.test.layout=PatternLayout
        log4perl.appender.test.layout.ConversionPattern=[%r] %F %L %c - %m%n

Basically it's the same config as for Log::Log4perl::Appender::File with an extra paramater : size

SUBROUTINES/METHODS ^

new

log

AUTHOR ^

Gligan Calin Horea, <gliganh at gmail.com>

BUGS ^

Please report any bugs or feature requests to bug-log-log4perl-appender-file-fixedsize at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Log-Log4perl-Appender-File-FixedSize. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Log::Log4perl::Appender::File::FixedSize

You can also look for information at:

ACKNOWLEDGEMENTS ^

LICENSE AND COPYRIGHT ^

Copyright 2012 Gligan Calin Horea.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

syntax highlighting: