A user is experiencing extra blank lines in the Auto Action output log file when running with the .NET engine. They are seeking advice on how to suppress or clean up these lines automatically. Other users suggest checking for newlines in the messages and the use of string.join which could potentially add additional newlines. The post ends with a question about best practices surrounding newlines in messages.
Read the entire ‘Troubleshooting Blank Lines in ControlUp Auto Action Output File’ thread below:
Hi all,
I’m seeing extra blank lines in the Auto Action output log file when the SBA is executed with the .NET engine. The script itself does not add blank lines, but the output file (for example, run.log or log.txt) attached to the Auto-Action Output mail consistently shows additional line spaces between log entries.
Question: Is this expected behavior for SBAs running under the .NET engine?
Has anyone else observed this, and is there a recommended way to suppress or clean up these extra blank lines automatically?
Technical context:
- The script uses standard PowerShell logging mechanism via custom function(Write-Log), which writes one entry per line.
- When the log file is opened on the server, it displays correctly without any extra blank lines — each log entry appears as expected.
- When run interactively or with the PowerShell engine, the output is as expected (no extra blank lines).
- When run as an Auto Action with the .NET engine, the output file has double spacing (blank lines between entries).
Would appreciate any insights or best practices from the community!
Thanks in advance.
Do you add newlines to the end of your messages?
Each message is added to an array. That array is then converted into a single output string via string.join with a newline as the separator character.
So I assume that if the message already contains a newline, string.join would add another
Continue reading and comment on the thread ‘Troubleshooting Blank Lines in ControlUp Auto Action Output File’. Not a member? Join Here!
Categories: All Archives, ControlUp Scripts & Triggers
