I guess that checking for file content can be tricky. Maybe linebreaks in the file, or encoding or something makes the 'contains' expression risky to use. I don't know.
I tried another way. Basically i send the file test.xt if there is any errorOutput, and if there is no error, I send a bogus filename that does not exist. If it doesn't exist, no attachment is being sent. It looks like this:
If variable errorOutput is empty, send the file with name 'NoFile'. It doesn't exist, so nothing is sent.
If errorOutput <> empty, send the file test.txt, which would be the log file in your case. It seemed to work in my test.
You could also check the modified date of the logfile. If modified date is greater than the start time of the current job run, there are errors. (unless you write to log anyway...)
thomas
Edited by user
2020-01-30T21:41:22Z
|
Reason: Not specified