The environment variable LogMacroDir points to the directory where the logging output is stored:
senv LogMacroDir /home/p99user/spock_session_log
To enable the logging of the Macro commands and their printouts:
senv LogMacro True
LogMacroMode specifies whether a new file is created for each command:
senv LogMacroMode False
With these settings this file is created:
/home/p99user/spock_seesion_log/session_p99_door_<TANGO_HOST>.01.log
All Macro output and commands is appended to this file, including a time stamp for each entry. The idea is to collect logging information in a single file, no matter how often spock has been started.
If senv LogMacroMode True has been issued,
for each Macro a new log file is created.
The flags can also be set with a macro:
logmacro?
Docstring:
Syntax:
logmacro <offon> <mode>
Turn on/off logging of the spock output.
.. note::
The logmacro class has been included in Sardana
on a provisional basis. Backwards incompatible changes
(up to and including its removal) may occur if
deemed necessary by the core developers
Parameters:
offon : (Boolean) Unset/Set logging
mode : (Integer) Mode: 0 append, 1 new file