org.gradle.logging
Class StandardOutputLoggingAdapter

java.lang.Object
  extended by java.io.OutputStream
      extended by org.gradle.logging.StandardOutputLoggingAdapter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class StandardOutputLoggingAdapter
extends java.io.OutputStream


Constructor Summary
StandardOutputLoggingAdapter(ch.qos.logback.classic.Logger log, ch.qos.logback.classic.Level level)
          Creates the OutputStream to flush to the given Category.
StandardOutputLoggingAdapter(ch.qos.logback.classic.Logger log, ch.qos.logback.classic.Level level, int bufferLength)
          Creates the OutputStream to flush to the given Category.
 
Method Summary
 void close()
          Closes this output stream and releases any system resources associated with this stream.
 void flush()
          Flushes this output stream and forces any buffered output bytes to be written out.
 ch.qos.logback.classic.Level getLevel()
           
 org.slf4j.Marker getMarker()
           
 void setLevel(ch.qos.logback.classic.Level level)
           
 void setMarker(org.slf4j.Marker marker)
           
 void write(int b)
          Writes the specified byte to this output stream.
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardOutputLoggingAdapter

public StandardOutputLoggingAdapter(ch.qos.logback.classic.Logger log,
                                    ch.qos.logback.classic.Level level)
                             throws java.lang.IllegalArgumentException
Creates the OutputStream to flush to the given Category.

Parameters:
log - the Logger to write to
level - the Level to use when writing to the Logger
Throws:
java.lang.IllegalArgumentException - if cat == null or priority == null

StandardOutputLoggingAdapter

public StandardOutputLoggingAdapter(ch.qos.logback.classic.Logger log,
                                    ch.qos.logback.classic.Level level,
                                    int bufferLength)
                             throws java.lang.IllegalArgumentException
Creates the OutputStream to flush to the given Category.

Parameters:
log - the Logger to write to
level - the Level to use when writing to the Logger
bufferLength - The initial buffer length to use
Throws:
java.lang.IllegalArgumentException - if cat == null or priority == null
Method Detail

close

public void close()
Closes this output stream and releases any system resources associated with this stream. The general contract of close is that it closes the output stream. A closed stream cannot perform output operations and cannot be reopened.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream

write

public void write(int b)
           throws java.io.IOException
Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

Specified by:
write in class java.io.OutputStream
Parameters:
b - the byte to write
Throws:
java.io.IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.

flush

public void flush()
Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream

getLevel

public ch.qos.logback.classic.Level getLevel()

setLevel

public void setLevel(ch.qos.logback.classic.Level level)

getMarker

public org.slf4j.Marker getMarker()

setMarker

public void setMarker(org.slf4j.Marker marker)