public class Log4j2Watcher extends LogWatcher<org.apache.logging.log4j.core.LogEvent>
Modifier and Type | Class and Description |
---|---|
protected class |
Log4j2Watcher.Log4j2Appender |
protected class |
Log4j2Watcher.Log4j2Info |
Modifier and Type | Field and Description |
---|---|
protected Log4j2Watcher.Log4j2Appender |
appender |
static org.apache.logging.log4j.Logger |
log |
history, last
Constructor and Description |
---|
Log4j2Watcher() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAllLevels() |
Collection<LoggerInfo> |
getAllLoggers() |
protected Log4j2Watcher.Log4j2Appender |
getAppender() |
protected org.apache.logging.log4j.core.config.LoggerConfig |
getLoggerConfig(org.apache.logging.log4j.core.LoggerContext ctx,
String loggerName) |
String |
getName() |
String |
getThreshold() |
long |
getTimestamp(org.apache.logging.log4j.core.LogEvent event) |
protected boolean |
isRootLogger(String loggerName) |
void |
registerListener(ListenerConfig cfg) |
void |
setLogLevel(String loggerName,
String level)
Sets the log level within this framework
|
void |
setThreshold(String level) |
SolrDocument |
toSolrDocument(org.apache.logging.log4j.core.LogEvent event) |
add, getHistory, getHistorySize, getLastEvent, newRegisteredLogWatcher, reset
public static final org.apache.logging.log4j.Logger log
protected Log4j2Watcher.Log4j2Appender appender
public String getName()
getName
in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
public List<String> getAllLevels()
getAllLevels
in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
public void setLogLevel(String loggerName, String level)
LogWatcher
setLogLevel
in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
protected boolean isRootLogger(String loggerName)
protected org.apache.logging.log4j.core.config.LoggerConfig getLoggerConfig(org.apache.logging.log4j.core.LoggerContext ctx, String loggerName)
public Collection<LoggerInfo> getAllLoggers()
getAllLoggers
in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
public void setThreshold(String level)
setThreshold
in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
public String getThreshold()
getThreshold
in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
protected Log4j2Watcher.Log4j2Appender getAppender()
public void registerListener(ListenerConfig cfg)
registerListener
in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
public long getTimestamp(org.apache.logging.log4j.core.LogEvent event)
getTimestamp
in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
public SolrDocument toSolrDocument(org.apache.logging.log4j.core.LogEvent event)
toSolrDocument
in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.