How to direct error messages to a log file?

All-

Presently I write program process information to a log file thus:

logfile.puts “stuff here…”

However, I’d also like to be able to log Ruby error messages to this log file when the program crashes. Ultra newbie question: Is there a way to have such messages directed to a specific log file?

Thanks!

-ke

Hi,

···

At Fri, 19 Jul 2002 06:00:42 +0900, Kurt Euler wrote:

Presently I write program process information to a log file thus:

logfile.puts “stuff here…”

However, I’d also like to be able to log Ruby error messages
to this log file when the program crashes. Ultra newbie
question: Is there a way to have such messages directed to a
specific log file?

STDERR.reopen(logfile)


Nobu Nakada