LRAUV  revA
Logging

Logging subsystem. More...

Classes

class  AllLogWriter
 Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc. More...
 
class  BinaryLogReader
 Defines a LogReader specific to writing binary values to a stream See FileLogReader for input from the filesystem. More...
 
class  BinaryLogWriter
 Defines a LogWriter specific to writing binary values to a stream See FileLogWriter for output to the filesystem. More...
 
class  DataEntry
 Code unit that represents an atomic unit of data destined for writing in the log file. More...
 
class  DataEntry::StaticDestructor
 Makes sure that mallocRing_s is deleted on shutdown. More...
 
class  DecimationLogWriter
 Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc. More...
 
class  DirectoryEntry
 Code unit that represents an event to be stored in the log file. More...
 
class  DirectoryEntry::StaticDestructor
 Makes sure that mallocRing_s is deleted on shutdown. More...
 
class  DirectoryLogWriter
 Defines a LogWriter specific to writing binary values to a stream See FileLogWriter for output to the filesystem. More...
 
class  DirectoryManagingLogWriter
 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...
 
class  EventEntry
 Code unit that represents an event to be stored in the log file. More...
 
class  EventEntry::StaticDestructor
 Makes sure that mallocRing_s is deleted on shutdown. More...
 
class  FileLogReader
 Wraps around another LogReader to read LogEntries to a file. More...
 
class  FileLogWriter
 Wraps around another LogWriter to write LogEntries to a file. More...
 
class  FilterLogWriter
 Defines a LogWriter that generates a text table of values. More...
 
class  HasFilename
 Simple Interface that contains getFilename() function. More...
 
class  HDF5LogWriter
 Defines a LogWriter that generates a NetCDF table of values. More...
 
class  JsonLogWriter
 Defines a LogWriter that generates a JSON table of values. More...
 
