public class MemoryTarget extends AbstractTarget
Constructor and Description |
---|
MemoryTarget(LogTarget target,
int size,
Priority threshold)
Creation of a new instance of the memory target.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doProcessEvent(LogEvent event)
Process a log event, via formatting and outputting it.
|
boolean |
isFull()
Check if memory buffer is full.
|
void |
push()
Push log events to target.
|
protected void |
setOverwrite(boolean overwrite)
Set flag indicating whether it is valid to overwrite memory buffer.
|
protected boolean |
shouldPush(LogEvent event)
Determine if LogEvent should initiate a push to target.
|
close, getErrorHandler, isOpen, open, processEvent, setErrorHandler
protected void setOverwrite(boolean overwrite)
overwrite
- true if buffer should overwrite logevents in buffer, false otherwiseprotected void doProcessEvent(LogEvent event)
doProcessEvent
in class AbstractTarget
event
- the log eventpublic final boolean isFull()
protected boolean shouldPush(LogEvent event)
event
- the incoming LogEventpublic void push()
Copyright © 1997–2019. All rights reserved.