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


Public Types | |
| enum | ServiceType { NO_SERVICE = -1, SERVICE_COURIER, SERVICE_EXPRESS, SERVICE_PRIORITY, SERVICE_NORMAL, SERVICE_BULK, SERVICE_COUNT, SERVICE_MULTI } |
Public Member Functions | |
| virtual | ~LogWriter () |
| Destructor. More... | |
| virtual unsigned int | writeHeader () |
| Write the log header, if any. More... | |
| virtual void | setOutStream (OutStream &outStream) |
| Sets the OutStream. More... | |
| virtual bool | isValid () |
| Return true if logStream_ is available. More... | |
| virtual unsigned int | write (const LogEntry *entry, const Unit *unit=NULL)=0 |
| Write the given LogEntry - should lock the writeMutex_. More... | |
| virtual void | endCycle () |
| Do what needs to be done at the end of the cycle. More... | |
| virtual unsigned int | writeFooter () |
| Write the log footer, if any. 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 () |
Static Public Member Functions | |
| 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 | |
| static const char *const | SERVICE_TYPE_STRS [SERVICE_COUNT] |
| static size_t const | SERVICE_TYPE_STRLEN [SERVICE_COUNT] |
Protected Member Functions | |
| LogWriter () | |
| Protected constructor for pure virtual class. More... | |
| LogWriter (OutStream &outStream) | |
| Protected constructor for pure virtual class. More... | |
Protected Attributes | |
| OutStream * | logStream_ |
| Stores an OutStream. More... | |
| bool | wroteHeader_ |
| bool | wroteFooter_ |
| Mutex | writeMutex_ |
| int | parentCount_ |
| bool | active_ |
Private Member Functions | |
| LogWriter (const LogWriter &old) | |
Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc.
|
virtual |
Destructor.
References writeFooter(), and wroteFooter_.
|
protected |
Protected constructor for pure virtual class.
Constructor.
|
protected |
Protected constructor for pure virtual class.
Constructor.
|
private |
|
inlinevirtual |
References active_.
|
inline |
References parentCount_.
Referenced by FileLogWriter::FileLogWriter(), FilterLogWriter::FilterLogWriter(), LogAssociation::LogAssociation(), and TableLogWriter::TableLogWriter().
|
inlinevirtual |
Configure from a config file.
Reimplemented in LinearApproxLogWriter, FilterLogWriter, and LinearApproximationLogWriter.
Referenced by FilterLogWriter::config(), LinearApproximationLogWriter::config(), LinearApproxLogWriter::config(), and LogAssociation::configLogWriter().
|
inlinevirtual |
References active_.
|
inlinevirtual |
Do what needs to be done at the end of the cycle.
Reimplemented in FileLogWriter, LinearApproxLogWriter, LinearApproximationLogWriter, FilterLogWriter, AllLogWriter, and MostRecentLogWriter.
Referenced by LogAssociation::endCycle(), AllLogWriter::endCycle(), MostRecentLogWriter::endCycle(), FilterLogWriter::endCycle(), LinearApproximationLogWriter::endCycle(), and LinearApproxLogWriter::endCycle().
|
inline |
References parentCount_.
Referenced by FileLogWriter::~FileLogWriter(), FilterLogWriter::~FilterLogWriter(), LogAssociation::~LogAssociation(), and TableLogWriter::~TableLogWriter().
|
inlinevirtual |
References active_.
Referenced by MultiLogWriter::flush(), and LogAssociation::matchAndProcess().
|
virtual |
Return true if logStream_ is available.
References OutStream::isWritable(), and logStream_.
Referenced by KmlLogWriter::write(), TextLogWriter::write(), KmlLogWriter::writeFooter(), TextTableLogWriter::writeHeader(), KmlLogWriter::writeHeader(), and TextTableLogWriter::writeRow().
|
inlinevirtual |
References Mutex::lock(), and writeMutex_.
Referenced by DecimationLogManager::lockWrites(), SplitFileLogWriter::resetFileBase(), and Supervisor::RestartLogs().
|
inline |
References parentCount_.
Referenced by FileLogWriter::~FileLogWriter(), FilterLogWriter::~FilterLogWriter(), LogAssociation::~LogAssociation(), and TableLogWriter::~TableLogWriter().
|
inlinevirtual |
Reset cached input settings.
Reimplemented in FilterLogWriter, FileLogWriter, and TableLogWriter.
Referenced by LogAssociation::resetInputs(), TableLogWriter::resetInputs(), FileLogWriter::resetInputs(), and FilterLogWriter::resetInputs().
|
static |
References SERVICE_COUNT, and SERVICE_TYPE_STRS.
Referenced by CommandLine::commandConfigSet(), CommandLine::commandRetransmit(), DecimationLogManager::configLog(), Supervisor::FilterCourier(), Supervisor::FilterCourierLzma(), Supervisor::FilterExpress(), Supervisor::FilterExpressLzma(), Supervisor::FilterNormal(), Supervisor::FilterNormalLzma(), Supervisor::FilterPriority(), Supervisor::FilterPriorityLzma(), DecimationLogManager::getFileWriter(), DecimationLogManager::resetDirectoryEntries(), DecimationLogManager::resetFileBases(), and ParsedCommand::toString().
|
static |
References SERVICE_COUNT, and SERVICE_TYPE_STRLEN.
Referenced by Supervisor::FilterCourier(), Supervisor::FilterCourierLzma(), Supervisor::FilterExpress(), Supervisor::FilterExpressLzma(), Supervisor::FilterNormal(), Supervisor::FilterNormalLzma(), Supervisor::FilterPriority(), and Supervisor::FilterPriorityLzma().
|
virtual |
|
static |
References AuvMath::Min(), NO_SERVICE, SERVICE_COUNT, SERVICE_MULTI, SERVICE_TYPE_STRLEN, and SERVICE_TYPE_STRS.
Referenced by SendDataComponent::Instance(), ParsedCommand::matchServiceType(), and Config::ParseLine().
|
inlinevirtual |
References Mutex::unlock(), and writeMutex_.
Referenced by SplitFileLogWriter::resetFileBase(), Supervisor::RestartLogs(), and DecimationLogManager::unlockWrites().
|
pure virtual |
Write the given LogEntry - should lock the writeMutex_.
Implemented in FileLogWriter, SplitFileLogWriter, BinaryLogWriter, LinearApproxLogWriter, TextLogWriter, HDF5LogWriter, NetCdfLogWriter, NetCdfTableLogWriter, FilterLogWriter, TableLogWriter, JsonLogWriter, MultiLogWriter, DirectoryManagingLogWriter, KmlLogWriter, AllLogWriter, and MostRecentLogWriter.
Referenced by MultiLogWriter::forceWrite(), LinearApproximationLogWriter::forceWrite(), LogAssociation::matchAndProcess(), LinearApproximationLogWriter::sendOutput(), LinearApproxLogWriter::sendOutput(), AllLogWriter::write(), MultiLogWriter::write(), FileLogWriter::write(), FilterLogWriter::writeCycleStart(), DirectoryManagingLogWriter::writeData(), FilterLogWriter::writeData(), Slate::WriteDataAccessEntry(), Slate::WriteElementURIEntry(), MostRecentLogWriter::writeFooter(), Slate::WriteNameEntry(), TableLogWriter::writeRow(), LinearApproximationLogWriter::writeRow(), DirectoryManagingLogWriter::writeSyslog(), MultiLogWriter::writeSyslog(), TableLogWriter::writeSyslog(), LinearApproximationLogWriter::writeSyslog(), and TableLogWriter::writeToColumn().
|
inlinevirtual |
Write the log footer, if any.
Reimplemented in FilterLogWriter, LinearApproxLogWriter, LinearApproximationLogWriter, HDF5LogWriter, NetCdfLogWriter, NetCdfTableLogWriter, TableLogWriter, JsonLogWriter, MultiLogWriter, KmlLogWriter, TextTableLogWriter, AllLogWriter, MostRecentLogWriter, and DirectoryManagingLogWriter.
Referenced by FileLogWriter::close(), SplitFileLogWriter::resetFileBase(), DirectoryManagingLogWriter::writeFooter(), AllLogWriter::writeFooter(), LogAssociation::writeFooter(), MultiLogWriter::writeFooter(), TableLogWriter::writeFooter(), ~LogWriter(), and TableLogWriter::~TableLogWriter().
|
inlinevirtual |
Write the log header, if any.
Reimplemented in LinearApproxLogWriter, LinearApproximationLogWriter, TableLogWriter, TextLogWriter, BinaryLogWriter, FilterLogWriter, HDF5LogWriter, NetCdfLogWriter, NetCdfTableLogWriter, JsonLogWriter, KmlLogWriter, MultiLogWriter, TextTableLogWriter, DirectoryManagingLogWriter, DirectoryLogWriter, AllLogWriter, and MostRecentLogWriter.
Referenced by FileLogWriter::FileLogWriter(), FileLogWriter::open(), AllLogWriter::writeHeader(), MostRecentLogWriter::writeHeader(), DirectoryManagingLogWriter::writeHeader(), MultiLogWriter::writeHeader(), TableLogWriter::writeHeader(), LinearApproximationLogWriter::writeHeader(), and LinearApproxLogWriter::writeHeader().
|
protected |
Referenced by activate(), deactivate(), and isActive().
|
protected |
Stores an OutStream.
Referenced by isValid(), setOutStream(), KmlLogWriter::write(), TextLogWriter::write(), BinaryLogWriter::write(), KmlLogWriter::writeFooter(), JsonLogWriter::writeFooter(), TextTableLogWriter::writeHeader(), KmlLogWriter::writeHeader(), BinaryLogWriter::writeHeader(), TextLogWriter::writeHeader(), TextTableLogWriter::writeRow(), and KmlLogWriter::writeSyslogItems().
|
protected |
Referenced by addParent(), getParentCount(), and removeParent().
|
static |
Referenced by ServiceType2Strlen(), and Str2ServiceType().
|
static |
Referenced by ServiceType2Str(), and Str2ServiceType().
|
protected |
Referenced by MultiLogWriter::flush(), MultiLogWriter::forceWrite(), lockWrites(), MultiLogWriter::setCurrent(), unlockWrites(), KmlLogWriter::write(), MultiLogWriter::write(), TableLogWriter::write(), FilterLogWriter::write(), TextLogWriter::write(), BinaryLogWriter::write(), FileLogWriter::write(), and MultiLogWriter::writeSyslog().
|
protected |
Referenced by FileLogWriter::open(), TextTableLogWriter::writeFooter(), KmlLogWriter::writeFooter(), JsonLogWriter::writeFooter(), NetCdfLogWriter::writeFooter(), NetCdfTableLogWriter::writeFooter(), HDF5LogWriter::writeFooter(), FilterLogWriter::writeFooter(), KmlLogWriter::writeHeader(), LinearApproximationLogWriter::~LinearApproximationLogWriter(), LinearApproxLogWriter::~LinearApproxLogWriter(), and ~LogWriter().
|
protected |