Package org.apache.lucene.util
Class InfoStream
- java.lang.Object
-
- org.apache.lucene.util.InfoStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Cloneable
- Direct Known Subclasses:
PrintStreamInfoStream
public abstract class InfoStream extends Object implements Closeable, 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(String component)
returns true if messages are enabled and should be posted tomessage(java.lang.String, java.lang.String)
.abstract void
message(String component, 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
-
isEnabled
public abstract boolean isEnabled(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()
-
-