Dump more config state at startup.
Ensure that log files capture enough config state to debug path/search issues. Easy to expand this mechanism now to record anything similar.
This commit is contained in:
parent
9ccf159f81
commit
e08eb7457e
3 changed files with 19 additions and 0 deletions
|
@ -527,6 +527,20 @@ bool fgInitGeneral() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Write various configuraton values out to the logs
|
||||||
|
void fgOutputSettings()
|
||||||
|
{
|
||||||
|
SG_LOG( SG_GENERAL, SG_INFO, "Configuration State" );
|
||||||
|
SG_LOG( SG_GENERAL, SG_INFO, "======= ==============" );
|
||||||
|
|
||||||
|
SG_LOG( SG_GENERAL, SG_INFO, "aircraft-dir = " << '"' << fgGetString("/sim/aircraft-dir") << '"' );
|
||||||
|
SG_LOG( SG_GENERAL, SG_INFO, "fghome-dir = " << '"' << globals->get_fg_home() << '"');
|
||||||
|
SG_LOG( SG_GENERAL, SG_INFO, "aircraft-dir = " << '"' << fgGetString("/sim/aircraft-dir") << '"');
|
||||||
|
|
||||||
|
SG_LOG( SG_GENERAL, SG_INFO, "aircraft-search-paths = \n\t" << simgear::strutils::join(globals->get_aircraft_paths(), "\n\t") );
|
||||||
|
SG_LOG( SG_GENERAL, SG_INFO, "scenary-search-paths = \n\t" << simgear::strutils::join(globals->get_fg_scenery(), "\n\t") );
|
||||||
|
}
|
||||||
|
|
||||||
// This is the top level init routine which calls all the other
|
// This is the top level init routine which calls all the other
|
||||||
// initialization routines. If you are adding a subsystem to flight
|
// initialization routines. If you are adding a subsystem to flight
|
||||||
// gear, its initialization call should located in this routine.
|
// gear, its initialization call should located in this routine.
|
||||||
|
|
|
@ -40,6 +40,9 @@ void fgInitHome();
|
||||||
bool fgInitConfig ( int argc, char **argv );
|
bool fgInitConfig ( int argc, char **argv );
|
||||||
|
|
||||||
|
|
||||||
|
// log various settings / configuration state
|
||||||
|
void fgOutputSettings();
|
||||||
|
|
||||||
// Initialize the localization
|
// Initialize the localization
|
||||||
SGPropertyNode *fgInitLocale(const char *language);
|
SGPropertyNode *fgInitLocale(const char *language);
|
||||||
|
|
||||||
|
|
|
@ -357,6 +357,8 @@ int fgMainInit( int argc, char **argv ) {
|
||||||
ATIScreenSizeHack();
|
ATIScreenSizeHack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fgOutputSettings();
|
||||||
|
|
||||||
// pass control off to the master event handler
|
// pass control off to the master event handler
|
||||||
int result = fgOSMainLoop();
|
int result = fgOSMainLoop();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue