Skip to content
Snippets Groups Projects
  • Nat Goodspeed's avatar
    7845f73c
    DRTVWR-476: Try to log stderr output from classic-C libraries. · 7845f73c
    Nat Goodspeed authored
    Some of the libraries we use produce log output to stderr. Such output can be
    informative, but is invisible unless you launch the viewer from a console. In
    particular, it's invisible to anyone trying to diagnose a problem by reading
    someone else's SecondLife.log file.
    
    Make RecordToFile -- the Recorder subclass engaged by LLError::logToFile() --
    redirect STDERR_FILENO to the newly-opened log file so that any subsequent
    writes to stderr (or cerr, for that matter) will be captured in the log file.
    But first duplicate the original stderr file handle, and restore it when
    RecordToFile is destroyed. That way, output written to stderr during the final
    moments of application shutdown should still appear on (console) stderr.
    7845f73c
    History
    DRTVWR-476: Try to log stderr output from classic-C libraries.
    Nat Goodspeed authored
    Some of the libraries we use produce log output to stderr. Such output can be
    informative, but is invisible unless you launch the viewer from a console. In
    particular, it's invisible to anyone trying to diagnose a problem by reading
    someone else's SecondLife.log file.
    
    Make RecordToFile -- the Recorder subclass engaged by LLError::logToFile() --
    redirect STDERR_FILENO to the newly-opened log file so that any subsequent
    writes to stderr (or cerr, for that matter) will be captured in the log file.
    But first duplicate the original stderr file handle, and restore it when
    RecordToFile is destroyed. That way, output written to stderr during the final
    moments of application shutdown should still appear on (console) stderr.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.