Package org.apache.lucene.util
Class InfoStream
- java.lang.Object
-
- org.apache.lucene.util.InfoStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
JavaLoggingInfoStream,PrintStreamInfoStream
public abstract class InfoStream extends Object implements Closeable
Debugging API for Lucene classes such asIndexWriterandSegmentInfos.NOTE: Enabling infostreams may cause performance degradation in some components.
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static InfoStreamNO_OUTPUTInstance 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 static InfoStreamgetDefault()The defaultInfoStreamused by a newly instantiated classes.abstract booleanisEnabled(String component)returns true if messages are enabled and should be posted tomessage(java.lang.String, java.lang.String).abstract voidmessage(String component, String message)prints a messagestatic voidsetDefault(InfoStream infoStream)Sets the defaultInfoStreamused 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 defaultInfoStreamused by a newly instantiated classes.
-
setDefault
public static void setDefault(InfoStream infoStream)
Sets the defaultInfoStreamused by a newly instantiated classes. It cannot benull, to disable logging useNO_OUTPUT.- See Also:
getDefault()
-
-