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
Debugging API for Lucene classes such as
IndexWriter
and SegmentInfos
.
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
Modifier and TypeFieldDescriptionstatic final InfoStream
Instance of InfoStream that does no logging at all. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InfoStream
The defaultInfoStream
used by a newly instantiated classes.abstract boolean
returns true if messages are enabled and should be posted tomessage(java.lang.String, java.lang.String)
.abstract void
prints a messagestatic void
setDefault
(InfoStream infoStream) Sets the defaultInfoStream
used by a newly instantiated classes.
-
Field Details
-
NO_OUTPUT
Instance of InfoStream that does no logging at all.
-
-
Constructor Details
-
InfoStream
public InfoStream()
-
-
Method Details
-
message
prints a message -
isEnabled
returns true if messages are enabled and should be posted tomessage(java.lang.String, java.lang.String)
. -
getDefault
The defaultInfoStream
used by a newly instantiated classes. -
setDefault
Sets the defaultInfoStream
used by a newly instantiated classes. It cannot benull
, to disable logging useNO_OUTPUT
.- See Also:
-