Hi - In our build system, we use the OnFailure task to send an email to the crew that the build has failed. This email should contain the reason why the build failed - we are currently logging each action to a variable %ActionLog%, and the idea is that ActionLog will then contain the log from the “offending” action.The problem is that sometimes I forget to store the log in this variable, and so we end up with the wrong data output.Is there an automatic way in FB to get the last log before the switch to OnFailure?
You could use the option on the 'Export Log' action to 'Only Include Error Actions in Log'. This should give you just the failed actions and their output in the log file. This is how I do it, and then I attach the html log file to the email that is sent from the OnFailure action list. (You could probably also export the log to text, read the text file to a variable and then use the variable as the body of the email, too)
Good luck!
Al