I have a project with a long part of initialization. This is run on many different machines. Sometimes I need to log this part, sometimes I don't. To switch between logging or not logging I set a parameter in an ini-file.
In the logging-action-group I use this script: Action.HideActionFromLog=true (or false, depending on the parameter). So the action group and all elements are excluded from logging. The second time the project is run in the IDE the logging is as I whish. The delay of one run in the IDE is strange but OK for me.
My problem now is that the script is useless when the project is run with ATCMD. Is there a chance that the script will react to the "Action.HideActionFromLog" at once? Is it possible to save the project after running the project with ATCMD so that the parameter will work at least in the second run?
I added a small project with two action groups. One shall be logged the other not.
I have reproduced what your seeing in the IDE. The same issue will be causing what your seeing in the ATCMD run, which isn’t saving the value. I suspect you may have hit a wall in the design of the scripting, yet I will look into it and see what can be altered to make this work as expected.
There are two ways in which we can get you the result your looking for.
The first is to set the “Action.HideActionFromLog = true;” before the action is executed. Logging occurs just before the “BeforeAction” script. This means that the script “Action.HideActionFromLog = true;” will need to be called in an action prior. The way we got this to work was to give the action a parent action group, then to use the children action property to set the HideActionFromLog value.
The script in the parent action group would be: “Action.ChildActions(0).HideActionFromLog = true;”
Note that the the list is zero based, therefore the first child is at index 0.
Another option would be to see the “SuppressStatusMessages” option. This will mean that all status messages from the actions will not be shown in the logs. The action will still be logged as being run, however anything produced from the action will not be logged. This value can be set in the BeforeAction event for the current action.
Lastly I will note that live logging does working differently at the moment to the actual log view. I suggest turning off live logging to see the results of what would be actually stored in the logs.