]> 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)
committerPascal Obry <pascal.obry@edf.fr>
Tue, 5 Sep 2023 13:34:11 +0000 (15:34 +0200)
bin/appliskel/.salome-completion.sh
bin/launchConfigureParser.py
bin/runSalomeCommon.py

index 000e18cf9332ee577a9b007ab03a0029e6d826a0..48ad2df01f98c72f4e570691ac306e7b8d690436 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 3609afa8c4fafdb7caa01f9aafa64020b1d4fc3c..26b0913c076f08018c43a05a52e757d133f1ef71 100644 (file)
@@ -585,6 +585,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()
@@ -1009,6 +1016,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:
@@ -1036,6 +1044,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 9a4d68629f1e3ce8d8e5a0f849f05a1d5a7269b8..7f3a05e0e0aebd643b526e7cd84a007dc4948a43 100755 (executable)
@@ -331,6 +331,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']