Hi All,

One of the frustrations of using Windows for development is the lack of a
sensible way to re-direct stderr to a file. This is particularly annoying if you
want to use a --log-level=debug.

To fix this, I've changed the global_logstream to use stdout for windows only.

The patch below does this.

If someone could test that this doesn't mess up *nix, and commit it, that would
be great.

-Stuart

Index: debug/logstream.hxx
===================================================================
RCS file: /var/cvs/SimGear-0.3/source/simgear/debug/logstream.hxx,v
retrieving revision 1.11
diff -u -r1.11 logstream.hxx
--- debug/logstream.hxx 2 Jul 2007 12:55:10 -0000       1.11
+++ debug/logstream.hxx 18 Sep 2007 19:33:43 -0000
@@ -300,8 +300,13 @@
      * won't crash when cerr.rdbuf() is first called -DW 
      **/
     cout << "Using Mac OS X hack for initializing C++ stdio..." << endl;
-#endif    
+#endif  
+
+#ifdef WIN32  
+    global_logstream = new logstream (cout);
+#else    
     global_logstream = new logstream (cerr);
+#endif    
   }
     
   return *global_logstream;




      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to