KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a Logger instance: require 'logger' logger = Logger.new( 'foo.log', 'weekly' ) I want to redirect runtime errors (stderr output) into the log as well. I found this forum thread which has the advice: new_fd = logger.get_logger_file_descriptor $stderr.reopen new_fd However, Logger does not have an instance method get_logger_file_descriptor , nor can I find any exposed methods around gaining access to the log device or file. How can I cause all $stderr output to go into the log?
Tags (comma-separated)
Save Edits
Cancel