11 #ifndef logger_logMap_hpp
12 #define logger_logMap_hpp
14 #include <mx/sys/timeUtils.hpp>
15 using namespace mx::sys::tscomp;
17 #include <mx/ioutils/fileUtils.hpp>
46 typedef std::map< std::string, std::set<logFileName, compLogFileName>>
appToFileMapT;
56 int loadAppToFileMap(
const std::string & dir,
57 const std::string & ext
61 int getPriorLog(
char * &logBefore,
62 const std::string & appName,
69 int getNextLog(
char * &logAfter,
71 const std::string & appName
76 const std::string & appName
79 int loadFiles(
const std::string & appName,
Organize and analyze the name of a log or telemetry file.
Flatlogs single include file.
uint16_t eventCodeT
The type of an event code (16-bit unsigned int).
std::shared_ptr< char > bufferPtrT
The log entry buffer smart pointer.
Declares and defines the logFileName class.
Structure to hold a log file in memory, tracking when a new file needs to be opened.
std::vector< char > m_memory
The buffer holding the log.
Map of log entries by application name, mapping both to files and to loaded buffers.
std::map< std::string, std::set< logFileName, compLogFileName > > appToFileMapT
The app-name to file-name map type, for sorting the input files by application.
appToBufferMapT m_appToBufferMap
int getNearestLogs(flatlogs::bufferPtrT &logBefore, flatlogs::bufferPtrT &logAfter, const std::string &appName)
std::map< std::string, logInMemory > appToBufferMapT
The app-name to buffer map type, for looking up the currently loaded logs for a given app.
appToFileMapT m_appToFileMap
A fixed-width timespec structure.