org.apache.solr.logging
Class LogWatcher<E>

java.lang.Object
  extended by org.apache.solr.logging.LogWatcher<E>
Direct Known Subclasses:
JulWatcher

public abstract class LogWatcher<E>
extends Object

A Class to monitor Logging events and hold N events in memory This is abstract so we can support both JUL and Log4j (and other logging platforms)


Field Summary
protected  CircularList<E> history
           
protected  long last
           
 
Constructor Summary
LogWatcher()
           
 
Method Summary
 void add(E event, long timstamp)
           
abstract  List<String> getAllLevels()
           
abstract  Collection<LoggerInfo> getAllLoggers()
           
 SolrDocumentList getHistory(long since, AtomicBoolean found)
           
 int getHistorySize()
           
 long getLastEvent()
           
abstract  String getName()
           
abstract  String getThreshold()
           
abstract  long getTimestamp(E event)
           
abstract  void registerListener(ListenerConfig cfg, CoreContainer container)
           
 void reset()
           
abstract  void setLogLevel(String category, String level)
          Sets the log level within this framework
abstract  void setThreshold(String level)
           
abstract  SolrDocument toSolrDocument(E event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

history

protected CircularList<E> history

last

protected long last
Constructor Detail

LogWatcher

public LogWatcher()
Method Detail

getName

public abstract String getName()
Returns:
The implementation name

getAllLevels

public abstract List<String> getAllLevels()
Returns:
The valid level names for this framework

setLogLevel

public abstract void setLogLevel(String category,
                                 String level)
Sets the log level within this framework


getAllLoggers

public abstract Collection<LoggerInfo> getAllLoggers()
Returns:
all registered loggers

setThreshold

public abstract void setThreshold(String level)

getThreshold

public abstract String getThreshold()

add

public void add(E event,
                long timstamp)

getLastEvent

public long getLastEvent()

getHistorySize

public int getHistorySize()

getHistory

public SolrDocumentList getHistory(long since,
                                   AtomicBoolean found)

getTimestamp

public abstract long getTimestamp(E event)

toSolrDocument

public abstract SolrDocument toSolrDocument(E event)

registerListener

public abstract void registerListener(ListenerConfig cfg,
                                      CoreContainer container)

reset

public void reset()


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.