org.elasticsearch.common.lucene
Class LoggerInfoStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by org.elasticsearch.common.lucene.LoggerInfoStream
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class LoggerInfoStream
extends PrintStream

A PrintStream that logs each println(String) into a logger under trace level.

Provides also factory methods that basically append to the logger name provide the SUFFIX.


Field Summary
static String SUFFIX
           
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
LoggerInfoStream(ESLogger logger)
          Constucts a new instance based on the provided logger.
 
Method Summary
static LoggerInfoStream getInfoStream(ESLogger logger)
          Creates a new LoggerInfoStream based on the provided logger by appending to its NAME the SUFFIX.
static LoggerInfoStream getInfoStream(String name)
          Creates a new LoggerInfoStream based on the provided name by appending to it the SUFFIX.
 void println(String x)
          Override only the method Lucene actually uses.
 
Methods inherited from class java.io.PrintStream
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write, write
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUFFIX

public static final String SUFFIX
See Also:
Constant Field Values
Constructor Detail

LoggerInfoStream

public LoggerInfoStream(ESLogger logger)
Constucts a new instance based on the provided logger. Will output each println(String) operation as a trace level.

Method Detail

getInfoStream

public static LoggerInfoStream getInfoStream(ESLogger logger)
Creates a new LoggerInfoStream based on the provided logger by appending to its NAME the SUFFIX.


getInfoStream

public static LoggerInfoStream getInfoStream(String name)
Creates a new LoggerInfoStream based on the provided name by appending to it the SUFFIX.


println

public void println(String x)
Override only the method Lucene actually uses.

Overrides:
println in class PrintStream


Copyright © 2009-2012. All Rights Reserved.