LRAUV  revA
DirectoryManagingLogWriter Class Reference

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>

Inheritance diagram for DirectoryManagingLogWriter:
Collaboration diagram for DirectoryManagingLogWriter:

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

LogWriteroutputTo_
 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
OutStreamlogStream_
 Stores an OutStream. More...
 
bool wroteHeader_
 
bool wroteFooter_
 
Mutex writeMutex_
 
int parentCount_
 
bool active_
 

Detailed Description

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.

Constructor & Destructor Documentation

DirectoryManagingLogWriter::DirectoryManagingLogWriter ( LogWriter outputTo)
DirectoryManagingLogWriter::~DirectoryManagingLogWriter ( )
virtual
DirectoryManagingLogWriter::DirectoryManagingLogWriter ( const DirectoryManagingLogWriter old)
private

Member Function Documentation

void DirectoryManagingLogWriter::resetDirectoryEntries ( )
unsigned int DirectoryManagingLogWriter::write ( const LogEntry entry,
const Unit unit 
)
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 
)
unsigned int DirectoryManagingLogWriter::writeFooter ( )
virtual

Write the log footer, if any.

Reimplemented from LogWriter.

References outputTo_, and LogWriter::writeFooter().

unsigned int DirectoryManagingLogWriter::writeHeader ( )
virtual

Write the log header, if any.

Reimplemented from LogWriter.

References outputTo_, and LogWriter::writeHeader().

unsigned int DirectoryManagingLogWriter::writeSyslog ( const SyslogEntry syslogEntry)

Member Data Documentation

FlexArray< int* > DirectoryManagingLogWriter::elementWrites_
private

Referenced by resetDirectoryEntries(), and writeData().

FlexArray< int* > DirectoryManagingLogWriter::nameWrites_
private
LogWriter& DirectoryManagingLogWriter::outputTo_
private

The documentation for this class was generated from the following files: