Class FileLogStorage
- All Implemented Interfaces:
LogStorage
-
Method Summary
Modifier and TypeMethodDescriptionstatic LogStorage
getLogFile
(FlowExecutionOwner.Executable build, boolean complete) Deprecated.nodeListener
(FlowNode node) Provides an alternate way of emitting output from a node (such as a step).Provides an alternate way of emitting output from a build.overallLog
(FlowExecutionOwner.Executable build, boolean complete) Provides an alternate way of retrieving output from a build.Provides an alternate way of retrieving output from a build.
-
Method Details
-
forFile
-
overallListener
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:
-
nodeListener
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
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:
-
getLogFile
@Deprecated @NonNull public File getLogFile(@NonNull FlowExecutionOwner.Executable build, boolean complete) Deprecated.Description copied from interface:LogStorage
Provide a file containing the log text. The default implementation creates a temporary file based on the current contents ofLogStorage.overallLog(org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner.Executable, boolean)
.- Specified by:
getLogFile
in interfaceLogStorage
- Parameters:
build
- as inLogStorage.overallLog(org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner.Executable, boolean)
complete
- as inLogStorage.overallLog(org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner.Executable, boolean)
- Returns:
- a possibly temporary file
-