public abstract class LogWatcher<E> extends Object
Modifier and Type | Field and Description |
---|---|
protected CircularList<E> |
history |
protected long |
last |
Constructor and Description |
---|
LogWatcher() |
Modifier and Type | Method and Description |
---|---|
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) |
static LogWatcher |
newRegisteredLogWatcher(LogWatcherConfig config,
SolrResourceLoader loader)
Create and register a LogWatcher.
|
abstract void |
registerListener(ListenerConfig cfg) |
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) |
protected CircularList<E> history
protected long last
public abstract String getName()
public abstract List<String> getAllLevels()
public abstract void setLogLevel(String category, String level)
public abstract Collection<LoggerInfo> getAllLoggers()
public abstract void setThreshold(String level)
public abstract String getThreshold()
public void add(E event, long timstamp)
public long getLastEvent()
public int getHistorySize()
public SolrDocumentList getHistory(long since, AtomicBoolean found)
public abstract long getTimestamp(E event)
public abstract SolrDocument toSolrDocument(E event)
public abstract void registerListener(ListenerConfig cfg)
public void reset()
public static LogWatcher newRegisteredLogWatcher(LogWatcherConfig config, SolrResourceLoader loader)
config
- a LogWatcherConfig object, containing the configuration for this LogWatcher.loader
- a SolrResourceLoader, to be used to load plugin LogWatcher implementations.
Can be null ifCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.