getUid()
getType()
getLineId()
getStamp()
getMessageText()
getFilterAction()
getStepPart()
BuildForge::Services::DBO::Log
use BuildForge::Services;
$conn = new BuildForge::Services::Connection($hostname); $token = $conn->authUser($user, $pass); # Getting logs from existing builds. $project = new BuildForge::Services::DBO::Project($conn); $project->setName('Test Project'); $project->create(); $build = BuildForge::Services::DBO::Build->fire($conn, $project->getProjectId()); $results = $build->getResults(); $loglines1 = $results->[0]->getLogs(); $loglines2 = BuildForge::Services::DBO::Log->findByResult($conn, $results->[1]->getBuildId(), $results->[1]->getUid()); $line = $loglines1->[0];
# Getter / setter functions $uid = $line->getUid(); $type = $line->getType(); $lineNumber = $line->getLineId(); $timestamp = $line->getStamp(); $text = $line->getMessageText(); $lineMatchedTypeOfFilter = $line->getFilterAction(); $wasPartOfStepOutput = $line->getStepPart(); $conn->logout; $conn->close;
Log allows you to access a log line from the individual step results of a BuildForge build.
Returns a reference to an array of BuildForge::Services::DBO::Log objects corresponding to each individual line of output from the given step result.
A connected BuildForge::Services::Connection object.
The ID of the build the results are from (from $build->getBuildId()).
The ID of the step results to get the log lines from (from $result->getUid()).
getUid()
Returns the step results ID for the step results this log line belongs to.
getType()
Returns the type of log output it is. Possible values include 'AUTH', 'ENV', 'EXEC', 'FILT', 'MANIFEST', 'MKDIR', 'SET', and many others.
getLineId()
The line number of the log line entry.
getStamp()
The timestamp at which this log line was logged.
getMessageText()
The text of the log line.
getFilterAction()
If this is a 'FILT' line, the filter action that took place is stored here. Possible values and the filter actions they correspond to (see FilterPattern for more details):
'FAIL'
'FAIL_AND_HALT'
'CLEAR'
'CLEAR_AND_HALT'
'HALT'
'INCLUDE'
'WARNING'
'CLEAR_WARNING'
'CLEAR_WARNING_AND_HALT'
'NOTIFY_CHANGERS'
getStepPart()
Returns the block within the step command that this output log line relates to. 0 relates to pre-execution processing, 1 to the first block, etc. Any dot command takes place in its own block and non-dot commands are broken up into blocks by dot commands.
Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.