org.apache.log.output
public class MemoryTarget extends AbstractTarget
Field Summary | |
---|---|
LogEvent[] | m_buffer |
int | m_index |
boolean | m_overwrite |
LogTarget | m_target |
Priority | m_threshold |
int | m_used |
Constructor Summary | |
---|---|
MemoryTarget(LogTarget target, int size, Priority threshold)
Creation of a new instance of the memory target. |
Method Summary | |
---|---|
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.
|
Parameters: target the target to push LogEvents to size the event buffer size threshold the priority at which to push LogEvents to next LogTarget
Parameters: event the log event
Returns: true if buffer is full, false otherwise
Parameters: overwrite true if buffer should overwrite logevents in buffer, false otherwise
Parameters: event the incoming LogEvent
Returns: true if should push, false otherwise