When you log to a log file, but you can't log to that file, where do you log the logfile error?

Cheers,
KM

Replies are listed 'Best First'.
(jcwren) RE: A Programmers Kong-an
by jcwren (Prior) on Oct 16, 2000 at 18:32 UTC
    Any responsible Windows 95/98 program will BSoD for you.

    --Chris

    e-mail jcwren
      responsible Windows 95/98 program

      That's a kong-an in itself.

      Cheers,
      KM

RE (tilly) 1: A Programmers Kong-an
by tilly (Archbishop) on Oct 16, 2000 at 18:35 UTC
    If it is critical, to your pager. :-)

    Or, if you don't think it needs to be addressed in the middle of the night, to your email.

    If you cannot do either, well there are bigger problems out there right now, you probably don't matter...

    For cron jobs I send email by printing to STDERR or STDOUT. Pages require work.

RE: A Programmers Kong-an
by merlyn (Sage) on Oct 17, 2000 at 01:27 UTC
RE: A Programmers Kong-an
by neophyte (Curate) on Oct 16, 2000 at 18:35 UTC
    LOL
    For CGI:
    I strive to catch things that rarely go wrong but may do so once in a while in a subroutine that mails the error to me, unless of course something in this routine goes wrong as well :-).

    neophyte

RE: A Programmers Kong-an
by turnstep (Parson) on Oct 16, 2000 at 19:14 UTC

    You log it to the Emergency Back-Up Logfile (c). If that doesn't work, log both of those errors to your Emergency Back-Up LogFile Logfile (c) ad infinitum...

      Hmm, so the truly paranoid-but-clueless might do this:

      use FileHandle; to_logfile($message) or to_backup_logfile($message, $logfilename); sub to_backup_logfile { my ($message, $logfilename) = @_; my $bulog = new FileHandle "$logfilename.bak" or to_backup_logfile("Couldn't write $message to $logfilename!", +"$logfilename.bak"); print $bulog $message; }

      Well, I suppose this code might tell you *something* useful =)

      Update I was viewing turnstep's reply, below, in Mozilla M18 and everything after my <code> tag got deleted. Curse the developing lizard, but praise the project!

        Actually, I started to write, but then resisted, a recursive subroutine that keeps opening (randomly named?) error files, and passing the names of all the previous error logs that it could not open until we run out of memory. Then maybe *that* error message will show up somewhere. :)