jetbrains.buildServer.agent
Interface BuildProgressLogger

All Superinterfaces:
JUnitLogger, SimpleBuildLogger
All Known Subinterfaces:
FlowLogger

public interface BuildProgressLogger
extends SimpleBuildLogger, JUnitLogger

Logger to use for messages sent to the build log on server.


Method Summary
 void activityFinished(java.lang.String activityName, java.lang.String activityType)
          Finishes block
 void activityStarted(java.lang.String activityName, java.lang.String activityType)
          Starts new block in the build log.
 void activityStarted(java.lang.String activityName, java.lang.String activityDescription, java.lang.String activityType)
          Starts new block in the build log.
 void buildFailureDescription(java.lang.String message)
          Allows to fail build unconditionally.
 void flush()
          Flushes messages buffer.
 java.lang.String getFlowId()
          Returns flow id of this logger.
 FlowLogger getFlowLogger(java.lang.String flowId)
          Returns logger for specified flow id, or creates new logger if there were no loggers for this flow id yet.
 FlowLogger getThreadLogger()
          Returns flow logger for current thread.
 void ignoreServiceMessages(java.lang.Runnable runnable)
          Run given block in a mode when service messages are not parsed and ignored, both on agent and server
 void internalError(java.lang.String type, java.lang.String message, java.lang.Throwable throwable)
          Reports internal error, i.e.
 void logBuildProblem(BuildProblemData buildProblem)
          Logs build problem that causes build failure on server
 void logMessage(BuildMessage1 message)
          Logs specified build message as is
 void progressFinished()
          Finishes current progress block.
 void progressStarted(java.lang.String message)
          Starts new progress block.
 void targetFinished(java.lang.String targetName)
          Finishes Ant-like target in the build log.
 void targetStarted(java.lang.String targetName)
          Starts Ant-like target in the build log.
 
Methods inherited from interface jetbrains.buildServer.agent.SimpleBuildLogger
error, exception, message, progressMessage, warning
 
Methods inherited from interface jetbrains.buildServer.agent.JUnitLogger
logComparisonFailure, logSuiteFinished, logSuiteFinished, logSuiteStarted, logSuiteStarted, logTestFailed, logTestFailed, logTestFinished, logTestFinished, logTestIgnored, logTestStarted, logTestStarted, logTestStdErr, logTestStdOut
 

Method Detail

activityStarted

void activityStarted(java.lang.String activityName,
                     java.lang.String activityType)
Starts new block in the build log.

Parameters:
activityName - name of the block
activityType - for standard block type refer to BLOCK_TYPE_* constants DefaultMessagesInfo, in case of non-standard block type use prefix CUSTOM_

activityStarted

void activityStarted(java.lang.String activityName,
                     java.lang.String activityDescription,
                     java.lang.String activityType)
Starts new block in the build log.

Parameters:
activityName - name of the block
activityDescription - block description
activityType - for standard block type refer to BLOCK_TYPE_* constants DefaultMessagesInfo, in case of non-standard block type use prefix CUSTOM_

activityFinished

void activityFinished(java.lang.String activityName,
                      java.lang.String activityType)
Finishes block

Parameters:
activityName - name of the block
activityType - type of the block

targetStarted

void targetStarted(java.lang.String targetName)
Starts Ant-like target in the build log.

Parameters:
targetName - name of the target

targetFinished

void targetFinished(java.lang.String targetName)
Finishes Ant-like target in the build log.

Parameters:
targetName - name of the target

buildFailureDescription

void buildFailureDescription(java.lang.String message)
Allows to fail build unconditionally. Message should be short - used in build status text

Parameters:
message - short message describing reason of the build failure (shown in red and used in status text)

internalError

void internalError(java.lang.String type,
                   java.lang.String message,
                   java.lang.Throwable throwable)
Reports internal error, i.e. error which should mark build as "failed to start".

Parameters:
type - the error type
message - the description
throwable - the corresponding exception (nullable)
Since:
6.0

progressStarted

void progressStarted(java.lang.String message)
Starts new progress block.

Parameters:
message - progress message

progressFinished

void progressFinished()
Finishes current progress block.


logMessage

void logMessage(BuildMessage1 message)
Logs specified build message as is

Parameters:
message - build message to log

flush

void flush()
Flushes messages buffer.

Specified by:
flush in interface JUnitLogger

ignoreServiceMessages

void ignoreServiceMessages(java.lang.Runnable runnable)
Run given block in a mode when service messages are not parsed and ignored, both on agent and server

Since:
6.0

getFlowLogger

FlowLogger getFlowLogger(java.lang.String flowId)
Returns logger for specified flow id, or creates new logger if there were no loggers for this flow id yet.

Parameters:
flowId - id of the messages flow
Returns:
see above
Since:
6.0

getThreadLogger

FlowLogger getThreadLogger()
Returns flow logger for current thread. This is equivalent to calling getFlowLogger(String) with flow id generated based on current Thread object.

Returns:
see above.
Since:
6.0

getFlowId

java.lang.String getFlowId()
Returns flow id of this logger. Flow id is an id of the messages flow. If you need to log messages from separate independent threads, you should generate flow id for each thread and use logger with corresponding flow id. See also getThreadLogger().

Returns:
see above
Since:
6.0

logBuildProblem

void logBuildProblem(BuildProblemData buildProblem)
Logs build problem that causes build failure on server

Parameters:
buildProblem - build problem
Since:
7.1