Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: Log::Dispatch::FileRotate ?

by vinoth.ree (Prior)
on Nov 25, 2009 at 09:38 UTC ( #809304=note: print w/ replies, xml ) Need Help??

in reply to Re: Log::Dispatch::FileRotate ?
in thread Log::Dispatch::FileRotate ?

Hi Nagalenoj,

You are right, when I increase the file size to 1000 it appends the content in the file. I thought that 10 in size field for 10MB, I thing its takes 10KB as file size, but I am not sure. Thanks!

Comment on Re^2: Log::Dispatch::FileRotate ?
Replies are listed 'Best First'.
Re^3: Log::Dispatch::FileRotate ?
by gmargo (Hermit) on Nov 25, 2009 at 17:12 UTC

    The documentation is unclear, but if you look at the source, it is very clear that the size is in bytes. The size parameter defaults to 10MB, so try the default.

    Here is the relevant section of code from the Log::Dispatch::FileRotate module's constructor:

    # Size defaults to 10meg in all failure modes, hopefully my $ten_meg = 1024*1024*10; my $two_gig = 1024*1024*1024*2; my $size = $ten_meg; $size = $p{size} if defined $p{size}; $size = $ten_meg unless $size =~ /^\d+$/ && $size < $two_gig && $s +ize > 0; $self->{size} = $size;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://809304]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2015-10-13 19:35 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (314 votes), past polls