org.jenkins.ci.plugins.jobloglogger
Class AbstractBuildJULOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.jenkins.ci.plugins.jobloglogger.AbstractBuildJULOutputStream
All Implemented Interfaces:
Closeable, Flushable

public final class AbstractBuildJULOutputStream
extends OutputStream

An OutputStream implementation which actually just writes to a logger.Logger, and where messages are prefixed by the specified Run.toString(). TODO: it would probably be nice if we used per- AbstractBuild loggers so that the user could control output destinations based on the hudson.model.AbstractBuild#getName -- i'm just not sure what kind of string escaping we'd need to do to be legitimate JUL log name..

Since:
1.0
Author:
Jesse Farinacci

Constructor Summary
AbstractBuildJULOutputStream(hudson.model.AbstractBuild build)
           
AbstractBuildJULOutputStream(hudson.model.AbstractBuild build, boolean suppressEmpty)
           
 
Method Summary
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBuildJULOutputStream

public AbstractBuildJULOutputStream(hudson.model.AbstractBuild build)

AbstractBuildJULOutputStream

public AbstractBuildJULOutputStream(hudson.model.AbstractBuild build,
                                    boolean suppressEmpty)
Method Detail

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException


Copyright © 2004-2012. All Rights Reserved.