]> git.mxchange.org Git - flightgear.git/commitdiff
Enable release builds using the --without-logging option to the configure
authorcurt <curt>
Sat, 7 Nov 1998 19:07:06 +0000 (19:07 +0000)
committercurt <curt>
Sat, 7 Nov 1998 19:07:06 +0000 (19:07 +0000)
script.  Also a couple log message cleanups, plus some C to C++ comment
conversion.

Airports/genapt.cxx
Astro/stars.cxx
Main/GLUTmain.cxx
Main/fg_init.cxx
Objects/material.cxx
Time/event.cxx
Time/sunpos.cxx

index b65c5fa7ab94ce0ad7fc7778d0b888f08f545200..4ef94cf70dbe394c57914fcfe54681ad4e3d20a0 100644 (file)
@@ -90,7 +90,8 @@ gen_base( const Point3D& average, const container& perimeter, fgTILE *t)
 
     max_dist = 0.0;
 
-    cout << "generating airport base for size = " << perimeter.size() << "\n";
+    FG_LOG( FG_TERRAIN, FG_INFO, 
+           "generating airport base for size = " << perimeter.size() );
 
     fragment.init();
     fragment.tile_ptr = t;
@@ -102,10 +103,12 @@ gen_base( const Point3D& average, const container& perimeter, fgTILE *t)
                << " in fgAptGenerat()" );
     }
 
-    printf(" tile center = %.2f %.2f %.2f\n", 
-          t->center.x(), t->center.y(), t->center.z() );
-    printf(" airport center = %.2f %.2f %.2f\n", 
-          average.x(), average.y(), average.z());
+    FG_LOG( FG_TERRAIN, FG_INFO, 
+           " tile center = " 
+           << t->center.x() << " " << t->center.y() << " " << t->center.z() );
+    FG_LOG( FG_TERRAIN, FG_INFO, 
+           " airport center = "
+           << average.x() << " " << average.y() << " " << average.z() );
     fragment.center = average;
 
     normal[0] = average.x();
@@ -233,7 +236,7 @@ fgAptGenerate(const string& path, fgTILE *tile)
                gen_base(average, perimeter, tile);
            }
 
-           cout << "Reading airport record\n";
+           FG_LOG( FG_TERRAIN, FG_INFO, "Reading airport record" );
            in >> apt_id;
            apt_name = "";
            i = 1;
@@ -243,7 +246,8 @@ fgAptGenerate(const string& path, fgTILE *tile)
            while ( in.get(c) && c != '\n' ) {
                apt_name += c;
            }
