got it dude!  thanks;

my code is

foreach ( $file1, $file2, $file3, $file4 ) {

       my $logs = new Logfile::Rotate (File => $_,

                                         Count => 10,
                                         Gzip => '/usr/bin/gzip',
                                         Dir  => '/usr/local/log/old',
                                         Flock => 'yes',
                                         Persist => 'yes' );
         $logs->rotate();

}

Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams




                                                                           
             Rathna N                                                      
             <[EMAIL PROTECTED]                                             
             il.com>                                                    To 
                                       "[EMAIL PROTECTED]"            
             03/09/2005 06:45          <[EMAIL PROTECTED]>            
             AM                                                         cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: log rotate on multiple files    
                 Rathna N                                                  
             <[EMAIL PROTECTED]                                             
                  il.com>                                                  
                                                                           
                                                                           
                                                                           




seems like, u should do it in a loop for each file.
http://search.cpan.org/~paulg/Logfile-Rotate-1.04/Rotate.pm

thanks,
Rathna


On Tue, 8 Mar 2005 22:03:44 -0500, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Will someone provide clues as to how use logfile rotate on multiple
files?
> I looked at the rotate.pm and did not see anything this the code.  I
tried
> one File => line followed by multipl scalers but that did not work then I
> tried multiple File => references and this did not work???
>
> thank you,
>
> Here is my code:
>
> use strict;
> use warnings;
> use diagnostics;
> use MIME::Lite;
> use Logfile::Rotate;
>
> $ENV{"PATH"} = qq(/opt/SUNWsamfs/sbin:/usr/bin:/usr/sbin:/usr/local/log);
>
> my $wd=40;
> my $tpexports = qq(/usr/local/log/exports);
> my $hrtlabtapeszs = qq(/usr/local/log/heartlab_tapeszs.log);
> my $fujitapeszs = qq(/usr/local/log/fuji_tapeszs.log);
> my $slhtapeszs = qq(/usr/local/log/slh_tapeszs.log);
>
> open (FFFF_, "+>$tpexports") || die "could not open file: $tpexports $!";
> open (FFF_, "+<$hrtlabtapeszs") || die "could not open file:
$hrtlabtapeszs
> $!";
> open (FF_, "+<$fujitapeszs") || die "could not open file: $fujitapeszs
$!";
> #open (F_, "+<$slhtapeszs") || die "could not open file: $slhtapeszs $!";
>
>         my $logs = new Logfile::Rotate (File => $tpexports,
>                                         File => $hrtlabtapeszs,
>                    Count => 10,
>                                         Gzip => '/usr/bin/gzip',
>                                         Dir  => '/usr/local/log/old',
>                                         Flock => 'yes',
>                                         Persist => 'yes' );
>         $logs->rotate();
>
> Derek B. Smith
> OhioHealth IT
> UNIX / TSM / EDM Teams
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>


--
Regards,
Rathna.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to