Class BrokenLogStorage
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.log.BrokenLogStorage
-
- All Implemented Interfaces:
LogStorage
@Restricted(org.kohsuke.accmod.restrictions.Beta.class) public final class BrokenLogStorage extends Object implements LogStorage
Placeholder for storage broken by some kind of access error.
-
-
Constructor Summary
Constructors Constructor Description BrokenLogStorage(Throwable x)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaskListener
nodeListener(FlowNode node)
Provides an alternate way of emitting output from a node (such as a step).BuildListener
overallListener()
Provides an alternate way of emitting output from a build.AnnotatedLargeText<FlowExecutionOwner.Executable>
overallLog(FlowExecutionOwner.Executable build, boolean complete)
Provides an alternate way of retrieving output from a build.AnnotatedLargeText<FlowNode>
stepLog(FlowNode node, boolean complete)
Provides an alternate way of retrieving output from a build.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jenkinsci.plugins.workflow.log.LogStorage
getLogFile
-
-
-
-
Constructor Detail
-
BrokenLogStorage
public BrokenLogStorage(Throwable x)
-
-
Method Detail
-
overallListener
@NonNull public BuildListener overallListener() throws IOException
Description copied from interface:LogStorage
Provides an alternate way of emitting output from a build.May implement
AutoCloseable
to clean up at the end of a build; it may or may not be closed during Jenkins shutdown while a build is running.The caller may wrap the result using
TaskListenerDecorator.apply(hudson.model.TaskListener, org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner, org.jenkinsci.plugins.workflow.log.TaskListenerDecorator)
.- Specified by:
overallListener
in interfaceLogStorage
- Returns:
- a (remotable) build listener; do not bother overriding anything except
TaskListener.getLogger()
- Throws:
IOException
- See Also:
FlowExecutionOwner.getListener()
-
nodeListener
@NonNull public TaskListener nodeListener(@NonNull FlowNode node) throws IOException
Description copied from interface:LogStorage
Provides an alternate way of emitting output from a node (such as a step).May implement
AutoCloseable
to clean up at the end of a node (FlowNode.isActive()
); it may or may not be closed during Jenkins shutdown while a build is running.The caller may wrap the result using
TaskListenerDecorator.apply(hudson.model.TaskListener, org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner, org.jenkinsci.plugins.workflow.log.TaskListenerDecorator)
.- Specified by:
nodeListener
in interfaceLogStorage
- Parameters:
node
- a running node- Returns:
- a (remotable) task listener; do not bother overriding anything except
TaskListener.getLogger()
- Throws:
IOException
- See Also:
StepContext.get(java.lang.Class<T>)
-
overallLog
@NonNull public AnnotatedLargeText<FlowExecutionOwner.Executable> overallLog(@NonNull FlowExecutionOwner.Executable build, boolean complete)
Description copied from interface:LogStorage
Provides an alternate way of retrieving output from a build.In an
AnnotatedLargeText.writeHtmlTo(long, java.io.Writer)
override,ConsoleAnnotationOutputStream.eol(byte[], int)
should applyLogStorage.startStep(java.lang.String)
andLogStorage.endStep()
to delineate blocks contributed by steps. (Also seeConsoleAnnotators
.)- Specified by:
overallLog
in interfaceLogStorage
complete
- if true, we claim to be serving the complete log for a build, so implementations should be sure to retrieve final log lines- Returns:
- a log
-
stepLog
@NonNull public AnnotatedLargeText<FlowNode> stepLog(@NonNull FlowNode node, boolean complete)
Description copied from interface:LogStorage
Provides an alternate way of retrieving output from a build.- Specified by:
stepLog
in interfaceLogStorage
- Parameters:
node
- a running nodecomplete
- if true, we claim to be serving the complete log for a node, so implementations should be sure to retrieve final log lines- Returns:
- a log for this just this node
- See Also:
LogAction
-
-