class  KmlLogWriter
 Defines a LogWriter that can convert Location and depth triples into write kml format text (see http://en.wikipedia.org/wiki/Kml ) More...
 
class  KmlLogWriter::SyslogItem
 
class  LinearApproximationLogWriter
 Defines a LogWriter that can perform lossy decimation on a stream of DataEntries, by outputting values that can be reconstructed via linear interpolation. More...
 
class  LinearApproximationLogWriter::VarData
 
class  LinearApproxLogWriter
 Defines a LogWriter that can perform lossy decimation on a stream of DataEntries, by outputting values that can be reconstructed via linear interpolation. More...
 
class  LinearApproxLogWriter::VarData
 
class  LogEngine
 Component responsible for handling the contents of the LogQueue. More...
 
class  LogEngineComponent
 Component responsible for handling the contents of the LogQueue. More...
 
class  LogEntry
 One "entry" in a LogQueue. More...
 
class  Logger
 Client-side interface for injecting log data into the log queue. More...
 
class  Rule
 Abstract base class for classes that are used by LogEngine to determine which LogWriter(s) to use for each LogEntry as they are popped off the LogQueue. More...
 
class  AndRule
 A logging Rule implementing a logical AND() between two other rules. More...
 
class  OrRule
 A logging Rule implementing a logical OR() between two other rules. More...
 
class  NotRule
 A logging Rule implementing a logical NOT() of another rules. More...
 
class  TypeRule
 A logging Rule which matches against a given LogEntry::Type. More...
 
class  EventTypeRule
 A Logger Rule which matches against a given LogEvent::EventEntry. More...
 
class  SyslogSeverityRule
 A Logger Rule which matches against a given SyslogSeverity If the SyslogEntry's severity equals or exceeds the specified severity the the SyslogSeverityRule return true. More...
 
class  SyslogStartRule
 A Logger Rule which matches against the starting text of a SyslogEntry. More...
 
class  DataWriteRule
 A Logger Rule which specifies either data writes or data reads. More...
 
class  DataNameRule
 A Logger Rule which specifies either data writes or data reads using an element with an ElementURI matching the supplied name If dataName should be deleted (by delete[]) by the destructor, then delteName should be true; If the DataEntry corresponds to a write event and the specified dataWrite entry was true, then DataWriteRule returns true. More...
 
class  LogQueue
 Singleton wrapper for queue. More...
 
class  LogQueue::StaticDestructor
 Makes sure that static objects are deleted on shutdown. More...
 
class  LogReader
 Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc. More...
 
class  LogWriter
 Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc. More...
 
class  MissionStateLogger
 Serializes and unserializes mission state to allow missions to be resumed. More...
 
class  MissionStateLogger::StaticDestructor
 Makes sure that CurrentStream_ is deleted on shutdown. More...
 
class  MissionStateLogger::StreamEntry
 
struct  MissionStateLogger::StateInfo
 
class  MostRecentLogWriter
 Only writes a the most recent value when flush() or writeFooter() is called. More...
 
class  MultiLogWriter
 Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc. More...
 
class  NetCdfLogWriter
 Defines a LogWriter that generates a NetCDF table of values. More...
 
class  NetCdfTableLogWriter
 Defines a LogWriter that generates a NetCDF table of values. More...
 
class  Reporter
 Component responsible for handling periodic logging of variable values to the syslog and the console, etc. More...
 
class  Reporter::ReportItem
 Keeps track of which how we have to report each DataElement. More...
 
class  SplitFileLogWriter
 Writes LogEntries to files that are split over time or capacity. More...
 
class  Syslog
 Logging utility class that provides enumeration of the severity associated with each textual SyslogEntry object. More...
 
class  SyslogEntry
 LogEntry with information specific to "Syslog"-like text logs. More...
 
class  SyslogEntry::StaticDestructor
 Makes sure that mallocRing_s is deleted on shutdown. More...
 
class  TableLogWriter
 Defines a LogWriter that generates a text table of values. More...
 
class  TextLogWriter
 Defines a simple LogWriter that takes LogEntries and serializes them as text values to a stream. More...
 
class  TextTableLogWriter
 Defines a LogWriter that generates a text table of values. More...
 
class  Maintainer
 Component responsible for handling periodic logging of variable values to the syslog and the console, etc. More...
 
class  Maintainer::MaintainItem
 Keeps track of which how we have to maintain each DataElement. More...
 

Enumerations

enum  DataEntry::Best { DataEntry::NOT_BEST = 0x0000, DataEntry::IS_BEST = 0x0004 }
 Type of event. More...
 
enum  DecimationLogWriter::DecimationType {
  DecimationLogWriter::UNDEFINED_DECIMATION = -1, DecimationLogWriter::NO_DECIMATION, DecimationLogWriter::ALL_DATA, DecimationLogWriter::LINEAR_APPROXIMATION,
  DecimationLogWriter::MOST_RECENT, DecimationLogWriter::DECIMATION_COUNT, DecimationLogWriter::DECIMATION_MULTI
}
 
enum  DirectoryEntry::DirectoryType { DirectoryEntry::ACCESSOR = 'a', DirectoryEntry::ELEMENT = 'e', DirectoryEntry::NAME = 'n', DirectoryEntry::VERSION = 'v' }
 Type of directory entry. More...
 
enum  EventEntry::EventType { EventEntry::START_CYCLE = 0, EventEntry::SET_DATA_ACCURACY = 1 << 2, EventEntry::SET_DATA_STATE = 2 << 2, EventEntry::COMPONENT_ACTION = 3 << 2 }
 Type of data event. More...
 
enum  EventEntry::DataStateChange {
  EventEntry::NO_DATA_STATE_CHANGE = 0, EventEntry::DATA_STATE_CHANGE_UNAVAILABLE = 2, EventEntry::DATA_STATE_CHANGE_AVAILABLE = 4, EventEntry::DATA_STATE_CHANGE_ORPHANED = 8,
  EventEntry::DATA_STATE_CHANGE_UNORPHANED = 16, EventEntry::DATA_STATE_CHANGE_SET_BEST = 32, EventEntry::DATA_STATE_CHANGE_INVALID = 64, EventEntry::DATA_STATE_CHANGE_VALID = 128
}
 
enum  EventEntry::ComponentAction { EventEntry::COMPONENT_LOAD = 0, EventEntry::COMPONENT_MISSION_RUN = 1 << 2, EventEntry::COMPONENT_FAIL = 2 << 2 }
 Type of component event. More...
 
enum  FileLogWriter::FlushFreq { FileLogWriter::FLUSH_ONCE = 0, FileLogWriter::FLUSH_PER_CYCLE = 1, FileLogWriter::FLUSH_PER_WRITE }
 
enum  LogEntry::Type {
  LogEntry::NOT_LOG_ENTRY = -1, LogEntry::EVENT_LOG_ENTRY = 0, LogEntry::DIRECTORY_LOG_ENTRY = 1, LogEntry::DATA_LOG_ENTRY = 2,
  LogEntry::SYSLOG_LOG_ENTRY = 3
}
 Defines an enum for "typing" the various LogEntries. More...
 
enum  Logger::TimePrecisionType { Logger::TIME_PRECISION_MICROS, Logger::TIME_PRECISION_MILLIS }
 
enum  LogWriter::ServiceType {
  LogWriter::NO_SERVICE = -1, LogWriter::SERVICE_COURIER, LogWriter::SERVICE_EXPRESS, LogWriter::SERVICE_PRIORITY,
  LogWriter::SERVICE_NORMAL, LogWriter::SERVICE_BULK, LogWriter::SERVICE_COUNT, LogWriter::SERVICE_MULTI
}
 
enum  Reporter::ReportType { Reporter::REPORT_CHANGE = 0, Reporter::REPORT_PERIODICALLY = 1, Reporter::REPORT_TOUCHED = 2 }
 
enum  Syslog::Severity {
  Syslog::NONE = -1, Syslog::DEBUG = 0x0000, Syslog::INFO = 0x0004, Syslog::ERROR = 0x0008,
  Syslog::IMPORTANT = 0x000C, Syslog::CRITICAL = 0x0010, Syslog::FAULT = 0x0014
}
 An attempt to define different levels of syslog severity. More...
 

Functions

int main (int argc, char **argv)
 main() code for the unserialize application. More...
 

Detailed Description

Logging subsystem.

The Logging subsystem has four layers

Under normal operation, there is a singleton LogQueue object. Objects have instances of the Logger, which handles "writing" to the queue. They create instances of LogEntry (typically handled by the Logger), and drop them in the queue.

The backend is handled by the LogEngine, which is a Component and may run either synchronously with the rest of the software, or asynchronously (in its own thread), but It must be run for anything to happen logging-wise. In the current implementation LogEngine is run synchronously with the rest of the software

When run, the 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.

Enumeration Type Documentation

Type of event.

Enumerator
NOT_BEST 
IS_BEST 

Type of component event.

Enumerator
COMPONENT_LOAD 
COMPONENT_MISSION_RUN 

Followed by boolean true or false to indicate load/unload.

COMPONENT_FAIL 

Followed by 0=done, positive=loop#, negative=preempted in loop#.

Enumerator
NO_DATA_STATE_CHANGE 
DATA_STATE_CHANGE_UNAVAILABLE 
DATA_STATE_CHANGE_AVAILABLE 
DATA_STATE_CHANGE_ORPHANED 
DATA_STATE_CHANGE_UNORPHANED 
DATA_STATE_CHANGE_SET_BEST 
DATA_STATE_CHANGE_INVALID 

Indicate change to the "best" of associated universal.

DATA_STATE_CHANGE_VALID 
Enumerator
UNDEFINED_DECIMATION 
NO_DECIMATION 
ALL_DATA 
LINEAR_APPROXIMATION 
MOST_RECENT 
DECIMATION_COUNT 
DECIMATION_MULTI 

Type of directory entry.

Enumerator
ACCESSOR 
ELEMENT 

Defines an Accessor. Appears as "<a".

NAME 

Defines an ElementUri. Appears as "<e".

VERSION 

Defines an Name. Appears as "<n".

Type of data event.

Enumerator
START_CYCLE 
SET_DATA_ACCURACY 

Start of a cycle.

SET_DATA_STATE 

Change of Data Accuracy.

COMPONENT_ACTION 

Indicate change to/from best, failed, orphaned, etc.

Enumerator
FLUSH_ONCE 
FLUSH_PER_CYCLE 
FLUSH_PER_WRITE 
Enumerator
REPORT_CHANGE 
REPORT_PERIODICALLY 
REPORT_TOUCHED 
Enumerator
NO_SERVICE 
SERVICE_COURIER 
SERVICE_EXPRESS 
SERVICE_PRIORITY 
SERVICE_NORMAL 
SERVICE_BULK 
SERVICE_COUNT 
SERVICE_MULTI 

An attempt to define different levels of syslog severity.

Enumerator
NONE 
DEBUG 
INFO 
ERROR 
IMPORTANT 
CRITICAL 
FAULT 
Enumerator
TIME_PRECISION_MICROS 
TIME_PRECISION_MILLIS 

Defines an enum for "typing" the various LogEntries.

Enumerator
NOT_LOG_ENTRY 
EVENT_LOG_ENTRY 
DIRECTORY_LOG_ENTRY 
DATA_LOG_ENTRY 
SYSLOG_LOG_ENTRY 

Function Documentation

int main ( int  argc,
char **  argv 
)

main() code for the unserialize application.

References Unserialize::Run().