]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[bos #29467] [EDF] (2022-T1) Logging of SALOME usage: specific log in SALOME
authorjfa <jfa@opencascade.com>
Thu, 26 May 2022 11:35:23 +0000 (14:35 +0300)
committerjfa <jfa@opencascade.com>
Thu, 26 May 2022 11:35:23 +0000 (14:35 +0300)
bin/appliskel/.salome-completion.sh
bin/launchConfigureParser.py
bin/runSalomeCommon.py

index e95de76a942584196119ed532fa89a9fb84d9483..5e788f477177a8134baa6b074adb349cc198505f 100755 (executable)
@@ -71,7 +71,7 @@ _salome()
         if [[ "$cur" == -* ]]; then
             case $command in
                 start)
-                    options='-t --terminal -g --gui -d --show-desktop= -o --hide-desktop -b --batch -l --logger -f --log-file= -r --resources= -x --xterm -m --modules= -e --embedded= -s --standalone= -p --portkill -k --killall -i --interp= -z --splash= -c --catch-exceptions= --print-port --nosave-config --pinter --ns-port-log= --test= --play= --gdb-session --ddd-session --valgrind-session -w --shutdown-servers= --foreground= --wake-up-session --server-launch-mode= --port= --version -h --help --with-mpi-module= --config='
+                    options='-t --terminal -g --gui -d --show-desktop= -o --hide-desktop -b --batch -l --logger -f --log-file= --gui-log-file= -r --resources= -x --xterm -m --modules= -e --embedded= -s --standalone= -p --portkill -k --killall -i --interp= -z --splash= -c --catch-exceptions= --print-port --nosave-config --pinter --ns-port-log= --test= --play= --gdb-session --ddd-session --valgrind-session -w --shutdown-servers= --foreground= --wake-up-session --server-launch-mode= --port= --version -h --help --with-mpi-module= --config='
                     ;;
                 shell)
                     options='-h --help -p --port= -m --machine= -d --directory= -u --user= --with-mpi-module= --config='
index 7b24312a56dfe3a3f08041f487dd15c3b1069b76..751ecee3ba7afb7806c9872daa3ef3084f818b58 100644 (file)
@@ -584,6 +584,13 @@ Python file arguments, if any, must be comma-separated (without blank characters
                       dest="log_file",
                       help=help_str)
 
+    # Use gui-log-file for specific user actions in GUI. Default: nothing.
+    help_str = "Log specific user actions in GUI to <gui_log_file>"
+    pars.add_argument("--gui-log-file",
+                      metavar="<gui_log_file>",
+                      dest="gui_log_file",
+                      help=help_str)
+
     # Configuration XML file. Default: see defaultUserFile() function
     help_str = "Parse application settings from the <file> "
     help_str += "instead of default %s" % defaultUserFile()
@@ -997,6 +1004,7 @@ def get_env(appname=salomeappname, cfgname=salomecfgname, exeName=None, keepEnvi
     args["session_gui"] = False
     args[batch_nam] = False
     args["study_hdf"] = None
+    args["gui_log_file"] = None
     if cmd_opts.gui is not None:
         args[gui_nam] = cmd_opts.gui
     if cmd_opts.batch is not None:
@@ -1024,6 +1032,10 @@ def get_env(appname=salomeappname, cfgname=salomecfgname, exeName=None, keepEnvi
         else:
             args[file_nam] = [cmd_opts.log_file]
 
+    # GUI Log file
+    if cmd_opts.gui_log_file is not None:
+        args["gui_log_file"] = cmd_opts.gui_log_file
+
     # Naming Service port log file
     if cmd_opts.ns_port_log_file is not None:
         args["ns_port_log_file"] = cmd_opts.ns_port_log_file
index bbe117f7fda3d96da7c0ec100c30492613e6be5f..a31aee6d9d96845c0caa9d7f00ae4cfcfa6545f5 100755 (executable)
@@ -301,6 +301,10 @@ class CommonSessionServer(Server):
                     self.SCMD2+=['--pyscript=%s'%(msg)]
                     pass
                 pass
+                if self.args['gui_log_file'] is not None:
+                    self.SCMD2+=['--gui-log-file=%s'%self.args['gui_log_file']]
+                    pass
+                pass
             pass
         if self.args['noexcepthandler']:
             self.SCMD2+=['--no-exception-handler']