ERXEOFAppender Class Reference

Inherits org::apache::log4j::AppenderSkeleton.

Collaboration diagram for ERXEOFAppender:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void append (LoggingEvent event)
synchronized void close ()
int getBufferSize ()
String getLoggingEntity ()
boolean requiresLayout ()
void setBufferSize (int bufferSize)
void setLoggingEntity (String name)

Protected Member Functions

boolean checkConditions ()
EOEditingContext editingContext ()
boolean safeToCreateEditingContext ()
void subAppend (LoggingEvent event)

Protected Attributes

int bufferSize = -1
boolean conditionsChecked = false
int currentBufferSize = 1
EOEditingContext ec
String loggingEntity


Detailed Description

Basic log4j EOF Appender
Very basic appender, useful for logging events to a database using EOF. Manditory Fields:
LoggingEntity - Entity for creating logging events. The class mapped to this entity must implement the interface: ERXEOFLogEntryInterface Optional Fields:
BufferSize - Number of Events to catch before calling ec.saveChanges()

Member Function Documentation

void append ( LoggingEvent  event  ) 

Entry point for logging an event.

Reminder: the nesting of calls is:

doAppend()

Parameters:
event current logging event

boolean checkConditions (  )  [protected]

Used to determine if the system is ready to log events to the database.

Returns:
if all of the conditions are satisfied

synchronized void close (  ) 

Called to close the appender.

EOEditingContext editingContext (  )  [protected]

Gets the editing context for logging events. Will create one if one hasn't been created yet.

Returns:
editing context to log events to the database

int getBufferSize (  ) 

Gets the buffer size.

Returns:
current buffer size

String getLoggingEntity (  ) 

Gets the logging entity name.

Returns:
logging entity name.

boolean requiresLayout (  ) 

The EOF Appender does not require a layout

Returns:
false

boolean safeToCreateEditingContext (  )  [protected]

Determines if enough of the EOF stack has been setup that it is safe to create an editing context and log events to the database.

Returns:
if any cooperating object stores have been created

void setBufferSize ( int  bufferSize  ) 

Sets the current buffer size. Must be set to a value greater than zero.

Parameters:
bufferSize size of the buffer

void setLoggingEntity ( String  name  ) 

Sets the logging entity name.

Parameters:
name name of the logging entity

void subAppend ( LoggingEvent  event  )  [protected]

This is where the real logging happens.

Parameters:
event current logging event


Member Data Documentation

int bufferSize = -1 [protected]

holds the buffer size, defaults to -1

boolean conditionsChecked = false [protected]

holds the flag if all the conditions for logging have been checked

int currentBufferSize = 1 [protected]

holds the current buffer size, defaults to 1

EOEditingContext ec [protected]

holds a reference to the logging editing context

String loggingEntity [protected]

holds the logging entity name


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:16 2012 for Project Wonder by  doxygen 1.5.8