title: What is the better way to generate test report in a file using BOOST.Test?
body: <p>I know by default report is directed to standard-error, and so one has to redirect it to a file.
  My question is shall we do this inside a global fixture? Which isn't seem to be working for me some how.</p>
  
  <p>This is what i tried - </p>
  
  <pre><code>struct MyConfig
  {
   MyConfig()
    : testReport("fileName.log")
    {
      if(!testReport.fail())
       original = std::cerr.rdbuf(testReport.rdbuf());
    }
    ~MyConfig()
      {        
          cerr.rdbuf(original);        
          testReport.close();
      }
      ofstream testReport;
      streambuf* original;
  
   };
  
   BOOST_GLOBAL_FIXTURE(MyConfig);
  </code></pre>
  
  <p>After running the test, report outputs on console only, though a 0kb file is created with the given name.</p>