LRAUV  revA
MultiLogWriter Class Reference

Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc. More...

#include <MultiLogWriter.h>

Inheritance diagram for MultiLogWriter:
Collaboration diagram for MultiLogWriter:

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

DecimationLogWritergetCurrent ()
 
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

LogWriteroutputTo_
 
const Str varName_
 
const bool makeDirEntries_
 
bool nameWritten_
 
DataAccessdataAccess_
 
bool dataAccessHidden_
 
DecimationLogWritercurrentLogWriter_
 
- Protected Attributes inherited from LogWriter
OutStreamlogStream_
 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]
 

Detailed Description

Base class for a generalized set of "log data destinations," including to files (text or binary), over communications links, etc.

Constructor & Destructor Documentation

MultiLogWriter::MultiLogWriter ( LogWriter outputTo,
const Str name 
)

Constructor.

MultiLogWriter::~MultiLogWriter ( )
virtual

Destructor.

References currentLogWriter_, and dataAccess_.

MultiLogWriter::MultiLogWriter ( const MultiLogWriter old)
private

Member Function Documentation

unsigned int MultiLogWriter::flush ( )
DecimationLogWriter* MultiLogWriter::getCurrent ( )
inlineprotected
void MultiLogWriter::resetDirectoryEntries ( )
void MultiLogWriter::setCurrent ( DecimationLogWriter newLogWriter)
protected
unsigned int MultiLogWriter::writeFooter ( )
virtual

Write the log footer, if any.

Reimplemented from LogWriter.

References currentLogWriter_, and LogWriter::writeFooter().

Referenced by DecimationLogManager::writeFooters().

unsigned int MultiLogWriter::writeHeader ( )
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)

Friends And Related Function Documentation

friend class DecimationLogManager
friend

Member Data Documentation

DecimationLogWriter* MultiLogWriter::currentLogWriter_
protected
DataAccess* MultiLogWriter::dataAccess_
protected

Referenced by forceWrite(), write(), and ~MultiLogWriter().

bool MultiLogWriter::dataAccessHidden_
protected
const bool MultiLogWriter::makeDirEntries_
protected

Referenced by write().

bool MultiLogWriter::nameWritten_
protected
LogWriter& MultiLogWriter::outputTo_
protected

Referenced by forceWrite(), write(), and writeSyslog().

const Str MultiLogWriter::varName_
protected

Referenced by write().


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