-           cout << "\tID = " + apt_id + "  Name = " + apt_name + "\n";
+           FG_LOG( FG_TERRAIN, FG_INFO, 
+                   "\tID = " << apt_id << "  Name = " << apt_name );
        } else if ( token == "p" ) {
            // airport area bounding polygon coordinate.  These
            // specify a convex hull that should already have been cut
@@ -281,6 +285,11 @@ fgAptGenerate(const string& path, fgTILE *tile)
 
 
 // $Log$
+// Revision 1.10  1998/11/07 19:07:06  curt
+// Enable release builds using the --without-logging option to the configure
+// script.  Also a couple log message cleanups, plus some C to C++ comment
+// conversion.
+//
 // Revision 1.9  1998/11/06 21:17:32  curt
 // Converted to new logstream debugging facility.  This allows release
 // builds with no messages at all (and no performance impact) by using
index fa7957d3387d14bf6a5567a450bbb3e84458ab2a..ac20f6120f551032a9a34cdb47bbec8ddb968494 100644 (file)
@@ -104,8 +104,9 @@ int fgStarsInit( void ) {
     }
 
     timer.stop();
-    cerr << "Loaded " << starcount << " stars in "
-        << timer.elapsedSeconds() << " seconds" << endl;
+    FG_LOG( FG_ASTRO, FG_INFO, 
+           "Loaded " << starcount << " stars in "
+           << timer.elapsedSeconds() << " seconds" );
 
     min_magnitude[0] = 4.2;
     min_magnitude[1] = 3.6;
@@ -254,6 +255,11 @@ void fgStarsRender( void ) {
 
 
 // $Log$
+// Revision 1.22  1998/11/07 19:07:07  curt
+// Enable release builds using the --without-logging option to the configure
+// script.  Also a couple log message cleanups, plus some C to C++ comment
+// conversion.
+//
 // Revision 1.21  1998/11/06 21:17:42  curt
 // Converted to new logstream debugging facility.  This allows release
 // builds with no messages at all (and no performance impact) by using
index 96e687323748c4c3870db68d7d3feeccf234c474..b913e7557c33fe99d6a336f4cb541113ec7de5b3 100644 (file)
@@ -693,8 +693,10 @@ static void fgIdleFunction ( void ) {
        string slfile = current_options.get_fg_root() + "/Sounds/wasp.wav";
 
        s1 = new slSample ( (char *)slfile.c_str() );
-       printf("Rate = %d  Bps = %d  Stereo = %d\n", 
-              s1 -> getRate(), s1 -> getBps(), s1 -> getStereo());
+       FG_LOG( FG_GENERAL, FG_INFO,
+               "Rate = " << s1 -> getRate()
+               << "  Bps = " << s1 -> getBps()
+               << "  Stereo = " << s1 -> getStereo() );
        audio_sched -> loopSample ( s1 );
 
        if ( audio_sched->working() ) {
@@ -897,6 +899,11 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.64  1998/11/07 19:07:09  curt
+// Enable release builds using the --without-logging option to the configure
+// script.  Also a couple log message cleanups, plus some C to C++ comment
+// conversion.
+//
 // Revision 1.63  1998/11/06 21:18:08  curt
 // Converted to new logstream debugging facility.  This allows release
 // builds with no messages at all (and no performance impact) by using
index 1e3e6dddbb51debfb75a1b4804676555eceaf40d..7d4f2f2054eecfc2ae796aac81cde9ead04d4a50 100644 (file)
@@ -105,7 +105,8 @@ int fgInitPosition( void ) {
        FG_Longitude = current_options.get_lon() * DEG_TO_RAD;
        FG_Latitude  = current_options.get_lat() * DEG_TO_RAD;
     }
-    printf("starting altitude is = %.2f\n", current_options.get_altitude());
+    FG_LOG( FG_GENERAL, FG_INFO, 
+           "starting altitude is = " << current_options.get_altitude() );
 
     FG_Altitude = current_options.get_altitude() * METER_TO_FEET;
     FG_Runway_altitude = FG_Altitude - 3.758099;
@@ -376,6 +377,11 @@ int fgInitSubsystems( void )
 
 
 // $Log$
+// Revision 1.48  1998/11/07 19:07:10  curt
+// Enable release builds using the --without-logging option to the configure
+// script.  Also a couple log message cleanups, plus some C to C++ comment
+// conversion.
+//
 // Revision 1.47  1998/11/06 21:18:10  curt
 // Converted to new logstream debugging facility.  This allows release
 // builds with no messages at all (and no performance impact) by using
index a2dc6543e7f7f825bbd9e4ebd2b7a04473344e6a..01ade9ff6ffbe99b04c3ed14e362322ed1fcfd76 100644 (file)
@@ -293,7 +293,8 @@ fgMATERIAL_MGR::load_lib ( void )
        in >> material_name >> token;
 
        if ( token == '{' ) {
-           printf( "  Loading material %s\n", material_name.c_str() );
+           FG_LOG( FG_TERRAIN, FG_INFO,
+                   "  Loading material " << material_name );
            fgMATERIAL m;
            in >> m;
 
@@ -355,6 +356,11 @@ fgMATERIAL_MGR::render_fragments()
 
 
 // $Log$
+// Revision 1.11  1998/11/07 19:07:12  curt
+// Enable release builds using the --without-logging option to the configure
+// script.  Also a couple log message cleanups, plus some C to C++ comment
+// conversion.
+//
 // Revision 1.10  1998/11/06 21:18:17  curt
 // Converted to new logstream debugging facility.  This allows release
 // builds with no messages at all (and no performance impact) by using
index 24e7c490e4b4f3840b6dd5821aa87f32ec8e5cf8..e499d56f1104f6be1b674a9b86d693b1ba586dae 100644 (file)
@@ -94,7 +94,7 @@ fgEVENT::~fgEVENT()
 void
 fgEVENT::run()
 {
-    printf("Running %s\n", description.c_str() );
+    FG_LOG(FG_TIME, FG_INFO, "Running " << description );
 
     // record starting time
     timestamp( &last_run );
@@ -131,11 +131,14 @@ fgEVENT::run()
 int
 fgEVENT::PrintStats() const
 {
-    printf("  %-30s int=%.2fs cum=%ld min=%ld max=%ld count=%ld ave=%.2f\n",
-          description.c_str(), 
-          interval / 1000.0,
-          cum_time, min_time, max_time, count, 
-          cum_time / (double)count);
+    FG_LOG( FG_TIME, FG_INFO, 
+           "  " << description 
+           << " int=" << interval / 1000.0
+           << " cum=" << cum_time
+           << " min=" << min_time
+           << " max=" <<  max_time
+           << " count=" << count
+           << " ave=" << cum_time / (double)count );
     return 0;
 }
 
@@ -146,7 +149,7 @@ fgEVENT_MGR::fgEVENT_MGR( void ) {
 
 // Initialize the scheduling subsystem
 void fgEVENT_MGR::Init( void ) {
-    printf("Initializing event manager\n");
+    FG_LOG(FG_TIME, FG_INFO, "Initializing event manager" );
 
     run_queue.erase( run_queue.begin(), run_queue.end() );
     event_table.erase( event_table.begin(), event_table.end() );
@@ -162,7 +165,7 @@ fgEVENT_MGR::Register( const string& desc,
 {
     fgEVENT e( desc, cb, status, interval );
 
-    printf("Registering event: %s\n", desc.c_str() );
+    FG_LOG( FG_TIME, FG_INFO, "Registering event: " << desc );
 
     // Actually run the event
     e.run();
@@ -195,15 +198,15 @@ void fgEVENT_MGR::Resume( void ) {
 void
 fgEVENT_MGR::PrintStats()
 {
-    printf("\n");
-    printf("Event Stats\n");
-    printf("-----------\n");
+    FG_LOG( FG_TIME, FG_INFO, "" );
+    FG_LOG( FG_TIME, FG_INFO, "Event Stats" );
+    FG_LOG( FG_TIME, FG_INFO, "-----------" );
 
     for_each( event_table.begin(),
              event_table.end(),
              mem_fun_ref( &fgEVENT::PrintStats ));
 
-    printf("\n");
+    FG_LOG( FG_TIME, FG_INFO, "");
 }
 
 
@@ -258,6 +261,11 @@ fgEVENT_MGR::~fgEVENT_MGR( void ) {
 
 
 // $Log$
+// Revision 1.10  1998/11/07 19:07:13  curt
+// Enable release builds using the --without-logging option to the configure
+// script.  Also a couple log message cleanups, plus some C to C++ comment
+// conversion.
+//
 // Revision 1.9  1998/11/06 21:18:24  curt
 // Converted to new logstream debugging facility.  This allows release
 // builds with no messages at all (and no performance impact) by using
index 37c47aab73a5d6bea0e52e981bc3de70b0859228..5651fa9e249a6564a4478abe5d967024cef1e384 100644 (file)
@@ -45,6 +45,7 @@
 
 //#include <Astro/orbits.hxx>
 #include <Astro/solarsystem.hxx>
+#include <Debug/logstream.hxx>
 #include <Include/fg_constants.h>
 #include <Main/views.hxx>
 #include <Math/fg_geodesy.hxx>
@@ -193,7 +194,8 @@ static double julian_date(int y, int m, int d) {
 
     /* lazy test to ensure gregorian calendar */
     if (y < 1583) {
-       printf("WHOOPS! Julian dates only valid for 1582 oct 15 or later\n");
+       FG_LOG( FG_TIME, FG_ALERT, 
+               "WHOOPS! Julian dates only valid for 1582 oct 15 or later" );
     }
 
     if ((m == 1) || (m == 2)) {
@@ -338,7 +340,7 @@ void fgUpdateSunPos( void ) {
     t = &cur_time_params;
     v = &current_view;
 
-    printf("  Updating Sun position\n");
+    FG_LOG( FG_TIME, FG_INFO, "  Updating Sun position" );
 
     // (not sure why there was two)
     // fgSunPosition(t->cur_time, &l->sun_lon, &sun_gd_lat);
@@ -349,9 +351,10 @@ void fgUpdateSunPos( void ) {
     p = Point3D( l->sun_lon, l->sun_gc_lat, sl_radius );
     l->fg_sunpos = fgPolarToCart3d(p);
 
-    printf( "    t->cur_time = %ld\n", t->cur_time);
-    printf( "    Sun Geodetic lat = %.5f Geocentric lat = %.5f\n",
-           sun_gd_lat, l->sun_gc_lat);
+    FG_LOG( FG_TIME, FG_INFO, "    t->cur_time = " << t->cur_time );
+    FG_LOG( FG_TIME, FG_INFO, 
+           "    Sun Geodetic lat = " << sun_gd_lat
+           << " Geocentric lat = " << l->sun_gc_lat );
 
     // I think this will work better for generating the sun light vector
     l->sun_vec[0] = l->fg_sunpos.x();
@@ -423,6 +426,11 @@ void fgUpdateSunPos( void ) {
 
 
 // $Log$
+// Revision 1.16  1998/11/07 19:07:14  curt
+// Enable release builds using the --without-logging option to the configure
+// script.  Also a couple log message cleanups, plus some C to C++ comment
+// conversion.
+//
 // Revision 1.15  1998/10/18 01:17:24  curt
 // Point3D tweaks.
 //