From: jfa Date: Thu, 26 May 2022 11:35:23 +0000 (+0300) Subject: [bos #29467] [EDF] (2022-T1) Logging of SALOME usage: specific log in SALOME X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a292df6cb6dac49b017dda1608b1a69b7227dac;p=modules%2Fkernel.git [bos #29467] [EDF] (2022-T1) Logging of SALOME usage: specific log in SALOME --- diff --git a/bin/appliskel/.salome-completion.sh b/bin/appliskel/.salome-completion.sh index e95de76a9..5e788f477 100755 --- a/bin/appliskel/.salome-completion.sh +++ b/bin/appliskel/.salome-completion.sh @@ -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=' diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index 7b24312a5..751ecee3b 100644 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -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 " + pars.add_argument("--gui-log-file", + metavar="", + dest="gui_log_file", + help=help_str) + # Configuration XML file. Default: see defaultUserFile() function help_str = "Parse application settings from the " 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 diff --git a/bin/runSalomeCommon.py b/bin/runSalomeCommon.py index bbe117f7f..a31aee6d9 100755 --- a/bin/runSalomeCommon.py +++ b/bin/runSalomeCommon.py @@ -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']