org.apache.solr.logging.log4j

## Class Log4jWatcher

- java.lang.Object
- - org.apache.solr.logging.LogWatcher<org.apache.log4j.spi.LoggingEvent>
  - - org.apache.solr.logging.log4j.Log4jWatcher

-     public class Log4jWatcher
      extends LogWatcher<org.apache.log4j.spi.LoggingEvent>

- - ### Field Summary

    - ### Fields inherited from class org.apache.solr.logging.LogWatcher

      `history, last`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Log4jWatcher(String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<String>` | `getAllLevels()`
    `Collection<LoggerInfo>` | `getAllLoggers()`
    `String` | `getName()`
    `String` | `getThreshold()`
    `long` | `getTimestamp(org.apache.log4j.spi.LoggingEvent event)`
    `void` | `registerListener(ListenerConfig cfg)`
    `void` | `setLogLevel(String category, String level)` Sets the log level within this framework
    `void` | `setThreshold(String level)`
    `SolrDocument` | `toSolrDocument(org.apache.log4j.spi.LoggingEvent event)`

    - ### Methods inherited from class org.apache.solr.logging.LogWatcher

      `add, getHistory, getHistorySize, getLastEvent, newRegisteredLogWatcher, reset`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Log4jWatcher

          public Log4jWatcher(String name)

  - ### Method Detail

    - #### getName

          public String getName()

      Specified by:
        `getName` in class `LogWatcher<org.apache.log4j.spi.LoggingEvent>`
      Returns:
        The implementation name

    - #### getAllLevels

          public List<String> getAllLevels()

      Specified by:
        `getAllLevels` in class `LogWatcher<org.apache.log4j.spi.LoggingEvent>`
      Returns:
        The valid level names for this framework

    - #### setLogLevel

          public void setLogLevel(String category,
                                  String level)

      Description copied from class: `LogWatcher`
      Sets the log level within this framework
      Specified by:
        `setLogLevel` in class `LogWatcher<org.apache.log4j.spi.LoggingEvent>`

    - #### getAllLoggers

          public Collection<LoggerInfo> getAllLoggers()

      Specified by:
        `getAllLoggers` in class `LogWatcher<org.apache.log4j.spi.LoggingEvent>`
      Returns:
        all registered loggers

    - #### setThreshold

          public void setThreshold(String level)

      Specified by:
        `setThreshold` in class `LogWatcher<org.apache.log4j.spi.LoggingEvent>`

    - #### getThreshold

          public String getThreshold()

      Specified by:
        `getThreshold` in class `LogWatcher<org.apache.log4j.spi.LoggingEvent>`

    - #### registerListener

          public void registerListener(ListenerConfig cfg)

      Specified by:
        `registerListener` in class `LogWatcher<org.apache.log4j.spi.LoggingEvent>`

    - #### getTimestamp

          public long getTimestamp(org.apache.log4j.spi.LoggingEvent event)

      Specified by:
        `getTimestamp` in class `LogWatcher<org.apache.log4j.spi.LoggingEvent>`

    - #### toSolrDocument

          public SolrDocument toSolrDocument(org.apache.log4j.spi.LoggingEvent event)

      Specified by:
        `toSolrDocument` in class `LogWatcher<org.apache.log4j.spi.LoggingEvent>`

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