Package org.apache.lucene.util
Class PrintStreamInfoStream
- java.lang.Object
-
- org.apache.lucene.util.InfoStream
-
- org.apache.lucene.util.PrintStreamInfoStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class PrintStreamInfoStream extends InfoStream
InfoStream implementation over aPrintStreamsuch asSystem.out.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.concurrent.atomic.AtomicIntegerMESSAGE_IDprotected intmessageIDprotected java.io.PrintStreamstream-
Fields inherited from class org.apache.lucene.util.InfoStream
NO_OUTPUT
-
-
Constructor Summary
Constructors Constructor Description PrintStreamInfoStream(java.io.PrintStream stream)PrintStreamInfoStream(java.io.PrintStream stream, int messageID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected java.lang.StringgetTimestamp()Returns the current time as string for insertion into log messages.booleanisEnabled(java.lang.String component)returns true if messages are enabled and should be posted toInfoStream.message(java.lang.String, java.lang.String).booleanisSystemStream()voidmessage(java.lang.String component, java.lang.String message)prints a message-
Methods inherited from class org.apache.lucene.util.InfoStream
getDefault, setDefault
-
-
-
-
Method Detail
-
message
public void message(java.lang.String component, java.lang.String message)Description copied from class:InfoStreamprints a message- Specified by:
messagein classInfoStream
-
isEnabled
public boolean isEnabled(java.lang.String component)
Description copied from class:InfoStreamreturns true if messages are enabled and should be posted toInfoStream.message(java.lang.String, java.lang.String).- Specified by:
isEnabledin classInfoStream
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
isSystemStream
public boolean isSystemStream()
-
getTimestamp
protected java.lang.String getTimestamp()
Returns the current time as string for insertion into log messages.
-
-