11 #ifndef logger_logFileRaw_hpp
12 #define logger_logFileRaw_hpp
20 #include <mx/ioutils/stringUtils.hpp>
22 #include "../common/defaults.hpp"
84 int logPath(
const std::string & newPath );
98 int logName(
const std::string & newName );
112 int logExt(
const std::string & newExt );
A class to manage raw binary log files.
std::string m_logName
The base name for the log files.
std::string logExt()
Get the log extension.
std::string m_logPath
The base path for the log files.
logFileRaw()
Default constructor.
int close()
Close the file pointer.
size_t m_maxLogSize
The maximum file size in bytes. Default is 10 MB.
std::string m_logExt
The extension for the log files.
int createFile(flatlogs::timespecX &ts)
Create a new file.
std::string logName()
Get the name.
int writeLog(flatlogs::bufferPtrT &data)
Write a log entry to the file.
size_t maxLogSize()
Get the maximum file size.
int flush()
Flush the stream.
FILE * m_fout
The file pointer.
std::string logPath()
Get the path.
size_t m_currFileSize
The current file size.
Flatlogs single include file.
#define MAGAOX_default_logExt
The extension for MagAO-X binary log files.
#define MAGAOX_default_max_logSize
The default maximum log file size.
std::shared_ptr< char > bufferPtrT
The log entry buffer smart pointer.
A fixed-width timespec structure.