|
LRAUV
revA
|
Defines a LogWriter that can insert directory entries into a stream of data that is written to it, and handed off to the LogWriter provided in the outputTo constructor argument. More...
#include <DirectoryManagingLogWriter.h>


Public Member Functions | |
| DirectoryManagingLogWriter (LogWriter &outputTo) | |
| virtual | ~DirectoryManagingLogWriter () |
| void | resetDirectoryEntries () |
| unsigned int | writeHeader () |
| Write the log header, if any. More... | |
| unsigned int | writeFooter () |
| Write the log footer, if any. More... | |
| unsigned int | write (const LogEntry *entry, const Unit *unit) |
| Write the given LogEntry - should lock the writeMutex_. More... | |
| unsigned int | writeData (const DataEntry *dataEntry, const Unit *unit) |
| unsigned int | writeSyslog (const SyslogEntry *syslogEntry) |
Public Member Functions inherited from LogWriter | |
| virtual | ~LogWriter () |
| Destructor. More... | |
| virtual void | setOutStream (OutStream &outStream) |
| Sets the OutStream. More... | |
| virtual bool | isValid () |
| Return true if logStream_ is available. More... | |
| virtual void | endCycle () |
| Do what needs to be done at the end of the cycle. More... | |
| virtual void | config (Logger &logger) |
| Configure from a config file. More... | |
| virtual void | resetInputs () |
| Reset cached input settings. More... | |
| void | addParent () |
| void | removeParent () |
| int | getParentCount () |
| virtual void | activate () |
| virtual void | deactivate () |
| virtual bool | isActive () |
| virtual void | lockWrites () |
| virtual void | unlockWrites () |
Private Member Functions | |
| DirectoryManagingLogWriter (const DirectoryManagingLogWriter &old) | |
Private Attributes | |
| LogWriter & | outputTo_ |
| Stores an LogWriter. More... | |
| FlexArray< int * > | nameWrites_ |
| FlexArray< int * > | elementWrites_ |
Additional Inherited Members | |
Public Types inherited from LogWriter | |
| enum | ServiceType { NO_SERVICE = -1, SERVICE_COURIER, SERVICE_EXPRESS, SERVICE_PRIORITY, SERVICE_NORMAL, SERVICE_BULK, SERVICE_COUNT, SERVICE_MULTI } |
Static Public Member Functions inherited from LogWriter | |
| static ServiceType | Str2ServiceType (const char *const serviceTypeStr, int len=-1) |
| static const char * | ServiceType2Str (LogWriter::ServiceType serviceType) |
| static size_t | ServiceType2Strlen (LogWriter::ServiceType serviceType) |
Static Public Attributes inherited from LogWriter | |
| static const char *const | SERVICE_TYPE_STRS [SERVICE_COUNT] |
| static size_t const | SERVICE_TYPE_STRLEN [SERVICE_COUNT] |
Protected Member Functions inherited from LogWriter | |
| LogWriter () | |
| Protected constructor for pure virtual class. More... | |
| LogWriter (OutStream &outStream) | |
| Protected constructor for pure virtual class. More... | |
Protected Attributes inherited from LogWriter | |
| OutStream * | logStream_ |
| Stores an OutStream. More... | |
| bool | wroteHeader_ |
| bool | wroteFooter_ |
| Mutex | writeMutex_ |
| int | parentCount_ |
| bool | active_ |
Defines a LogWriter that can insert directory entries into a stream of data that is written to it, and handed off to the LogWriter provided in the outputTo constructor argument.
| DirectoryManagingLogWriter::DirectoryManagingLogWriter | ( | LogWriter & | outputTo | ) |
|
virtual |
|
private |
| void DirectoryManagingLogWriter::resetDirectoryEntries | ( | ) |
References elementWrites_, FlexArrayBase::getMaxIndex(), FlexArrayBase::getMinIndex(), and nameWrites_.
Referenced by DecimationLogManager::resetDirectoryEntries().
|
virtual |
Write the given LogEntry - should lock the writeMutex_.
Implements LogWriter.
References LogEntry::DATA_LOG_ENTRY, LogEntry::getType(), LogEntry::SYSLOG_LOG_ENTRY, writeData(), and writeSyslog().
| unsigned int DirectoryManagingLogWriter::writeData | ( | const DataEntry * | dataEntry, |
| const Unit * | unit | ||
| ) |
References elementWrites_, DataEntry::getDataAccess(), DataAccess::getElementCode(), Slate::GetElementURI(), Slate::GetName(), DataAccess::getOwnerCode(), nameWrites_, outputTo_, and LogWriter::write().
Referenced by DecimationLogManager::forceWrite(), and write().
|
virtual |
Write the log footer, if any.
Reimplemented from LogWriter.
References outputTo_, and LogWriter::writeFooter().
|
virtual |
Write the log header, if any.
Reimplemented from LogWriter.
References outputTo_, and LogWriter::writeHeader().
| unsigned int DirectoryManagingLogWriter::writeSyslog | ( | const SyslogEntry * | syslogEntry | ) |
References CodedStr::getCode(), SyslogEntry::getLoggerFacility(), nameWrites_, outputTo_, and LogWriter::write().
Referenced by write(), and DecimationLogManager::writeSyslog().
|
private |
Referenced by resetDirectoryEntries(), and writeData().
|
private |
Referenced by resetDirectoryEntries(), writeData(), and writeSyslog().
|
private |
Stores an LogWriter.
Referenced by writeData(), writeFooter(), writeHeader(), and writeSyslog().