public class QueueAppender extends java.lang.Object implements LoggerAppender
Class QueueAppender which keeps a queue of logging events appended.
Constructor and Description |
---|
QueueAppender(int bufferSize)
Constructor QueueAppender creates a new QueueAppender instance.
|
Modifier and Type | Method and Description |
---|---|
void |
append(LoggingEvent event)
Method append ...
|
LoggingEvent |
poll()
Return a LoggingEvent object from the internal storage queue.
|
LoggingEvent |
poll(int wait)
Return a LoggingEvent object from the internal storage queue.
|
public QueueAppender(int bufferSize)
bufferSize
- size of queue to createpublic void append(LoggingEvent event)
append
in interface LoggerAppender
event
- of type LoggingEventpublic LoggingEvent poll()
public LoggingEvent poll(int wait)
wait
- time in seconds to wait if queue is empty