NAME

BuildForge::Services::DBO::Log


SYNOPSIS

        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;


DESCRIPTION

Log allows you to access a log line from the individual step results of a BuildForge build.


METHODS

BuildForge::Services::DBO::Log->findByResult(connection, buildId, resultId)

Returns a reference to an array of BuildForge::Services::DBO::Log objects corresponding to each individual line of output from the given step result.

connection

A connected BuildForge::Services::Connection object.

buildId

The ID of the build the results are from (from $build->getBuildId()).

resultId

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):

F

'FAIL'

H

'FAIL_AND_HALT'

C

'CLEAR'

S

'CLEAR_AND_HALT'

I

'HALT'

A

'INCLUDE'

N

'WARNING'

U

'CLEAR_WARNING'

G

'CLEAR_WARNING_AND_HALT'

R

'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

Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.