Skip to content

Commit

Permalink
formatting and javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mwinter69 committed Jun 8, 2018
1 parent e9808d0 commit 6f6852f
Showing 1 changed file with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@ public LogstashConsoleLogFilter(Run<?, ?> run)

private static final long serialVersionUID = 1L;

/**
* {@inheritDoc}
*
* Currently pipeline is not supporting global ConsoleLogFilters. So even when we have it enabled globally
* we would not log to an indexer without the logstash step.
* But when pipeline supports global ConsoleLogFilters we don't want to log twice when we have the step in
* the pipeline.
* With the LogstashMarkerRunAction we can detect if it is enabled globally and if pipeline is supporting
* global ConsoleLogFilters.
* The LogstashMarkerRunAction will be only attached to a WorkflowRun when pipeline supports global
* ConsoleLogFilters (JENKINS-45693). And the assumption is that the marker action is attached before the
* logstashStep is initialized.
* This marker action will also disable the notifier.
*
*/
@Override
public OutputStream decorateLogger(Run build, OutputStream logger) throws IOException, InterruptedException
{
/*
* Currently pipeline is not supporting global ConsoleLogFilters. So even when we have it enabled globally
* we would not log to an indexer without the logstash step.
* But when pipeline supports global ConsoleLogFilters we don't want to log twice when we have the step in
* the pipeline.
* With the LogstashMarkerRunAction we can detect if it is enabled globally and if pipeline is supporting
* global ConsoleLogFilters.
* The LogstashMarkerRunAction will be only attached to a WorkflowRun when pipeline supports global
* ConsoleLogFilters (JENKINS-45693). And the assumption is that the marker action is attached before the
* logstashStep is initialized.
* This marker action will also disable the notifier.
*
*/

/*
* A pipeline step uses the constructor which sets run.
*/

// A pipeline step uses the constructor which sets run.
if (run != null)
{
if (run.getAction(LogstashMarkerAction.class) != null)
Expand All @@ -59,10 +59,7 @@ public OutputStream decorateLogger(Run build, OutputStream logger) throws IOExce
return getLogstashOutputStream(run, logger);
}

/*
* Not pipeline step so @{code build} should be set.
*
*/
// Not pipeline step so @{code build} should be set.
if (isLogstashEnabled(build))
{
if (build.getAction(LogstashMarkerAction.class) == null)
Expand Down

0 comments on commit 6f6852f

Please sign in to comment.