LRAUV  revA
DecimationLogManager.h
Go to the documentation of this file.
1 
10 #ifndef DECIMATIONLOGMANAGER_H_
11 #define DECIMATIONLOGMANAGER_H_
12 
14 #include "logger/LogEngine.h"
15 #include "utils/FastMap.h"
16 #include "utils/FlexArray.h"
17 
18 class DataValue;
20 class MultiLogWriter;
21 class SplitFileLogWriter;
22 
24 {
25 public:
26 
27  DecimationLogManager( LogEngine& logEngine, Str& dataDir );
28 
29  virtual ~DecimationLogManager();
30 
31  void configLog( LogWriter::ServiceType serviceType,
33  const Str& name, DataValue* parameter, Logger& logger );
34 
36 
37  void lockWrites();
38 
39  void unlockWrites();
40 
41  void splits();
42 
43  void writeHeaders();
44 
45  void writeFooters();
46 
47  void resetFileBases();
48 
49  void resetDirectoryEntries();
50 
51  void flush();
52 
53  unsigned int forceWrite( DataEntry* dataEntry, LogWriter::ServiceType serviceType );
54 
55  unsigned int writeSyslog( const SyslogEntry* syslogEntry, LogWriter::ServiceType serviceType );
56 
57 private:
63  int fileNum_;
64 };
65 
66 #endif /*DECIMATIONLOGMANAGER_H_*/
Client-side interface for injecting log data into the log queue.
Definition: Logger.h:30
LogEngine & logEngine_
Definition: DecimationLogManager.h:58
Contains the DecimationLogWriter class definition.
void resetFileBases()
Definition: DecimationLogManager.cpp:172
Base class for a generalized set of "log data destinations," including to files (text or binary)...
Definition: MultiLogWriter.h:28
Definition: DecimationLogManager.h:23
void flush()
Definition: DecimationLogManager.cpp:208
void unlockWrites()
Definition: DecimationLogManager.cpp:121
void writeFooters()
Definition: DecimationLogManager.cpp:159
Defines a LogWriter that can insert directory entries into a stream of data that is written to it...
Definition: DirectoryManagingLogWriter.h:25
DecimationLogManager(LogEngine &logEngine, Str &dataDir)
Definition: DecimationLogManager.cpp:22
A DataValue is an abstract base class for a data value and associated engineering units of the value...
Definition: DataValue.h:35
LogEntry with information specific to "Syslog"-like text logs.
Definition: SyslogEntry.h:54
Contains the FlexArrayBase and FlexArray class declarations.
ServiceType
Definition: LogWriter.h:29
void resetDirectoryEntries()
Definition: DecimationLogManager.cpp:186
Str & dataDir_
Definition: DecimationLogManager.h:59
Code unit that represents an atomic unit of data destined for writing in the log file.
Definition: DataEntry.h:43
DecimationType
Definition: DecimationLogWriter.h:26
FlexArray< DirectoryManagingLogWriter * > otherWriters_
Definition: DecimationLogManager.h:62
Replacement for standard template class string.
Definition: Str.h:12
unsigned int forceWrite(DataEntry *dataEntry, LogWriter::ServiceType serviceType)
Definition: DecimationLogManager.cpp:250
Component responsible for handling the contents of the LogQueue.
Definition: LogEngine.h:63
void configLog(LogWriter::ServiceType serviceType, DecimationLogWriter::DecimationType decimationType, const Str &name, DataValue *parameter, Logger &logger)
Definition: DecimationLogManager.cpp:48
Contains the LogEngine class definition.
FastMap< const Str, LogAssociation * > logAssocationMap_
Definition: DecimationLogManager.h:60
SplitFileLogWriter * getFileWriter(LogWriter::ServiceType serviceType)
Definition: DecimationLogManager.cpp:222
Contains the FastMap class declaration.
unsigned int writeSyslog(const SyslogEntry *syslogEntry, LogWriter::ServiceType serviceType)
Definition: DecimationLogManager.cpp:260
Writes LogEntries to files that are split over time or capacity.
Definition: SplitFileLogWriter.h:20
void writeHeaders()
Definition: DecimationLogManager.cpp:146
FlexArray< SplitFileLogWriter * > fileWriters_
Definition: DecimationLogManager.h:61
int fileNum_
Definition: DecimationLogManager.h:63
void splits()
Definition: DecimationLogManager.cpp:134
virtual ~DecimationLogManager()
Definition: DecimationLogManager.cpp:45
void lockWrites()
Definition: DecimationLogManager.cpp:109