Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Log::Dispatch::FileRotate ?

by nagalenoj (Friar)
on Nov 25, 2009 at 08:53 UTC ( #809294=note: print w/replies, xml ) Need Help??

in reply to Log::Dispatch::FileRotate ?

Hello ree,

Append mode is working well. You please change the size parameter and test it again. It'll work fine.

-- size ($) The maximum (or close to) size the log file can grow too.

Replies are listed 'Best First'.
Re^2: Log::Dispatch::FileRotate ?
by vinoth.ree (Monsignor) on Nov 25, 2009 at 09:38 UTC

    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!

      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;
Re^2: Log::Dispatch::FileRotate ?
by Anonymous Monk on Nov 25, 2009 at 09:08 UTC

    Did you tried the above code? with different size value?

    I changed the size to 5 and 1 no use same thing is happening for me.

      Sorry! The Last reply is mine. ree

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://809294]
[LanX]: Snowden remins me of Evan Spiegel (... start of a new conspiracy theory)
[LanX]: yes! The same person!
[Eily]: LanX can't be, they're both on the picture at the same time. Duh
[LanX]: They hired a Hollywood producer to fake the pic
LanX has to go and change location, I can hear THEM on the stairs...
[Eily]: they can't actually fake the pics, that's what they want you to believe so that you can't accept obvious proofs

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2018-03-19 15:30 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.