]> git.mxchange.org Git - flightgear.git/commitdiff
Add a logging reinit command wrapper so that an external script can set
authorcurt <curt>
Mon, 24 Nov 2003 01:49:04 +0000 (01:49 +0000)
committercurt <curt>
Mon, 24 Nov 2003 01:49:04 +0000 (01:49 +0000)
up the desired logging configuration and kick off a logging session
remotely.

src/Main/fg_commands.cxx

index 5fef48aee532ae6120de3df51c83b4c4b2650632..ff079276e6d134c2e8ac88d9e7b2446fc4761b75 100644 (file)
 #include <Time/tmp.hxx>
 
 #include "fg_init.hxx"
+#include "fg_io.hxx"
 #include "fg_commands.hxx"
 #include "fg_props.hxx"
+#include "globals.hxx"
+#include "logger.cxx"
+#include "util.hxx"
+#include "viewmgr.hxx"
 
 SG_USING_STD(string);
 SG_USING_STD(ifstream);
 SG_USING_STD(ofstream);
 
-#include "fg_props.hxx"
-#include "fg_io.hxx"
-#include "globals.hxx"
-#include "util.hxx"
-#include "viewmgr.hxx"
-
 
 \f
 ////////////////////////////////////////////////////////////////////////
@@ -837,6 +836,20 @@ do_property_randomize (const SGPropertyNode * arg)
 }
 
 
+/**
+ * Built-in command: Show an XML-configured dialog.
+ *
+ * dialog-name: the name of the GUI dialog to display.
+ */
+static bool
+do_data_logging_commit (const SGPropertyNode * arg)
+{
+    FGLogger *log = (FGLogger *)globals->get_subsystem("logger");
+    log->reinit();
+    return true;
+}
+
+
 /**
  * Built-in command: Show an XML-configured dialog.
  *
@@ -1043,6 +1056,7 @@ static struct {
     { "property-scale", do_property_scale },
     { "property-cycle", do_property_cycle },
     { "property-randomize", do_property_randomize },
+    { "data-logging-commit", do_data_logging_commit },
     { "dialog-show", do_dialog_show },
     { "dialog-close", do_dialog_close },
     { "dialog-show", do_dialog_show },