First() |
Gets first log message from the collection. |
Log Message |
$Build.ErrorAndWarningLogMessages.First().StageName$ |
"Build" |
First(string property, string operator, string value, bool ignoreCase) |
Gets first matching log message from the collection for given property using given operator. See list of valid operators below. |
Log Message |
$Build.TailLogMessages.First("Type", Equals, Information).ActionName$ |
"Pin Build" |
IsEmpty() |
Returns true if collection is empty. |
Boolean |
$Build.ErrorAndWarningLogMessages.IsEmpty()$ |
True |
Item(integer index) |
Gets a log message in the collection by zero-based index number. |
Log Message |
$Build.ErrorAndWarningLogMessages.Item(1).Name$ |
"Test" |
Last() |
Gets last log message from the collection. |
Log Message |
$Build.ErrorAndWarningLogMessages.Last().StageName$ |
"Deploy" |
Last(string property, string operator, string value, bool ignoreCase) |
Gets last matching log message from the collection for given property using given operator. See list of valid operators below. |
Log Message |
$Build.TailLogMessages.Last("ActionName", Equals, Stop [Stage as success]).TimeStamp$ |
"13/11/2018 01:35:03" |
Select(string property) |
Returns a string collection of property values. |
String Collection |
$Build.TailLogMessages.Select(StageName).Join(",")$ |
"Build, Test, Deploy" |
ToLines() |
Gets the list of log messages as a list of strings. |
String |
$Build.ErrorAndWarningLogMessages.ToLines().IsEmpty()$ |
False |
ToText() |
Gets the list of log messages as text with one message per line. |
String Collection |
$Build.TailLogMessages.ToText().Contains("Deploy")$ |
True |
Where(string property, string operator, string value, bool ignoreCase) |
Gets matching log messages from collection for given property using given operator. See list of valid operators below. |
Log Messages Collection |
$Build.TailLogMessages.Where("StageName", Equals, "Build").Count$ |
2 |