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.
This commit is contained in:
parent
26361f2f5a
commit
4f99561f63
10 changed files with 19 additions and 28 deletions
|
@ -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"));
|
root.getStringValue("name"));
|
||||||
|
|
||||||
if (!root.getNode("depreciated"))
|
if (!root.getNode("depreciated"))
|
||||||
|
@ -191,7 +191,7 @@ int readHud( istream &input )
|
||||||
HUD_deque.erase( HUD_deque.begin(), HUD_deque.end());
|
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");
|
const SGPropertyNode * instrument_group = root.getChild("instruments");
|
||||||
int nInstruments = instrument_group->nChildren();
|
int nInstruments = instrument_group->nChildren();
|
||||||
|
@ -203,7 +203,7 @@ int readHud( istream &input )
|
||||||
SGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
path.append(node->getStringValue("path"));
|
path.append(node->getStringValue("path"));
|
||||||
|
|
||||||
SG_LOG(SG_INPUT, SG_INFO, "Reading Instrument "
|
SG_LOG(SG_INPUT, SG_DEBUG, "Reading Instrument "
|
||||||
<< node->getName()
|
<< node->getName()
|
||||||
<< " from "
|
<< " from "
|
||||||
<< path.str());
|
<< path.str());
|
||||||
|
|
|
@ -56,7 +56,7 @@ hud_card::hud_card(const SGPropertyNode *node) :
|
||||||
Maj_div(node->getIntValue("major_divs")), // FIXME dup
|
Maj_div(node->getIntValue("major_divs")), // FIXME dup
|
||||||
Min_div(node->getIntValue("minor_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]"));
|
<< node->getStringValue("name", "[unnamed]"));
|
||||||
|
|
||||||
set_data_source(get_func(node->getStringValue("loadfn")));
|
set_data_source(get_func(node->getStringValue("loadfn")));
|
||||||
|
|
|
@ -26,7 +26,7 @@ gauge_instr::gauge_instr(const SGPropertyNode *node) :
|
||||||
0, /* hud.cxx: static int dp_shoing = 0; */ // FIXME
|
0, /* hud.cxx: static int dp_shoing = 0; */ // FIXME
|
||||||
node->getBoolValue("working", true))
|
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]"));
|
<< node->getStringValue("name", "[unnamed]"));
|
||||||
|
|
||||||
set_data_source(get_func(node->getStringValue("loadfn")));
|
set_data_source(get_func(node->getStringValue("loadfn")));
|
||||||
|
|
|
@ -33,7 +33,7 @@ instr_label::instr_label(const SGPropertyNode *node) :
|
||||||
lon_node(fgGetNode("/position/longitude-string", true)),
|
lon_node(fgGetNode("/position/longitude-string", true)),
|
||||||
lat_node(fgGetNode("/position/latitude-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]"));
|
<< node->getStringValue("name", "[unnamed]"));
|
||||||
|
|
||||||
set_data_source(get_func(node->getStringValue("data_source")));
|
set_data_source(get_func(node->getStringValue("data_source")));
|
||||||
|
|
|
@ -51,7 +51,7 @@ HudLadder::HudLadder(const SGPropertyNode *node) :
|
||||||
if (fgGetBool("/sim/hud/enable3d", true) && HUD_style == 1)
|
if (fgGetBool("/sim/hud/enable3d", true) && HUD_style == 1)
|
||||||
factor = 640.0 / 55.0;
|
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]"));
|
<< node->getStringValue("name", "[unnamed]"));
|
||||||
|
|
||||||
if (!width_units)
|
if (!width_units)
|
||||||
|
|
|
@ -60,7 +60,7 @@ runway_instr::runway_instr(const SGPropertyNode *node) :
|
||||||
drawIA(arrowScale > 0 ? true : false),
|
drawIA(arrowScale > 0 ? true : false),
|
||||||
drawIAAlways(arrowScale > 0 ? node->getBoolValue("arrow_always") : 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]"));
|
<< node->getStringValue("name", "[unnamed]"));
|
||||||
|
|
||||||
view[0] = 0;
|
view[0] = 0;
|
||||||
|
|
|
@ -32,7 +32,7 @@ fgTBI_instr::fgTBI_instr(const SGPropertyNode *node) :
|
||||||
rad(node->getFloatValue("rad"))
|
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]"));
|
<< node->getStringValue("name", "[unnamed]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -684,7 +684,6 @@ readPanel (const SGPropertyNode * root)
|
||||||
if (bgTexture.empty())
|
if (bgTexture.empty())
|
||||||
bgTexture = "FOO";
|
bgTexture = "FOO";
|
||||||
panel->setBackground(FGTextureManager::createTexture(bgTexture.c_str()));
|
panel->setBackground(FGTextureManager::createTexture(bgTexture.c_str()));
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << bgTexture );
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get multibackground if any...
|
// Get multibackground if any...
|
||||||
|
@ -692,49 +691,41 @@ readPanel (const SGPropertyNode * root)
|
||||||
string mbgTexture = root->getStringValue("multibackground[0]");
|
string mbgTexture = root->getStringValue("multibackground[0]");
|
||||||
if (!mbgTexture.empty()) {
|
if (!mbgTexture.empty()) {
|
||||||
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 0);
|
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 0);
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
|
|
||||||
|
|
||||||
mbgTexture = root->getStringValue("multibackground[1]");
|
mbgTexture = root->getStringValue("multibackground[1]");
|
||||||
if (mbgTexture.empty())
|
if (mbgTexture.empty())
|
||||||
mbgTexture = "FOO";
|
mbgTexture = "FOO";
|
||||||
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 1);
|
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 1);
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
|
|
||||||
|
|
||||||
mbgTexture = root->getStringValue("multibackground[2]");
|
mbgTexture = root->getStringValue("multibackground[2]");
|
||||||
if (mbgTexture.empty())
|
if (mbgTexture.empty())
|
||||||
mbgTexture = "FOO";
|
mbgTexture = "FOO";
|
||||||
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 2);
|
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 2);
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
|
|
||||||
|
|
||||||
mbgTexture = root->getStringValue("multibackground[3]");
|
mbgTexture = root->getStringValue("multibackground[3]");
|
||||||
if (mbgTexture.empty())
|
if (mbgTexture.empty())
|
||||||
mbgTexture = "FOO";
|
mbgTexture = "FOO";
|
||||||
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 3);
|
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 3);
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
|
|
||||||
|
|
||||||
mbgTexture = root->getStringValue("multibackground[4]");
|
mbgTexture = root->getStringValue("multibackground[4]");
|
||||||
if (mbgTexture.empty())
|
if (mbgTexture.empty())
|
||||||
mbgTexture = "FOO";
|
mbgTexture = "FOO";
|
||||||
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 4);
|
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 4);
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
|
|
||||||
|
|
||||||
mbgTexture = root->getStringValue("multibackground[5]");
|
mbgTexture = root->getStringValue("multibackground[5]");
|
||||||
if (mbgTexture.empty())
|
if (mbgTexture.empty())
|
||||||
mbgTexture = "FOO";
|
mbgTexture = "FOO";
|
||||||
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 5);
|
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 5);
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
|
|
||||||
|
|
||||||
mbgTexture = root->getStringValue("multibackground[6]");
|
mbgTexture = root->getStringValue("multibackground[6]");
|
||||||
if (mbgTexture.empty())
|
if (mbgTexture.empty())
|
||||||
mbgTexture = "FOO";
|
mbgTexture = "FOO";
|
||||||
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 6);
|
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 6);
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Set background texture to " << mbgTexture );
|
|
||||||
|
|
||||||
mbgTexture = root->getStringValue("multibackground[7]");
|
mbgTexture = root->getStringValue("multibackground[7]");
|
||||||
if (mbgTexture.empty())
|
if (mbgTexture.empty())
|
||||||
mbgTexture = "FOO";
|
mbgTexture = "FOO";
|
||||||
panel->setMultiBackground(FGTextureManager::createTexture(mbgTexture.c_str()), 7);
|
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.
|
// 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");
|
const SGPropertyNode * instrument_group = root->getChild("instruments");
|
||||||
if (instrument_group != 0) {
|
if (instrument_group != 0) {
|
||||||
int nInstruments = instrument_group->nChildren();
|
int nInstruments = instrument_group->nChildren();
|
||||||
|
@ -799,12 +790,12 @@ readPanel (const SGPropertyNode * root)
|
||||||
SG_LOG( SG_COCKPIT, SG_WARN, "Unknown special instrument found" );
|
SG_LOG( SG_COCKPIT, SG_WARN, "Unknown special instrument found" );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Skipping " << node->getName()
|
SG_LOG( SG_COCKPIT, SG_WARN, "Skipping " << node->getName()
|
||||||
<< " in instruments section" );
|
<< " in instruments section" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Done reading panel instruments" );
|
SG_LOG( SG_COCKPIT, SG_BULK, "Done reading panel instruments" );
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -258,7 +258,7 @@ FGMenuBar::destroy_menubar ()
|
||||||
// Delete all the character arrays
|
// Delete all the character arrays
|
||||||
// we were forced to keep around for
|
// we were forced to keep around for
|
||||||
// plib.
|
// 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 (i = 0; i < _char_arrays.size(); i++) {
|
||||||
for (int j = 0; _char_arrays[i][j] != 0; j++)
|
for (int j = 0; _char_arrays[i][j] != 0; j++)
|
||||||
free(_char_arrays[i][j]); // added with strdup
|
free(_char_arrays[i][j]); // added with strdup
|
||||||
|
@ -268,20 +268,20 @@ FGMenuBar::destroy_menubar ()
|
||||||
// Delete all the callback arrays
|
// Delete all the callback arrays
|
||||||
// we were forced to keep around for
|
// we were forced to keep around for
|
||||||
// plib.
|
// 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++)
|
for (i = 0; i < _callback_arrays.size(); i++)
|
||||||
delete[] _callback_arrays[i];
|
delete[] _callback_arrays[i];
|
||||||
|
|
||||||
// Delete all those bindings
|
// Delete all those bindings
|
||||||
SG_LOG(SG_GENERAL, SG_INFO, "Deleting bindings");
|
SG_LOG(SG_GENERAL, SG_BULK, "Deleting bindings");
|
||||||
map<string,vector<SGBinding *> >::iterator it;
|
map<string,vector<SGBinding *> >::iterator it;
|
||||||
for (it = _bindings.begin(); it != _bindings.end(); 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++ )
|
for ( i = 0; i < it->second.size(); i++ )
|
||||||
delete it->second[i];
|
delete it->second[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
SG_LOG(SG_GENERAL, SG_INFO, "Done.");
|
SG_LOG(SG_GENERAL, SG_BULK, "Done.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1596,9 +1596,9 @@ static struct {
|
||||||
void
|
void
|
||||||
fgInitCommands ()
|
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++) {
|
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,
|
globals->get_commands()->addCommand(built_ins[i].name,
|
||||||
built_ins[i].command);
|
built_ins[i].command);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue