Class Log4j2Watcher

java.lang.Object
org.apache.solr.logging.LogWatcher<org.apache.logging.log4j.core.LogEvent>
org.apache.solr.logging.log4j2.Log4j2Watcher

public class Log4j2Watcher extends LogWatcher<org.apache.logging.log4j.core.LogEvent>
  • Field Details

  • Constructor Details

    • Log4j2Watcher

      public Log4j2Watcher()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
      Returns:
      The implementation name
    • getAllLevels

      public List<String> getAllLevels()
      Specified by:
      getAllLevels in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
      Returns:
      The valid level names for this framework
    • setLogLevel

      public void setLogLevel(String loggerName, String level)
      Description copied from class: LogWatcher
      Sets the log level within this framework
      Specified by:
      setLogLevel in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
    • isRootLogger

      protected boolean isRootLogger(String loggerName)
    • getLoggerConfig

      protected org.apache.logging.log4j.core.config.LoggerConfig getLoggerConfig(org.apache.logging.log4j.core.LoggerContext ctx, String loggerName)
    • getAllLoggers

      public Collection<LoggerInfo> getAllLoggers()
      Specified by:
      getAllLoggers in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
      Returns:
      all registered loggers
    • setThreshold

      public void setThreshold(String level)
      Specified by:
      setThreshold in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
    • getThreshold

      public String getThreshold()
      Specified by:
      getThreshold in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
    • getAppender

      protected Log4j2Watcher.Log4j2Appender getAppender()
    • registerListener

      public void registerListener(ListenerConfig cfg)
      Specified by:
      registerListener in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
    • toSolrDocument

      public org.apache.solr.common.SolrDocument toSolrDocument(org.apache.logging.log4j.core.LogEvent event)
      Specified by:
      toSolrDocument in class LogWatcher<org.apache.logging.log4j.core.LogEvent>