From 4f99561f6340a1056f507e91122daafe44e289d1 Mon Sep 17 00:00:00 2001 From: jmt Date: Mon, 15 Feb 2010 23:57:56 +0000 Subject: [PATCH] Quiet: reduce log-level of various things from INFO to DEBUG or BULK, and tune the categories/level of some specific messages. Commit split by timoore in order to apply most of it to maint branch. --- src/Cockpit/hud.cxx | 6 +++--- src/Cockpit/hud_card.cxx | 2 +- src/Cockpit/hud_gaug.cxx | 2 +- src/Cockpit/hud_labl.cxx | 2 +- src/Cockpit/hud_ladr.cxx | 2 +- src/Cockpit/hud_rwy.cxx | 2 +- src/Cockpit/hud_tbi.cxx | 2 +- src/Cockpit/panel_io.cxx | 15 +++------------ src/GUI/menubar.cxx | 10 +++++----- src/Main/fg_commands.cxx | 4 ++-- 10 files changed, 19 insertions(+), 28 deletions(-) diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index aae7bf22e..b06a1917b 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -182,7 +182,7 @@ int readHud( istream &input ) } - SG_LOG(SG_INPUT, SG_INFO, "Read properties for " << + SG_LOG(SG_INPUT, SG_DEBUG, "Read properties for " << root.getStringValue("name")); if (!root.getNode("depreciated")) @@ -191,7 +191,7 @@ int readHud( istream &input ) HUD_deque.erase( HUD_deque.begin(), HUD_deque.end()); - SG_LOG(SG_INPUT, SG_INFO, "Reading Hud instruments"); + SG_LOG(SG_INPUT, SG_DEBUG, "Reading Hud instruments"); const SGPropertyNode * instrument_group = root.getChild("instruments"); int nInstruments = instrument_group->nChildren(); @@ -203,7 +203,7 @@ int readHud( istream &input ) SGPath path( globals->get_fg_root() ); path.append(node->getStringValue("path")); - SG_LOG(SG_INPUT, SG_INFO, "Reading Instrument " + SG_LOG(SG_INPUT, SG_DEBUG, "Reading Instrument " << node->getName() << " from " << path.str()); diff --git a/src/Cockpit/hud_card.cxx b/src/Cockpit/hud_card.cxx index 858c3716f..746e9317a 100644 --- a/src/Cockpit/hud_card.cxx +++ b/src/Cockpit/hud_card.cxx @@ -56,7 +56,7 @@ hud_card::hud_card(const SGPropertyNode *node) : Maj_div(node->getIntValue("major_divs")), // FIXME dup Min_div(node->getIntValue("minor_divs")) // FIXME dup { - SG_LOG(SG_INPUT, SG_INFO, "Done reading dial/tape instrument " + SG_LOG(SG_INPUT, SG_BULK, "Done reading dial/tape instrument " << node->getStringValue("name", "[unnamed]")); set_data_source(get_func(node->getStringValue("loadfn"))); diff --git a/src/Cockpit/hud_gaug.cxx b/src/Cockpit/hud_gaug.cxx index 04c2018ed..7a4d5ce6f 100644 --- a/src/Cockpit/hud_gaug.cxx +++ b/src/Cockpit/hud_gaug.cxx @@ -26,7 +26,7 @@ gauge_instr::gauge_instr(const SGPropertyNode *node) : 0, /* hud.cxx: static int dp_shoing = 0; */ // FIXME node->getBoolValue("working", true)) { - SG_LOG(SG_INPUT, SG_INFO, "Done reading gauge instrument " + SG_LOG(SG_INPUT, SG_BULK, "Done reading gauge instrument " << node->getStringValue("name", "[unnamed]")); set_data_source(get_func(node->getStringValue("loadfn"))); diff --git a/src/Cockpit/hud_labl.cxx b/src/Cockpit/hud_labl.cxx index d19fed056..95d69142a 100644 --- a/src/Cockpit/hud_labl.cxx +++ b/src/Cockpit/hud_labl.cxx @@ -33,7 +33,7 @@ instr_label::instr_label(const SGPropertyNode *node) : lon_node(fgGetNode("/position/longitude-string", true)), lat_node(fgGetNode("/position/latitude-string", true)) { - SG_LOG(SG_INPUT, SG_INFO, "Done reading instr_label instrument " + SG_LOG(SG_INPUT, SG_BULK, "Done reading instr_label instrument " << node->getStringValue("name", "[unnamed]")); set_data_source(get_func(node->getStringValue("data_source"))); diff --git a/src/Cockpit/hud_ladr.cxx b/src/Cockpit/hud_ladr.cxx index 38def8d9d..34b58d0eb 100644 --- a/src/Cockpit/hud_ladr.cxx +++ b/src/Cockpit/hud_ladr.cxx @@ -51,7 +51,7 @@ HudLadder::HudLadder(const SGPropertyNode *node) : if (fgGetBool("/sim/hud/enable3d", true) && HUD_style == 1) factor = 640.0 / 55.0; - SG_LOG(SG_INPUT, SG_INFO, "Done reading HudLadder instrument" + SG_LOG(SG_INPUT, SG_BULK, "Done reading HudLadder instrument" << node->getStringValue("name", "[unnamed]")); if (!width_units) diff --git a/src/Cockpit/hud_rwy.cxx b/src/Cockpit/hud_rwy.cxx index 2bc15bcd1..0f7866619 100644 --- a/src/Cockpit/hud_rwy.cxx +++ b/src/Cockpit/hud_rwy.cxx @@ -60,7 +60,7 @@ runway_instr::runway_instr(const SGPropertyNode *node) : drawIA(arrowScale > 0 ? true : false), drawIAAlways(arrowScale > 0 ? node->getBoolValue("arrow_always") : false) { - SG_LOG(SG_INPUT, SG_INFO, "Done reading runway instrument " + SG_LOG(SG_INPUT, SG_BULK, "Done reading runway instrument " << node->getStringValue("name", "[unnamed]")); view[0] = 0; diff --git a/src/Cockpit/hud_tbi.cxx b/src/Cockpit/hud_tbi.cxx index 0c96340d1..c5fd670c6 100644 --- a/src/Cockpit/hud_tbi.cxx +++ b/src/Cockpit/hud_tbi.cxx @@ -32,7 +32,7 @@ fgTBI_instr::fgTBI_instr(const SGPropertyNode *node) : rad(node->getFloatValue("rad")) { - SG_LOG(SG_INPUT, SG_INFO, "Done reading TBI instrument" + SG_LOG(SG_INPUT, SG_BULK, "Done reading TBI instrument" << node->getStringValue("name", "[unnamed]")); } diff --git a/src/Cockpit/panel_io.cxx b/src/Cockpit/panel_io.cxx index fdb6b2686..7ef58b6e1 100644 --- a/src/Cockpit/panel_io.cxx +++ b/src/Cockpit/panel_io.cxx @@ -684,7 +684,6 @@ readPanel (const SGPropertyNode * root) if (bgTexture.empty()) bgTexture = "FOO"; panel->setBackground(FGTextureManager::createTexture(bgTexture.c_str())); - SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << bgTexture ); // // Get multibackground if any... @@ -692,49 +691,41 @@ readPanel (const SGPropertyNode * root) string mbgTexture = root->getStringValue("multibackground[0]"); if (!mbgTexture.empty()) { panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 0); - SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture ); mbgTexture = root->getStringValue("multibackground[1]"); if (mbgTexture.empty()) mbgTexture = "FOO"; panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 1); - SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture ); mbgTexture = root->getStringValue("multibackground[2]"); if (mbgTexture.empty()) mbgTexture = "FOO"; panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 2); - SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture ); mbgTexture = root->getStringValue("multibackground[3]"); if (mbgTexture.empty()) mbgTexture = "FOO"; panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 3); - SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture ); mbgTexture = root->getStringValue("multibackground[4]"); if (mbgTexture.empty()) mbgTexture = "FOO"; panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 4); - SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture ); mbgTexture = root->getStringValue("multibackground[5]"); if (mbgTexture.empty()) mbgTexture = "FOO"; panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 5); - SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture ); mbgTexture = root->getStringValue("multibackground[6]"); if (mbgTexture.empty()) mbgTexture = "FOO"; panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 6); - SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture ); mbgTexture = root->getStringValue("multibackground[7]"); if (mbgTexture.empty()) mbgTexture = "FOO"; panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 7); - SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture ); } @@ -743,7 +734,7 @@ readPanel (const SGPropertyNode * root) // // Create each instrument. // - SG_LOG( SG_COCKPIT, SG_INFO, "Reading panel instruments" ); + SG_LOG( SG_COCKPIT, SG_DEBUG, "Reading panel instruments" ); const SGPropertyNode * instrument_group = root->getChild("instruments"); if (instrument_group != 0) { int nInstruments = instrument_group->nChildren(); @@ -799,12 +790,12 @@ readPanel (const SGPropertyNode * root) SG_LOG( SG_COCKPIT, SG_WARN, "Unknown special instrument found" ); } } else { - SG_LOG( SG_COCKPIT, SG_INFO, "Skipping " << node->getName() + SG_LOG( SG_COCKPIT, SG_WARN, "Skipping " << node->getName() << " in instruments section" ); } } } - SG_LOG( SG_COCKPIT, SG_INFO, "Done reading panel instruments" ); + SG_LOG( SG_COCKPIT, SG_BULK, "Done reading panel instruments" ); // diff --git a/src/GUI/menubar.cxx b/src/GUI/menubar.cxx index 3cd03bbcc..d34f0fe3a 100644 --- a/src/GUI/menubar.cxx +++ b/src/GUI/menubar.cxx @@ -258,7 +258,7 @@ FGMenuBar::destroy_menubar () // Delete all the character arrays // we were forced to keep around for // plib. - SG_LOG(SG_GENERAL, SG_INFO, "Deleting char arrays"); + SG_LOG(SG_GENERAL, SG_BULK, "Deleting char arrays"); for (i = 0; i < _char_arrays.size(); i++) { for (int j = 0; _char_arrays[i][j] != 0; j++) free(_char_arrays[i][j]); // added with strdup @@ -268,20 +268,20 @@ FGMenuBar::destroy_menubar () // Delete all the callback arrays // we were forced to keep around for // plib. - SG_LOG(SG_GENERAL, SG_INFO, "Deleting callback arrays"); + SG_LOG(SG_GENERAL, SG_BULK, "Deleting callback arrays"); for (i = 0; i < _callback_arrays.size(); i++) delete[] _callback_arrays[i]; // Delete all those bindings - SG_LOG(SG_GENERAL, SG_INFO, "Deleting bindings"); + SG_LOG(SG_GENERAL, SG_BULK, "Deleting bindings"); map >::iterator it; for (it = _bindings.begin(); it != _bindings.end(); it++) { - SG_LOG(SG_GENERAL, SG_INFO, "Deleting bindings for " << it->first); + SG_LOG(SG_GENERAL, SG_BULK, "Deleting bindings for " << it->first); for ( i = 0; i < it->second.size(); i++ ) delete it->second[i]; } - SG_LOG(SG_GENERAL, SG_INFO, "Done."); + SG_LOG(SG_GENERAL, SG_BULK, "Done."); } void diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index c8b938473..70ceb23b5 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -1596,9 +1596,9 @@ static struct { void fgInitCommands () { - SG_LOG(SG_GENERAL, SG_INFO, "Initializing basic built-in commands:"); + SG_LOG(SG_GENERAL, SG_BULK, "Initializing basic built-in commands:"); for (int i = 0; built_ins[i].name != 0; i++) { - SG_LOG(SG_GENERAL, SG_INFO, " " << built_ins[i].name); + SG_LOG(SG_GENERAL, SG_BULK, " " << built_ins[i].name); globals->get_commands()->addCommand(built_ins[i].name, built_ins[i].command); }