Package org.apache.lucene.util
Class InfoStream
- java.lang.Object
-
- org.apache.lucene.util.InfoStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Cloneable
- Direct Known Subclasses:
LoggingInfoStream
,PrintStreamInfoStream
public abstract class InfoStream extends java.lang.Object implements java.io.Closeable, java.lang.Cloneable
Debugging API for Lucene classes such asIndexWriter
andSegmentInfos
.NOTE: Enabling infostreams may cause performance degradation in some components.
-
-
Field Summary
Fields Modifier and Type Field Description static InfoStream
NO_OUTPUT
Instance of InfoStream that does no logging at all.
-
Constructor Summary
Constructors Constructor Description InfoStream()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InfoStream
clone()
static InfoStream
getDefault()
The defaultInfoStream
used by a newly instantiated classes.abstract boolean
isEnabled(java.lang.String component)
returns true if messages are enabled and should be posted tomessage(java.lang.String, java.lang.String)
.abstract void
message(java.lang.String component, java.lang.String message)
prints a messagestatic void
setDefault(InfoStream infoStream)
Sets the defaultInfoStream
used by a newly instantiated classes.
-
-
-
Field Detail
-
NO_OUTPUT
public static final InfoStream NO_OUTPUT
Instance of InfoStream that does no logging at all.
-
-
Method Detail
-
message
public abstract void message(java.lang.String component, java.lang.String message)
prints a message
-
isEnabled
public abstract boolean isEnabled(java.lang.String component)
returns true if messages are enabled and should be posted tomessage(java.lang.String, java.lang.String)
.
-
getDefault
public static InfoStream getDefault()
The defaultInfoStream
used by a newly instantiated classes.
-
setDefault
public static void setDefault(InfoStream infoStream)
Sets the defaultInfoStream
used by a newly instantiated classes. It cannot benull
, to disable logging useNO_OUTPUT
.- See Also:
getDefault()
-
clone
public InfoStream clone()
-
-