|
LRAUV
revA
|
Component responsible for handling the contents of the LogQueue. More...
#include <LogEngine.h>

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 LogAssociation * | addAssociation (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 | |
| LogQueue & | queue_ |
| 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... | |
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.
| LogEngine::LogEngine | ( | ) |
Constructor for Logger.
| LogEngine::LogEngine | ( | LogQueue & | queue | ) |
Allows specification of the non-singleton queue.
|
virtual |
Destructor for Logger.
References uninitialize().
|
virtual |
Add an entry to the LoggerAssociations table.
References LoggerAssociationDeque::add(), and associations_.
Referenced by DecimationLogManager::configLog(), DecimationLogManager::DecimationLogManager(), Supervisor::initialize(), main(), Unserialize::Run(), and OffshoreEnvelope_Test::tearDown().
|
protected |
References associations_, and FlexArrayBase::clear().
Referenced by uninitialize().
| void LogEngine::configAssociatedLogWriters | ( | Logger & | sysLogger | ) |
Configure logWriters.
References associations_, FlexArrayBase::getMaxIndex(), and FlexArrayBase::getMinIndex().
Referenced by Supervisor::configure().
|
virtual |
Initialize the component.
|
inline |
| 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 | ) |
Pop log entries from the queue and deal with them as appropriate.
If a non-zero timeout is specified, stop after that much time has passed
References associations_, Timestamp::elapsed(), FlexArrayBase::getMaxIndex(), FlexArrayBase::getMinIndex(), LogQueue::isEmpty(), Timestamp::Now(), LogQueue::pop(), processEntry(), queue_, and Timespan::ZERO_TIMESPAN.
Referenced by main(), BinaryLogReader::read(), LogEngineComponent::run(), Unserialize::Run(), ValueDetect_Test::tearDown(), OffshoreEnvelope_Test::tearDown(), OffshoreEnvelope_Test::testRun(), and uninitialize().
|
virtual |
Remove an entry from the LoggerAssociations table.
References associations_, and LoggerAssociationDeque::remove().
|
virtual |
Reset cached input settings associated with LogWriters.
Reset cached input settings.
References associations_, FlexArrayBase::getMaxIndex(), and FlexArrayBase::getMinIndex().
Referenced by Unserialize::Run().
|
virtual |
Deinitialize the component.
References associations_, cleanupAll(), FlexArrayBase::getMaxIndex(), FlexArrayBase::getMinIndex(), processQueue(), and Timespan::ZERO_TIMESPAN.
Referenced by Unserialize::Run(), and ~LogEngine().
|
inline |
Continue processing.
References mutex_, and Mutex::unlock().
Referenced by Supervisor::RestartLogs().
|
protected |
Stores all of the associations as a list.
Referenced by addAssociation(), cleanupAll(), configAssociatedLogWriters(), processEntry(), processQueue(), removeAssociation(), resetInputs(), and uninitialize().
|
protected |
Allows the supervisor to shut down log processing.
Referenced by lockProcessing(), processEntry(), and unlockProcessing().
|
protected |
For convenience, more than anything else.
Referenced by processQueue().