weismat has asked for the wisdom of the Perl Monks concerning the following question:

I am using Log::Dispatch::FileRotate and I have the issue that the call to the module hangs in case there is no disk space.
What can be done about this behaviour?
Can one point me to another CPAN module which offers rotating logs and has a better error handling?
  • Comment on Log::Dispatch::FileRotate error handling

Replies are listed 'Best First'.
Re: Log::Dispatch::FileRotate error handling
by Anonymous Monk on Jan 02, 2008 at 13:32 UTC
Re: Log::Dispatch::FileRotate error handling
by andreas1234567 (Vicar) on Jan 02, 2008 at 20:24 UTC
    the module hangs in case there is no disk space.
    Log::Dispatch::FileRotate is a wrapper around Log::Dispatch::File, which prints messages to a file.

    What exactly would you want Log::Dispatch::FileRotate to do when you run out of disk space? Return immediately and hide the possibly corrupt state of your system? Would it not be better if you detect you're low on disk and deal with it instead?

    --
    Andreas
      From my pov the calling module/program should die/croak and the calling program should have the choice to handle the die/croak via eval or to die as well.
      Checking disk space/permission etc. involves also the chance to run into a race between check and change of disk space thus an improved error handling would be highly appreciated.