From: Tim Pease Date: 2010-01-03T06:52:27+09:00 Subject: Re: Is it possible to redirect $stderr to a Logger isntance? On Jan 2, 2010, at 2:37 PM, Iņaki Baz Castillo wrote: > Hi, is it possible to redirect $stderr to any available logger instance (as > Logger, SyslogLogger, Logging)? > > I think it cannot be done, since current Loggers can log to $stderr so we > would get some kind of "loop" XD > $stderr is a file descriptor. You can reopen the descriptor to any other valid descriptor: file, socket, pipe, unix socket, etc. For any of the loggers you mentioned above, get a hold of the internal descriptor the logger is using and then .... new_fd = logger.get_logger_file_descriptor $stderr.reopen new_fd Blessings, TwP