Open teresanunez opened 4 years ago
Today we looked at it quickly with Teresa and here are the first ideas on how to implement it:
LogMacroManager
is currently instantiated and enabled/disabled in MacroExecutor.runMacro()
Macro.prepare()
within the scope covered by the LogMacroManager
we would need to enable it already in MacroExecutor.__runXMLMacro()
MacroExecutor._prepareXMLMacro()
contains Macro
object creation and call to the Macro.prepare()
. This method would need to be split in two so we have the Macro
object creaeted before in order to pass it to the LogMacroManager
Hi, the logging in a file (activated via the environment variable LogMacro) only affects to the run method of the macro, but not to the prepare one. What is done in prepare is not in the logging file. This also makes that if a macro is called from the prepare method of another macro, this called macro is also not logged. These both facts can be reproduced implementing the prepare method of a macro with same spock printout and running a macro from there. It happens in the python2 and python3 versions of sardana.