Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.log4j.spi
Class NOPLoggerRepository

    java.lang.Object
      org.apache.log4j.spi.NOPLoggerRepository

All Implemented Interfaces:
  LoggerRepository

    public final class NOPLoggerRepository

extends java.lang.Object
implements LoggerRepository

No-operation implementation of LoggerRepository which is used when LogManager.repositorySelector is erroneously nulled during class reloading.

Since:
  1.2.15

Constructor Summary
`NOPLoggerRepository()`

Method Summary
`void` | `addHierarchyEventListener(HierarchyEventListener listener)` Add a `HierarchyEventListener` event to the repository.
`void` | `emitNoAppenderWarning(Category cat)`
`Logger` | `exists(java.lang.String name)`
`void` | `fireAddAppenderEvent(Category logger, Appender appender)`
`java.util.Enumeration` | `getCurrentCategories()` Deprecated.
`java.util.Enumeration` | `getCurrentLoggers()`
`Logger` | `getLogger(java.lang.String name)`
`Logger` | `getLogger(java.lang.String name, LoggerFactory factory)`
`Logger` | `getRootLogger()`
`Level` | `getThreshold()` Get the repository-wide threshold.
`boolean` | `isDisabled(int level)` Returns whether this repository is disabled for a given level.
`void` | `resetConfiguration()`
`void` | `setThreshold(Level level)` Set the repository-wide threshold.
`void` | `setThreshold(java.lang.String val)` Another form of `LoggerRepository.setThreshold(Level)` accepting a string parameter instead of a `Level`.
`void` | `shutdown()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NOPLoggerRepository

    public NOPLoggerRepository()

Method Detail

### addHierarchyEventListener

    public void addHierarchyEventListener(HierarchyEventListener listener)

  Add a `HierarchyEventListener` event to the repository.

  Specified by:
    `addHierarchyEventListener` in interface `LoggerRepository`

### isDisabled

    public boolean isDisabled(int level)

  Returns whether this repository is disabled for a given level. The answer depends on the repository threshold and the `level` parameter. See also `LoggerRepository.setThreshold(org.apache.log4j.Level)` method.

  Specified by:
    `isDisabled` in interface `LoggerRepository`

### setThreshold

    public void setThreshold(Level level)

  Set the repository-wide threshold. All logging requests below the threshold are immediately dropped. By default, the threshold is set to `Level.ALL` which has the lowest possible rank.

  Specified by:
    `setThreshold` in interface `LoggerRepository`

### setThreshold

    public void setThreshold(java.lang.String val)

  Another form of `LoggerRepository.setThreshold(Level)` accepting a string parameter instead of a `Level`.

  Specified by:
    `setThreshold` in interface `LoggerRepository`

### emitNoAppenderWarning

    public void emitNoAppenderWarning(Category cat)

  Specified by:
    `emitNoAppenderWarning` in interface `LoggerRepository`

### getThreshold

    public Level getThreshold()

  Get the repository-wide threshold. See `LoggerRepository.setThreshold(Level)` for an explanation.

  Specified by:
    `getThreshold` in interface `LoggerRepository`

### getLogger

    public Logger getLogger(java.lang.String name)

  Specified by:
    `getLogger` in interface `LoggerRepository`

### getLogger

    public Logger getLogger(java.lang.String name,
                            LoggerFactory factory)

  Specified by:
    `getLogger` in interface `LoggerRepository`

### getRootLogger

    public Logger getRootLogger()

  Specified by:
    `getRootLogger` in interface `LoggerRepository`

### exists

    public Logger exists(java.lang.String name)

  Specified by:
    `exists` in interface `LoggerRepository`

### shutdown

    public void shutdown()

  Specified by:
    `shutdown` in interface `LoggerRepository`

### getCurrentLoggers

    public java.util.Enumeration getCurrentLoggers()

  Specified by:
    `getCurrentLoggers` in interface `LoggerRepository`

### getCurrentCategories

    public java.util.Enumeration getCurrentCategories()

  Deprecated. Please use `LoggerRepository.getCurrentLoggers()` instead.

  Specified by:
    `getCurrentCategories` in interface `LoggerRepository`

### fireAddAppenderEvent

    public void fireAddAppenderEvent(Category logger,
                                     Appender appender)

  Specified by:
    `fireAddAppenderEvent` in interface `LoggerRepository`

### resetConfiguration

    public void resetConfiguration()

  Specified by:
    `resetConfiguration` in interface `LoggerRepository`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.