Merge branch '175-add-user-to-log-message' into 'Pmodules-1.0'

Resolve "add user to log message"

See merge request Pmodules/src!148
This commit is contained in:
2022-11-29 13:46:51 +00:00
3 changed files with 20 additions and 7 deletions
+8
View File
@@ -1,5 +1,13 @@
# Changelog of Pmodules
## Version 1.0.0rc14
* **modulecmd**
* format of log messages changed, now the message includes the
full path of the modulefile and the user name.
## Version 1.0.0rc13
* same as 1.0.0rc12 but compiled on SL6
## Version 1.0.0rc12
* **modulecmd**
* fix DefaultGroups: Undefined variable in init/csh
+11 -6
View File
@@ -562,15 +562,20 @@ subcommand_load() {
if [[ -n "${error}" ]]; then
echo "${error}" 1>&2
fi
local msg=$(printf "%s %s: %s -- %s" \
"${CMD}" 'load' \
"${rel_stage} module has been loaded" \
"${m}")
local msg=''
if [[ ${verbosity_lvl} != silent ]] && \
[[ ${rel_stage} != stable ]]; then
[[ ${rel_stage} != stable ]]; then
msg=$(printf "%s %s: %s -- %s" \
"${CMD}" 'load' \
"${rel_stage} module has been loaded" \
"${m}")
std::info "%s" "${msg}"
fi
msg=$(printf "%s: %s %s %s" \
'load' \
"modulefile=${current_modulefile}" \
"rel-stage=${rel_stage}" \
"user=${USER}")
${logger} -t Pmodules "${msg}"
done
# fix LOADEDMODULES
+1 -1
View File
@@ -4,6 +4,6 @@ findutils 4.7.0
getopt 1.1.6
gettext 0.21
modules 3.2.10.1
Pmodules 1.0.0rc13
Pmodules 1.0.0rc14
Tcl 8.6.10
tcllib 1.20