Package ch.qos.logback.core

# Class BasicStatusManager

java.lang.Object
ch.qos.logback.core.BasicStatusManager

All Implemented Interfaces:
  `StatusManager`

public class BasicStatusManager extends Object implements StatusManager

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`MAX_HEADER_COUNT`
`protected final List<Status>`
`statusList`
`protected final List<StatusListener>`
`statusListenerList`
`protected final LogbackLock`
`statusListenerListLock`
`protected final LogbackLock`
`statusListLock`
`static final int`
`TAIL_SIZE`
`protected final CyclicBuffer<Status>`
`tailBuffer`

## Constructor Summary

Constructors
Constructor
Description
`BasicStatusManager()`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(Status newStatus)`
Add a new status object.
`boolean`
`add(StatusListener listener)`
This implementation does not allow duplicate installations of OnConsoleStatusListener
`void`
`clear()`
Clear the list of status messages.
`List<Status>`
`getCopyOfStatusList()`
Obtain a copy of the status list maintained by this StatusManager.
`List<StatusListener>`
`getCopyOfStatusListenerList()`
Obtain a copy of the status listener list maintained by this StatusManager
`int`
`getCount()`
Return the number of status entries.
`int`
`getLevel()`
`void`
`remove(StatusListener listener)`
); Remove a status listener.

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

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

## Field Details

### MAX_HEADER_COUNT

public static final int MAX_HEADER_COUNT

See Also:
  - Constant Field Values

### TAIL_SIZE

public static final int TAIL_SIZE

See Also:
  - Constant Field Values

### statusList

protected final List<Status> statusList

### tailBuffer

protected final CyclicBuffer<Status> tailBuffer

### statusListLock

protected final LogbackLock statusListLock

### statusListenerList

protected final List<StatusListener> statusListenerList

### statusListenerListLock

protected final LogbackLock statusListenerListLock

## Constructor Details

### BasicStatusManager

public BasicStatusManager()

## Method Details

### add

public void add(Status newStatus)
Add a new status object.

Specified by:
  `add` in interface `StatusManager`
Parameters:
  `newStatus` - the status message to add

### getCopyOfStatusList

public List<Status> getCopyOfStatusList()
Description copied from interface: `StatusManager`
Obtain a copy of the status list maintained by this StatusManager.

Specified by:
  `getCopyOfStatusList` in interface `StatusManager`
Returns:

### clear

public void clear()
Description copied from interface: `StatusManager`
Clear the list of status messages.

Specified by:
  `clear` in interface `StatusManager`

### getLevel

public int getLevel()

### getCount

public int getCount()
Description copied from interface: `StatusManager`
Return the number of status entries.

Specified by:
  `getCount` in interface `StatusManager`
Returns:

### add

public boolean add(StatusListener listener)
This implementation does not allow duplicate installations of OnConsoleStatusListener

Specified by:
  `add` in interface `StatusManager`
Parameters:
  `listener` -
Returns:
  true if actually added, false if skipped

### remove

public void remove(StatusListener listener)
Description copied from interface: `StatusManager`
); Remove a status listener.

Specified by:
  `remove` in interface `StatusManager`

### getCopyOfStatusListenerList

public List<StatusListener> getCopyOfStatusListenerList()
Description copied from interface: `StatusManager`
Obtain a copy of the status listener list maintained by this StatusManager

Specified by:
  `getCopyOfStatusListenerList` in interface `StatusManager`
Returns: