Package jenkins.plugins.logstash
Class LogstashOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- hudson.console.LineTransformationOutputStream
-
- jenkins.plugins.logstash.LogstashOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class LogstashOutputStream extends LineTransformationOutputStream
Output stream that writes each line to the provided delegate output stream and also sends it to an indexer for logstash to consume.- Author:
- K Jonathan Harker, Rusty Gerard
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.console.LineTransformationOutputStream
LineTransformationOutputStream.Delegating
-
-
Constructor Summary
Constructors Constructor Description LogstashOutputStream(OutputStream delegate, LogstashWriter logstash)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected void
eol(byte[] b, int len)
void
flush()
-
Methods inherited from class hudson.console.LineTransformationOutputStream
forceEol, trimEOL, write, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Constructor Detail
-
LogstashOutputStream
public LogstashOutputStream(OutputStream delegate, LogstashWriter logstash)
-
-
Method Detail
-
eol
protected void eol(byte[] b, int len) throws IOException
- Specified by:
eol
in classLineTransformationOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classLineTransformationOutputStream
- Throws:
IOException
-
-