Class Slf4JInfoStream
- java.lang.Object
-
- org.apache.lucene.util.InfoStream
-
- com.atlassian.confluence.internal.search.v2.lucene.Slf4JInfoStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean
public class Slf4JInfoStream extends org.apache.lucene.util.InfoStream implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBeanAdapts Lucene's logging mechanism,InfoStream, to SLF4J.In
InfoStream, messages are categorised by "components". Generally a component is the class name or an acronym of it, e.g. the component of org.apache.lucene.index.IndexUpgrader is IndexUpgrader and the component of org.apache.lucene.index.DocumentsWriter is DW. Since there's no concept of log levels, all messages are logged under debug.A Spring-managed instance will replace the default
InfoStreamwithin its lifecycle, thus it only makes sense to have a singleton registered.
-
-
Constructor Summary
Constructors Constructor Description Slf4JInfoStream(Map<String,String> componentToLoggerMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voidclose()voiddestroy()booleanisEnabled(String component)voidmessage(String component, String message)
-
-
-
Method Detail
-
message
public void message(String component, String message)
- Specified by:
messagein classorg.apache.lucene.util.InfoStream
-
isEnabled
public boolean isEnabled(String component)
- Specified by:
isEnabledin classorg.apache.lucene.util.InfoStream
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
destroy
public void destroy() throws Exception- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
-