Package jetbrains.buildServer.agent
Interface BuildProgressLogger
-
- All Superinterfaces:
JUnitLogger
,SimpleBuildLogger
- All Known Subinterfaces:
FlowLogger
- All Known Implementing Classes:
BaseServerLoggerFacade
,NullBuildProgressLogger
,ServerLoggerFacade
,ServerLoggerFacade
public interface BuildProgressLogger extends SimpleBuildLogger, JUnitLogger
Logger to use for messages sent to the build log on server.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
activityFinished(String activityName, String activityType)
Finishes blockvoid
activityStarted(String activityName, String activityType)
Starts new block in the build log.void
activityStarted(String activityName, String activityDescription, String activityType)
Starts new block in the build log.void
buildFailureDescription(String message)
Allows to fail build unconditionally.void
flush()
Flushes messages buffer.String
getFlowId()
Returns flow id of this logger.FlowLogger
getFlowLogger(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(Runnable runnable)
Run given block in a mode when service messages are not parsed and ignored, both on agent and servervoid
internalError(String type, String message, Throwable throwable)
Reports internal error, i.e.void
logBuildProblem(BuildProblemData buildProblem)
Logs build problem that causes build failure on servervoid
logMessage(BuildMessage1 message)
Logs specified build message as isvoid
progressFinished()
Finishes current progress block.void
progressStarted(String message)
Starts new progress block.void
targetFinished(String targetName)
Finishes Ant-like target in the build log.void
targetStarted(String targetName)
Starts Ant-like target in the build log.-
Methods inherited from interface jetbrains.buildServer.agent.JUnitLogger
logComparisonFailure, logSuiteFinished, logSuiteFinished, logSuiteStarted, logSuiteStarted, logTestFailed, logTestFailed, logTestFinished, logTestFinished, logTestIgnored, logTestStarted, logTestStarted, logTestStdErr, logTestStdOut
-
Methods inherited from interface jetbrains.buildServer.agent.SimpleBuildLogger
debug, error, exception, message, message, progressMessage, warning
-
-
-
-
Method Detail
-
activityStarted
void activityStarted(String activityName, String activityType)
Starts new block in the build log.- Parameters:
activityName
- name of the blockactivityType
- for standard block type refer to BLOCK_TYPE_* constants jetbrains.buildServer.messages.DefaultMessagesInfo, in case of non-standard block type use prefix CUSTOM_
-
activityStarted
void activityStarted(String activityName, String activityDescription, String activityType)
Starts new block in the build log.- Parameters:
activityName
- name of the blockactivityDescription
- block descriptionactivityType
- for standard block type refer to BLOCK_TYPE_* constants jetbrains.buildServer.messages.DefaultMessagesInfo, in case of non-standard block type use prefix CUSTOM_
-
activityFinished
void activityFinished(String activityName, String activityType)
Finishes block- Parameters:
activityName
- name of the blockactivityType
- type of the block
-
targetStarted
void targetStarted(String targetName)
Starts Ant-like target in the build log.- Parameters:
targetName
- name of the target
-
targetFinished
void targetFinished(String targetName)
Finishes Ant-like target in the build log.- Parameters:
targetName
- name of the target
-
buildFailureDescription
void buildFailureDescription(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(String type, String message, Throwable throwable)
Reports internal error, i.e. error which should mark build as "failed to start".- Parameters:
type
- the error typemessage
- the descriptionthrowable
- the corresponding exception (nullable)- Since:
- 6.0
-
progressStarted
void progressStarted(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 interfaceJUnitLogger
-
ignoreServiceMessages
void ignoreServiceMessages(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(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 callinggetFlowLogger(String)
with flow id generated based on current Thread object.- Returns:
- see above.
- Since:
- 6.0
-
getFlowId
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 alsogetThreadLogger()
.- 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
-
-