]> git.mxchange.org Git - flightgear.git/commitdiff
Use proper logging facility, and lower the priority of some of the
authordavid <david>
Mon, 24 Nov 2003 17:45:35 +0000 (17:45 +0000)
committerdavid <david>
Mon, 24 Nov 2003 17:45:35 +0000 (17:45 +0000)
logging messages.  This is part of an effort to make FlightGear a bit
quieter during normal operations.

src/ATC/ATCmgr.cxx
src/ATC/commlist.cxx
src/Autopilot/auto_gui.cxx
src/Input/input.cxx
src/MultiPlayer/multiplaytxmgr.cxx
src/Scenery/tileentry.cxx
src/Scenery/tilemgr.cxx
src/Systems/electrical.cxx

index 22e2f6610836917f15d99b6df81945380f93e563..cd1686d9d50f2617fa6a62c7eecc64514fa84119 100644 (file)
@@ -537,11 +537,11 @@ void FGATCMgr::FreqSearch(int channel) {
                        FGATC* app = FindInList(comm_ident[chan], TOWER);
                        if(app != NULL) {
                                // The station is already in the ATC list
-                               cout << comm_ident[chan] << " is in list - flagging SetDisplay..." << endl;
+                                SG_LOG(SG_GENERAL, SG_DEBUG, comm_ident[chan] << " is in list - flagging SetDisplay...");
                                app->SetDisplay();
                        } else {
                                // Generate the station and put in the ATC list
-                               cout << comm_ident[chan] << " is not in list - generating..." << endl;
+                                SG_LOG(SG_GENERAL, SG_DEBUG, comm_ident[chan] << " is not in list - generating...");
                                FGTower* t = new FGTower;
                                t->SetData(&data);
                                comm_atc_ptr[chan] = t;
index fe52e03afabc510d0ae421dc88f65e41f150d046..dabb44b36bfc886ed086d4dd598c9d963f2aaa53 100644 (file)
@@ -91,7 +91,7 @@ bool FGCommList::LoadComms(SGPath path) {
         ATCData a;
                fin >> a;
                if(a.type == INVALID) {
-                       SG_LOG(SG_GENERAL, SG_ALERT, "WARNING - INVALID type found in " << path.str() << '\n');
+                       SG_LOG(SG_GENERAL, SG_DEBUG, "WARNING - INVALID type found in " << path.str() << '\n');
                } else {                
                        // Push all stations onto frequency map
                        commlist_freq[a.freq].push_back(a);
index 191f03cf04c06a83313279d54ce12ceb78fe569c..51363288ceb0106b145950c815c9b23f1c8abcbe 100644 (file)
@@ -850,7 +850,7 @@ void NewTgtAirportInit()
     }
 
     FG_FINALIZE_PUI_DIALOG( TgtAptDialog );
-    printf("leave NewTgtAirportInit()");
+    SG_LOG(SG_GENERAL, SG_DEBUG, "leave NewTgtAirportInit()");
 }
 
 
index 887d18d49eb7c18fef0f88a9b78e2bf76693e2fc..54cecb9c2a07a624da0500d7ca0c1de5e5e48347 100644 (file)
@@ -454,7 +454,7 @@ FGInput::_init_joystick ()
     jsJoystick * js = new jsJoystick(i);
     _joystick_bindings[i].js = js;
     if (js->notWorking()) {
-      SG_LOG(SG_INPUT, SG_WARN, "Joystick " << i << " not found");
+      SG_LOG(SG_INPUT, SG_DEBUG, "Joystick " << i << " not found");
       continue;
     } else {
       bool found_js = false;
index 4ec00060207c93340791c166b5523e4977ed5c2d..ad0413860837300170dbbb4fe91c8118fec4f345 100644 (file)
@@ -139,7 +139,7 @@ bool FGMultiplayTxMgr::init(void) {
         // If Tx port == zero then don't initialise
         } else {
 
-            SG_LOG( SG_NETWORK, SG_WARN, "FGMultiplayTxMgr::init - Tx Port is zero. Multiplay out disabled." );
+            SG_LOG( SG_NETWORK, SG_INFO, "FGMultiplayTxMgr::init - Tx Port is zero. Multiplay out disabled." );
             bSuccess = false;
 
         }
@@ -148,7 +148,7 @@ bool FGMultiplayTxMgr::init(void) {
         m_bInitialised = bSuccess;
 
     } else {
-        SG_LOG( SG_NETWORK, SG_ALERT, "FGMultiplayTxMgr::init - Attempt to init object that is already opened" );
+        SG_LOG( SG_NETWORK, SG_WARN, "FGMultiplayTxMgr::init - Attempt to init object that is already opened" );
         bSuccess = false;
     }
 
index 539fe131f674d9550ac4e6e77de0adda2d6ef8f9..7e71d5da5a594ae7f9286184ef02e3beb215788b 100644 (file)
@@ -843,7 +843,7 @@ FGTileEntry::load( const string &base_path, bool is_base )
                             << " codes = " << common << " "
                             << end1 << " " << end2 );
                 } else {
-                    SG_LOG( SG_TERRAIN, SG_ALERT,
+                    SG_LOG( SG_TERRAIN, SG_DEBUG,
                             "Unknown token " << token << " in "
                             << stg_name.str() );
                     in >> ::skipws;
index 2b16af01838cb629a7c5d9c1744931f5a14e9730..39c50f8091f3250b4afa437cfb533a3a3d7ddb43 100644 (file)
@@ -389,6 +389,7 @@ int FGTileMgr::update( SGLocation *location, double visibility_meters,
     if ( current_tile != NULL ) {
         globals->get_scenery()->set_next_center( current_tile->center );
     } else {
+        printf("Log level is %d\n", sglog().get_log_priority());
         SG_LOG( SG_TERRAIN, SG_WARN, "Tile not found (Ok if initializing)" );
         globals->get_scenery()->set_next_center( Point3D(0.0) );
     }
index 906ccf15aab874f942517e5c7dcfb14cff1d436c..c4e59d84c51bcf900c7551f96c75e2216bf44de4 100644 (file)
@@ -267,7 +267,7 @@ void FGElectricalSystem::init () {
         SGPath config( globals->get_fg_root() );
         config.append( path_n->getStringValue() );
 
-        SG_LOG( SG_ALL, SG_ALERT, "Reading electrical system model from "
+        SG_LOG( SG_ALL, SG_INFO, "Reading electrical system model from "
                 << config.str() );
         try {
             readProperties( config.str(), config_props );
@@ -289,7 +289,7 @@ void FGElectricalSystem::init () {
         }
 
     } else
-        SG_LOG( SG_ALL, SG_ALERT,
+        SG_LOG( SG_ALL, SG_WARN,
                 "No electrical model specified for this model!");
 
     delete config_props;