1
0
Fork 0

Use the log level environment already set up by David instead of mine

This commit is contained in:
ehofman 2003-09-22 09:22:05 +00:00
parent e0dda6ad52
commit 7d6cafba6e
2 changed files with 11 additions and 4 deletions

View file

@ -1025,8 +1025,6 @@ static void fgMainLoop( void ) {
SGTime *t = globals->get_time_params();
sglog().setLogLevels( SG_ALL, (sgDebugPriority)fgGetInt("/sim/log-level") );
SGLocation * acmodel_location = 0;
if(cur_fdm_state->getACModel() != 0) {
acmodel_location = (SGLocation *) cur_fdm_state->getACModel()->get3DModel()->getSGLocation();

View file

@ -181,7 +181,7 @@ fgSetDefaults ()
#else
fgSetString("/sim/startup/browser-app", "webrun.bat");
#endif
fgSetInt("/sim/log-level", SG_WARN);
fgSetString("/sim/logging/priority", "warn");
// Features
fgSetBool("/sim/hud/antialiased", false);
@ -956,6 +956,15 @@ fgOptTraceRead( const char *arg )
return FG_OPTIONS_OK;
}
static int
fgOptLogLevel( const char *arg )
{
fgSetString("/sim/logging/classes", "all");
fgSetString("/sim/logging/priority", arg);
return FG_OPTIONS_OK;
}
static int
fgOptTraceWrite( const char *arg )
{
@ -1352,7 +1361,7 @@ struct OptionDesc {
#endif
{"trace-read", true, OPTION_FUNC, "", false, "", fgOptTraceRead },
{"trace-write", true, OPTION_FUNC, "", false, "", fgOptTraceWrite },
{"log-level", true, OPTION_INT, "/sim/log-level", false, "", 0 },
{"log-level", true, OPTION_FUNC, "", false, "", fgOptLogLevel },
{"view-offset", true, OPTION_FUNC, "", false, "", fgOptViewOffset },
{"visibility", true, OPTION_FUNC, "", false, "", fgOptVisibilityMeters },
{"visibility-miles", true, OPTION_FUNC, "", false, "", fgOptVisibilityMiles },