@@ -17,8 +17,8 @@ configuration that traces every call to a modulefile evaluation.
1717.. literalinclude :: ../../example/log-module-commands/siteconfig.tcl
1818 :language: tcl
1919 :caption: siteconfig.tcl
20- :lines: 13-41
21- :lineno-start: 13
20+ :lines: 26-54
21+ :lineno-start: 26
2222
2323This code defines a ``logModfileInterp `` procedure which is set to be
2424evaluated after each evaluation of the ``execute-modulefile `` procedure with
@@ -32,19 +32,28 @@ following line:
3232
3333.. literalinclude :: ../../example/log-module-commands/siteconfig.tcl
3434 :language: tcl
35- :lines: 23-24
36- :lineno-start: 23
35+ :lines: 36-37
36+ :lineno-start: 36
37+
38+ In the proposed code, log entries are formatted as a JSON record which is
39+ convenient to push these logs in a search and analytics engine like
40+ `Elasticsearch `_ or `Splunk `_. Such tools help to globally monitor the whole
41+ set of log entries produced from thousands of computing nodes.
42+
43+ .. literalinclude :: ../../example/log-module-commands/siteconfig.tcl
44+ :language: tcl
45+ :lines: 47-49
46+ :lineno-start: 47
3747
38- In the proposed code, the :command: `logger ` command is run to generate a log
39- message. Log entries are formatted as a JSON record which is convenient to
40- push these logs in a search and analytics engine like `Elasticsearch `_ or
41- `Splunk `_. Such tools help to globally monitor the whole set of log entries
42- produced from thousands of computing nodes.
48+ The :command: `logger ` command is run to generate the log message. This is done
49+ through a specific ``execLogger `` procedure ensuring that the current user
50+ environment does not confuse :command: `logger ` with unexpected version of the
51+ libraries it requires.
4352
4453.. literalinclude :: ../../example/log-module-commands/siteconfig.tcl
4554 :language: tcl
46- :lines: 34-36
47- :lineno-start: 34
55+ :lines: 13-24
56+ :lineno-start: 13
4857
4958Example code also defines a ``logModuleCmd `` procedure which is set to be
5059evaluated after each evaluation of the ``module `` and the ``ml `` procedures
@@ -53,8 +62,8 @@ with `trace`_ Tcl command.
5362.. literalinclude :: ../../example/log-module-commands/siteconfig.tcl
5463 :language: tcl
5564 :caption: siteconfig.tcl
56- :lines: 43-63
57- :lineno-start: 43
65+ :lines: 56-76
66+ :lineno-start: 56
5867
5968.. note ::
6069
0 commit comments