|
LRAUV
revA
|
Only writes a the most recent value when flush() or writeFooter() is called. More...
#include <MostRecentLogWriter.h>


Public Member Functions | |
| MostRecentLogWriter (LogWriter &outputTo) | |
| Constructor. More... | |
| virtual | ~MostRecentLogWriter () |
| 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 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 unsigned int | flush () |
| Flush data to output if any. More... | |
Public Member Functions inherited from DecimationLogWriter | |
| DecimationLogWriter (LogWriter &outputTo, DecimationType decimationType) | |
| Constructor. More... | |
| virtual | ~DecimationLogWriter () |
| Destructor. More... | |
| DecimationType | getDecimationType () const |
| virtual void | setParameter (DataValue *parameter, Logger &logger) |
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 | 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 | |
| MostRecentLogWriter (const MostRecentLogWriter &old) | |
| void | wipe () |
Private Attributes | |
| Timestamp | timestamp_ |
| const Unit * | unit_ |
| LogEntry::Type | type_ |
| DataAccess * | dataAccess_ |
| DataValue * | dataValue_ |
| bool | best_ |
| Str | message_ |
| Syslog::Severity | severity_ |
| const CodedStr * | loggerFacility_ |
Additional Inherited Members | |
Public Types inherited from DecimationLogWriter | |
| enum | DecimationType { UNDEFINED_DECIMATION = -1, NO_DECIMATION, ALL_DATA, LINEAR_APPROXIMATION, MOST_RECENT, DECIMATION_COUNT, DECIMATION_MULTI } |
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 DecimationLogWriter | |
| static const char * | DecimationType2Str (DecimationLogWriter::DecimationType decimationType) |
| static DecimationType | Str2DecimationType (const char *const typeStr, int len=-1) |
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 DecimationLogWriter | |
| static const char *const | DECIMATION_TYPE_STRS [DECIMATION_COUNT] |
| static const size_t | DECIMATION_TYPE_STRLEN [DECIMATION_COUNT] |
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 DecimationLogWriter | |
| LogWriter & | outputTo_ |
| Stores an LogWriter. More... | |
| DecimationType | decimationType_ |
| Stores the decimationType. More... | |
Protected Attributes inherited from LogWriter | |
| OutStream * | logStream_ |
| Stores an OutStream. More... | |
| bool | wroteHeader_ |
| bool | wroteFooter_ |
| Mutex | writeMutex_ |
| int | parentCount_ |
| bool | active_ |
Only writes a the most recent value when flush() or writeFooter() is called.
|
virtual |
Destructor.
|
private |
|
virtual |
Do what needs to be done at the end of the cycle.
Reimplemented from LogWriter.
References LogWriter::endCycle(), and DecimationLogWriter::outputTo_.
|
inlinevirtual |
|
private |
References best_, dataAccess_, dataValue_, Str::EMPTY_STR, loggerFacility_, message_, Syslog::NONE, LogEntry::NOT_LOG_ENTRY, Timestamp::NOT_SET_TIME, severity_, timestamp_, type_, and unit_.
Referenced by MostRecentLogWriter(), write(), and writeFooter().
|
virtual |
Write the given LogEntry - should lock the writeMutex_.
Implements LogWriter.
References best_, DataValue::copy(), LogEntry::DATA_LOG_ENTRY, dataAccess_, dataValue_, DataEntry::getDataAccess(), DataEntry::getDataValue(), SyslogEntry::getLoggerFacility(), SyslogEntry::getMessage(), SyslogEntry::getSeverity(), LogEntry::getTimestamp(), LogEntry::getType(), DataEntry::isBest(), loggerFacility_, message_, severity_, LogEntry::SYSLOG_LOG_ENTRY, timestamp_, type_, unit_, and wipe().
|
virtual |
Write the log footer, if any.
Reimplemented from LogWriter.
References best_, LogEntry::DATA_LOG_ENTRY, dataAccess_, dataValue_, loggerFacility_, message_, DecimationLogWriter::outputTo_, severity_, LogEntry::SYSLOG_LOG_ENTRY, timestamp_, type_, unit_, wipe(), and LogWriter::write().
Referenced by flush().
|
virtual |
Write the log header, if any.
Reimplemented from LogWriter.
References DecimationLogWriter::outputTo_, LogWriter::writeHeader(), and LogWriter::wroteHeader_.
|
private |
Referenced by wipe(), write(), and writeFooter().
|
private |
Referenced by wipe(), write(), and writeFooter().
|
private |
Referenced by wipe(), write(), and writeFooter().
|
private |
Referenced by wipe(), write(), and writeFooter().
|
private |
Referenced by wipe(), write(), and writeFooter().
|
private |
Referenced by wipe(), write(), and writeFooter().
|
private |
Referenced by wipe(), write(), and writeFooter().
|
private |
Referenced by wipe(), write(), and writeFooter().
|
private |
Referenced by wipe(), write(), and writeFooter().