Client-side interface for injecting log data into the log queue.
Definition: Logger.h:30
Definition: LogWriter.h:34
void removeParent()
Definition: LogWriter.h:89
Base class for a generalized set of "log data destinations," including to files (text or binary)...
Definition: LogWriter.h:25
static const char * ServiceType2Str(LogWriter::ServiceType serviceType)
Definition: LogWriter.cpp:68
virtual void resetInputs()
Reset cached input settings.
Definition: LogWriter.h:82
void addParent()
Definition: LogWriter.h:84
int getParentCount()
Definition: LogWriter.h:94
OutStream * logStream_
Stores an OutStream.
Definition: LogWriter.h:133
virtual void endCycle()
Do what needs to be done at the end of the cycle.
Definition: LogWriter.h:70
int unlock()
Unlock the mutex.
Definition: Mutex.cpp:51
A simple pthread Mutex abstraction.
Definition: Mutex.h:20
virtual void config(Logger &logger)
Configure from a config file.
Definition: LogWriter.h:79
bool wroteHeader_
Definition: LogWriter.h:135
virtual unsigned int write(const LogEntry *entry, const Unit *unit=NULL)=0
Write the given LogEntry - should lock the writeMutex_.
virtual void deactivate()
Definition: LogWriter.h:104
Definition: LogWriter.h:37
One "entry" in a LogQueue.
Definition: LogEntry.h:33
Definition: LogWriter.h:33
Contains the FlexArrayBase and FlexArray class declarations.
Definition: LogWriter.h:38
Contains the AuvMath class declaration.
ServiceType
Definition: LogWriter.h:29
Definition: LogWriter.h:36
virtual bool isValid()
Return true if logStream_ is available.
Definition: LogWriter.cpp:115
Contains the LogEntry class definition.
Definition: LogWriter.h:32
Definition: LogWriter.h:31
virtual bool isActive()
Definition: LogWriter.h:109
Mutex writeMutex_
Definition: LogWriter.h:139
virtual void lockWrites()
Definition: LogWriter.h:114
static size_t ServiceType2Strlen(LogWriter::ServiceType serviceType)
Definition: LogWriter.cpp:77
LogWriter()
Protected constructor for pure virtual class.
Definition: LogWriter.cpp:88
Contains the Mutex, ThreadCondition, and MutexLocker class declarations.
static const char *const SERVICE_TYPE_STRS[SERVICE_COUNT]
Definition: LogWriter.h:47
virtual unsigned int writeHeader()
Write the log header, if any.
Definition: LogWriter.h:55
static size_t const SERVICE_TYPE_STRLEN[SERVICE_COUNT]
Definition: LogWriter.h:49
static ServiceType Str2ServiceType(const char *const serviceTypeStr, int len=-1)
Definition: LogWriter.cpp:32
int parentCount_
Definition: LogWriter.h:141
virtual void unlockWrites()
Definition: LogWriter.h:119
bool wroteFooter_
Definition: LogWriter.h:137
This is a very abstract class that can be implemented by classes that want to send stream output...
Definition: OutStream.h:41
virtual ~LogWriter()
Destructor.
Definition: LogWriter.cpp:106
bool active_
Definition: LogWriter.h:143
virtual void setOutStream(OutStream &outStream)
Sets the OutStream.
Definition: LogWriter.cpp:121
virtual void activate()
Definition: LogWriter.h:99
int lock()
Lock the mutex.
Definition: Mutex.cpp:34
Code that represents an engineering unit.
Definition: Unit.h:24
Definition: LogWriter.h:35
virtual unsigned int writeFooter()
Write the log footer, if any.
Definition: LogWriter.h:73