From d296e5a7df85e44d43bb33d048e38f60424a6967 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 24 Nov 2003 17:45:35 +0000 Subject: [PATCH] Use proper logging facility, and lower the priority of some of the logging messages. This is part of an effort to make FlightGear a bit quieter during normal operations. --- src/ATC/ATCmgr.cxx | 4 ++-- src/ATC/commlist.cxx | 2 +- src/Autopilot/auto_gui.cxx | 2 +- src/Input/input.cxx | 2 +- src/MultiPlayer/multiplaytxmgr.cxx | 4 ++-- src/Scenery/tileentry.cxx | 2 +- src/Scenery/tilemgr.cxx | 1 + src/Systems/electrical.cxx | 4 ++-- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/ATC/ATCmgr.cxx b/src/ATC/ATCmgr.cxx index 22e2f6610..cd1686d9d 100644 --- a/src/ATC/ATCmgr.cxx +++ b/src/ATC/ATCmgr.cxx @@ -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; diff --git a/src/ATC/commlist.cxx b/src/ATC/commlist.cxx index fe52e03af..dabb44b36 100644 --- a/src/ATC/commlist.cxx +++ b/src/ATC/commlist.cxx @@ -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); diff --git a/src/Autopilot/auto_gui.cxx b/src/Autopilot/auto_gui.cxx index 191f03cf0..51363288c 100644 --- a/src/Autopilot/auto_gui.cxx +++ b/src/Autopilot/auto_gui.cxx @@ -850,7 +850,7 @@ void NewTgtAirportInit() } FG_FINALIZE_PUI_DIALOG( TgtAptDialog ); - printf("leave NewTgtAirportInit()"); + SG_LOG(SG_GENERAL, SG_DEBUG, "leave NewTgtAirportInit()"); } diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 887d18d49..54cecb9c2 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -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; diff --git a/src/MultiPlayer/multiplaytxmgr.cxx b/src/MultiPlayer/multiplaytxmgr.cxx index 4ec000602..ad0413860 100644 --- a/src/MultiPlayer/multiplaytxmgr.cxx +++ b/src/MultiPlayer/multiplaytxmgr.cxx @@ -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; } diff --git a/src/Scenery/tileentry.cxx b/src/Scenery/tileentry.cxx index 539fe131f..7e71d5da5 100644 --- a/src/Scenery/tileentry.cxx +++ b/src/Scenery/tileentry.cxx @@ -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; diff --git a/src/Scenery/tilemgr.cxx b/src/Scenery/tilemgr.cxx index 2b16af018..39c50f809 100644 --- a/src/Scenery/tilemgr.cxx +++ b/src/Scenery/tilemgr.cxx @@ -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) ); } diff --git a/src/Systems/electrical.cxx b/src/Systems/electrical.cxx index 906ccf15a..c4e59d84c 100644 --- a/src/Systems/electrical.cxx +++ b/src/Systems/electrical.cxx @@ -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; -- 2.39.5