Class Log4j2Watcher


  • public class Log4j2Watcher
    extends LogWatcher<org.apache.logging.log4j.core.LogEvent>
    • Constructor Detail

      • Log4j2Watcher

        public Log4j2Watcher()
    • Method Detail

      • 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)
      • setThreshold

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

        public long getTimestamp​(org.apache.logging.log4j.core.LogEvent event)
        Specified by:
        getTimestamp in class LogWatcher<org.apache.logging.log4j.core.LogEvent>
      • toSolrDocument

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