]> git.mxchange.org Git - flightgear.git/commitdiff
Use the log level environment already set up by David instead of mine
authorehofman <ehofman>
Mon, 22 Sep 2003 09:22:05 +0000 (09:22 +0000)
committerehofman <ehofman>
Mon, 22 Sep 2003 09:22:05 +0000 (09:22 +0000)
src/Main/main.cxx
src/Main/options.cxx

index f2de09b4fcf379ea6ac74b632fae84daf43c47fe..54c619d28f55fd61e110f8a1260ff9cb0974b790 100644 (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();
index 4f20adf115ef88912fa6740fdf841ae0c6124ea0..58901152bf4a9e0025b2a13deacbe6ee604ca3b5 100644 (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 },