LRAUV  revA
LogEngine Class Reference

Component responsible for handling the contents of the LogQueue. More...

#include <LogEngine.h>

Collaboration diagram for LogEngine:

Public Member Functions

 LogEngine ()
 Constructor for Logger. More...
 
 LogEngine (LogQueue &queue)
 Allows specification of the non-singleton queue. More...
 
virtual ~LogEngine ()
 Destructor for Logger. More...
 
virtual void resetInputs ()
 Reset cached input settings associated with LogWriters. More...
 
virtual void initialize (void)
 Initialize the component. More...
 
void processEntry (LogEntry *thisEntry)
 Deal with an entry as appropriate. More...
 
void processQueue (const Timespan &timeout)
 Pop log entries from the queue and deal with them as appropriate. More...
 
virtual void uninitialize (void)
 Deinitialize the component. More...
 
virtual LogAssociationaddAssociation (LogWriter *writer, Rule *rule)
 Add an entry to the LoggerAssociations table. More...
 
virtual void removeAssociation (LogWriter *writer)
 Remove an entry from the LoggerAssociations table. More...
 
void configAssociatedLogWriters (Logger &sysLogger)
 Configure logWriters. More...
 
void lockProcessing ()
 Stop processing. More...
 
void unlockProcessing ()
 Continue processing. More...
 

Protected Member Functions

void cleanupAll (void)
 

Protected Attributes

LogQueuequeue_
 For convenience, more than anything else. More...
 
Mutex mutex_
 Allows the supervisor to shut down log processing. More...
 
LoggerAssociationDeque associations_
 Stores all of the associations as a list. More...
 

Detailed Description

Component responsible for handling the contents of the LogQueue.

Typically, logEngine is called at the end of the computation cycle, although it could be run in its own thread.

When run, LogEngine extracts available LogEntries from the queue, and uses a set of recipes (LoggerAssociations) to match entries to output devices (LogWriter), which may be a binary or plain-text file, the console, etc.

Constructor & Destructor Documentation

LogEngine::LogEngine ( )

Constructor for Logger.

LogEngine::LogEngine ( LogQueue queue)

Allows specification of the non-singleton queue.

LogEngine::~LogEngine ( )
virtual

Destructor for Logger.

References uninitialize().

Member Function Documentation

LogAssociation * LogEngine::addAssociation ( LogWriter writer,
Rule rule 
)
virtual
void LogEngine::cleanupAll ( void  )
protected

References associations_, and FlexArrayBase::clear().

Referenced by uninitialize().

void LogEngine::configAssociatedLogWriters ( Logger sysLogger)
void LogEngine::initialize ( void  )
virtual

Initialize the component.

void LogEngine::lockProcessing ( )
inline

Stop processing.

References Mutex::lock(), and mutex_.

Referenced by Supervisor::RestartLogs().

void LogEngine::processEntry ( LogEntry thisEntry)

Deal with an entry as appropriate.

References associations_, FlexArrayBase::getMaxIndex(), FlexArrayBase::getMinIndex(), and mutex_.

Referenced by processQueue(), and BinaryLogReader::read().

void LogEngine::processQueue ( const Timespan timeout)
void LogEngine::removeAssociation ( LogWriter writer)
virtual

Remove an entry from the LoggerAssociations table.

References associations_, and LoggerAssociationDeque::remove().

void LogEngine::resetInputs ( )
virtual

Reset cached input settings associated with LogWriters.

Reset cached input settings.

References associations_, FlexArrayBase::getMaxIndex(), and FlexArrayBase::getMinIndex().

Referenced by Unserialize::Run().

void LogEngine::uninitialize ( void  )
virtual
void LogEngine::unlockProcessing ( )
inline

Continue processing.

References mutex_, and Mutex::unlock().

Referenced by Supervisor::RestartLogs().

Member Data Documentation

LoggerAssociationDeque LogEngine::associations_
protected
Mutex LogEngine::mutex_
protected

Allows the supervisor to shut down log processing.

Referenced by lockProcessing(), processEntry(), and unlockProcessing().

LogQueue& LogEngine::queue_
protected

For convenience, more than anything else.

Referenced by processQueue().


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