|
LRAUV
revA
|
Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc. More...
#include <MultiLogWriter.h>


Public Member Functions | |
| MultiLogWriter (LogWriter &outputTo, const Str &name) | |
| Constructor. More... | |
| virtual | ~MultiLogWriter () |
| Destructor. More... | |
| virtual unsigned int | writeHeader () |
| Write the log header, if any. More... | |
| virtual unsigned int | write (const LogEntry *entry, const Unit *unit=NULL) |
| Write the given LogEntry - should lock the writeMutex_. More... | |
| virtual unsigned int | writeFooter () |
| Write the log footer, if any. More... | |
| void | resetDirectoryEntries () |
| unsigned int | forceWrite (DataEntry *dataEntry) |
| unsigned int | writeSyslog (const SyslogEntry *syslogEntry) |
| unsigned int | flush () |
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 () |
Protected Member Functions | |
| DecimationLogWriter * | getCurrent () |
| void | setCurrent (DecimationLogWriter *newLogWriter) |
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 | |
| LogWriter & | outputTo_ |
| const Str | varName_ |
| const bool | makeDirEntries_ |
| bool | nameWritten_ |
| DataAccess * | dataAccess_ |
| bool | dataAccessHidden_ |
| DecimationLogWriter * | currentLogWriter_ |
Protected Attributes inherited from LogWriter | |
| OutStream * | logStream_ |
| Stores an OutStream. More... | |
| bool | wroteHeader_ |
| bool | wroteFooter_ |
| Mutex | writeMutex_ |
| int | parentCount_ |
| bool | active_ |
Private Member Functions | |
| MultiLogWriter (const MultiLogWriter &old) | |
Friends | |
| class | DecimationLogManager |
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] |
Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc.
|
virtual |
Destructor.
References currentLogWriter_, and dataAccess_.
|
private |
| unsigned int MultiLogWriter::flush | ( | ) |
References currentLogWriter_, DecimationLogWriter::flush(), LogWriter::isActive(), and LogWriter::writeMutex_.
Referenced by DecimationLogManager::flush().
| unsigned int MultiLogWriter::forceWrite | ( | DataEntry * | dataEntry | ) |
|
inlineprotected |
References currentLogWriter_.
Referenced by DecimationLogManager::configLog().
| void MultiLogWriter::resetDirectoryEntries | ( | ) |
References dataAccessHidden_, and nameWritten_.
Referenced by DecimationLogManager::resetDirectoryEntries().
|
protected |
References currentLogWriter_, and LogWriter::writeMutex_.
Referenced by DecimationLogManager::configLog().
Write the given LogEntry - should lock the writeMutex_.
Implements LogWriter.
References Str::cStr(), currentLogWriter_, LogEntry::DATA_LOG_ENTRY, dataAccess_, dataAccessHidden_, Str::find(), Slate::FindCodedName(), DataAccess::getAccessorType(), DataAccess::getBinaryType(), CodedStr::getCode(), DataAccess::getCode(), DataEntry::getDataAccess(), DecimationLogWriter::getDecimationType(), Slate::GetElementURI(), Slate::GetElementURICode(), Unit::getName(), DataAccess::getTimePrecision(), LogEntry::getType(), DataAccess::getTypeSize(), DataAccess::getUnit(), DataAccess::getUniversalCode(), Str::length(), DecimationLogWriter::LINEAR_APPROXIMATION, makeDirEntries_, nameWritten_, ElementURI::NO_CODE, CodedStr::NO_CODE, outputTo_, DataEntry::setDataAccess(), varName_, LogWriter::write(), and LogWriter::writeMutex_.
|
virtual |
Write the log footer, if any.
Reimplemented from LogWriter.
References currentLogWriter_, and LogWriter::writeFooter().
Referenced by DecimationLogManager::writeFooters().
|
virtual |
Write the log header, if any.
Reimplemented from LogWriter.
References currentLogWriter_, LogWriter::writeHeader(), and LogWriter::wroteHeader_.
Referenced by DecimationLogManager::writeHeaders().
| unsigned int MultiLogWriter::writeSyslog | ( | const SyslogEntry * | syslogEntry | ) |
References SyslogEntry::getLoggerFacility(), nameWritten_, outputTo_, LogWriter::write(), and LogWriter::writeMutex_.
|
friend |
|
protected |
Referenced by flush(), getCurrent(), setCurrent(), write(), writeFooter(), writeHeader(), and ~MultiLogWriter().
|
protected |
Referenced by forceWrite(), write(), and ~MultiLogWriter().
|
protected |
Referenced by forceWrite(), resetDirectoryEntries(), and write().
|
protected |
Referenced by write().
|
protected |
Referenced by forceWrite(), resetDirectoryEntries(), write(), and writeSyslog().
|
protected |
Referenced by forceWrite(), write(), and writeSyslog().