Class LogStorageAction

  • All Implemented Interfaces:
    Action, ModelObject, org.jenkinsci.plugins.workflow.actions.FlowNodeAction, org.jenkinsci.plugins.workflow.actions.PersistentAction

    @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
    public class LogStorageAction
    extends org.jenkinsci.plugins.workflow.actions.LogAction
    implements org.jenkinsci.plugins.workflow.actions.FlowNodeAction, org.jenkinsci.plugins.workflow.actions.PersistentAction
    A marker for a node which had some log text using LogStorage.nodeListener(org.jenkinsci.plugins.workflow.graph.FlowNode).
    • Field Detail

      • node

        public transient org.jenkinsci.plugins.workflow.graph.FlowNode node
    • Method Detail

      • onLoad

        public void onLoad​(org.jenkinsci.plugins.workflow.graph.FlowNode node)
        Specified by:
        onLoad in interface org.jenkinsci.plugins.workflow.actions.FlowNodeAction
      • getLogText

        public AnnotatedLargeText<? extends org.jenkinsci.plugins.workflow.graph.FlowNode> getLogText()
        Specified by:
        getLogText in class org.jenkinsci.plugins.workflow.actions.LogAction
      • writeLogTo

        @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class)
        public void writeLogTo​(long offset,
                               org.apache.commons.jelly.XMLOutput out)
                        throws IOException
        Used from console.jelly to write annotated log to the given output.
        Throws:
        IOException
      • listenerFor

        @NonNull
        public static TaskListener listenerFor​(@NonNull
                                               org.jenkinsci.plugins.workflow.graph.FlowNode node,
                                               @CheckForNull
                                               org.jenkinsci.plugins.workflow.log.TaskListenerDecorator decorator)
                                        throws IOException,
                                               InterruptedException
        Creates a sink to print output from a step. Will use LogActionImpl if necessary.
        Parameters:
        node - a node which wishes to print output
        decorator - an optional decorator to pass to TaskListenerDecorator.apply(hudson.model.TaskListener, org.jenkinsci.plugins.workflow.flow.FlowExecutionOwner, org.jenkinsci.plugins.workflow.log.TaskListenerDecorator)
        Returns:
        a stream
        Throws:
        IOException
        InterruptedException