DUPUIS Arnaud > slackget10-0.10 > slackget::Log::logRotate

Download:
slackget10-0.10.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.12   Source  

NAME ^

slackget::Log::logRotate - Perl extension for slack-get's log system

DESCRIPTION ^

This module is use by slack-get for the log system

EXPORT ^

None, it's an Object Oriented module.

This module is really easy to use, it provide an OO interface to contain and process logs data.

There is only 2 methods : new and logRotate.

        my $lo_lr = slackget::Log::logRotate->new(
                SIZE_UNIT => 'mb',
                CRITICAL_SIZE => 5,
                AUTO_REMOVE => 1,
                LR_SEND_BY_FTP => 1,
                LR_SEND_BY_MAIL => 1,
                LR_MAIL_OPTIONS => {
                        mailto => $ENV{USER},
                        smtp => '127.0.0.1',
                        mail_subject => "[slackget::Log] Log rotation",
                        mail_from => "slackget-Log\@$ENV{HOSTNAME}"
                        },
                LR_FTP_OPTIONS => {
                        login => 'anonymous',
                        password => "$ENV{USER}\@$ENV{HOSTNAME}",
                        server => '127.0.0.1',
                        passive_mode => 0,
                        upload_dir => './'
                        };
                LR_COPY_TO => '/home/backup/logs/slackget/',
                LOG_FILE => $CONF{'log-file'}
        );

        $lo_lr->logRotate;

This object is automaticaly instancied by slackget::Log if the use-log-rotation directive is enable.

Options LR_SEND_BY_*, AUTO_REMOVE and LR_COPY_TO can take undef or 1 as values. (undef -> option is disable). You might choose one or more rotation way.

If you choose to modify LR_MAIL_OPTIONS or LR_FTP_OPTIONS you might set all parameters !

SEE ALSO ^

slack-get(8), slack-get.conf(5), slack-plugins.conf(5)

http://slackget.infinityperl.org/

AUTHOR ^

Arnaud DUPUIS, <a.dupuis@infinityperl.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2004 by Arnaud DUPUIS

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.