Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

NameDescriptionReturn TypeUsage Example
CountReturns the number of log messages in the collectionInteger$Build.ErrorAndWarningLogMessages.Count$3


Functions

Name and ParametersDescriptionReturn TypeUsage Example
First()Gets first log message from the collection.
Stage
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.

Stage
Log Message$Build.
Stages
TailLogMessages.First("
IsFailure
Type", Equals,
True
Warning).
AgentName$
ActionName$"
ciagent01
Create 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.
Stage
Log Message$Build.
Stages
ErrorAndWarningLogMessages.Item(1).Name$"Test"
Last()Gets last log message from the collection.
Stage
Log Message$Build.
Stages
ErrorAndWarningLogMessages.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.
Stage
Log Message$Build.
Stages
TailLogMessages.Last("
IsSuccessful
ActionName", Equals,
True
FinalBuilder).
Finished$
TimeStamp$"13/11/2018 01:35:03"
Select(string property)Returns a string collection of property values.String Collection$Build.
Stage
TailLogMessages.Select(
Name
StageName).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 stringsString 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.
Stages
TailLogMessages.Where("
HasWarnings
StageName", Equals,
True
"Build").Count$2


Anchor
operators
operators
Operators

...