Used by Build object. Represents the collection of log messages in the parent object (i.e. build) and includes functions to select log messages in that collection. The log messages are sorted by date ordertime stamp.
Properties
Name | Description | Return Type | Usage Example |
---|
Count | Returns the number of log messages in the collection | Integer | $Build.ErrorAndWarningLogMessages.Count$ | 3 |
Functions
Name and Parameters | Description | Return Type | Usage Example |
---|
First() | Gets first log message from the collection. |
StageLog 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. |
StageStagesIsFailure TrueAgentName$ciagent01Create Directory" |
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. |
StageStagesErrorAndWarningLogMessages.Item(1).Name$ | "Test" |
Last() | Gets last log message from the collection. |
StageStagesErrorAndWarningLogMessages.Last(). |
Name$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. |
StageStagesIsSuccessful TrueFinished$TimeStamp$ | "13/11/2018 01:35:03" |
Select(string property) | Returns a string collection of property values. | String Collection | $Build. |
StageNameStageName).Join(",")$ | "Build, Test, Deploy" |
ToLines() | Gets the list of log messages as text with one message per line. | String | $Build.ErrorAndWarningLogMessages.ToLines().Name$ | "ToLinesExample" |
ToText() | Gets the list of log messages as a list of strings | String Collection | $Build.TailLogMessages.Select(Name).ToText()$ | "ToTextExample" |
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. |
StagesHasWarnings True
Operators
...