Multiline build status logs

Is there a possibility for build status message to be multiline ?

I mean logging @@continua[setBuildStatus value=‘my multiline message’]
I tried \n and <br> but it seems it does not work (stops showing at all).

Hi Michal,

The correct character is \n and this will work for log messages. e.g. @echo @@continua[message status='information' value='this is a multi-line\nmessage' ]. However, the build status is currently only showing the first line when the status is set by an action. We’ll correct this for the next version - which should be out in the next couple of days.

1 Like

A fix for this issue has been included in v1.9.2.895.

Hi, I installer the new version.
Does the new line character needs to be escaped ?

I have something like this:

@@continua[setBuildStatus value='Progress: 3/441
1:   100%  testCase1
2:   100%   testCase2
5:   0%   testCase3
7:   0%   testCase4']

And it seems to not display at all.

Yes, as \n. The command must be output as one line. e.g.

@@continua[setBuildStatus value='Progress: 3/441\nRunning(4):\n1:   100%  testCase1\n2:   100%   testCase2\n5:   0%   testCase3\n7:   0%   testCase4']

:ok_hand: works like a charm :smiley:

1 Like

OK, one more question.
I run also a powershell script, which prints out:

Running: C:\CI_AWS\Ws\211240\IBISPlus\Ecu\Bin\Release\Win32\UT_Acoustic.exe\nProgress: 1/126

But the \n is just printed in the build status, the break is not happening as in python od dll console output.
Any idea why ?

Hmm, seems I don’t need to escape in Powershell… :melting_face:

Hi Michal,

The newline needs to be output as \n to the console.

So, in PowerShell, you would write:

Write-Host "@@continua[setBuildStatus value='this is a multi-line\nstatus']";

In a batch file, you would write:

@echo @@continua[setBuildStatus value='this is a multi-line\nstatus']

In a C# console app you would write:

Console.WriteLine("@@continua[setBuildStatus value='this is a multi-line\\nstatus']");

In a Delphi app you would write:

writeln('@@continua[setBuildStatus value=''this is a multi-line\nstatus'']');