| 
 | 
| std::string  | m_logPath | 
|   | The base path for the log files.  
  | 
|   | 
| std::string  | m_logName | 
|   | The base name for the log files.  
  | 
|   | 
| std::string  | m_logExt | 
|   | The extension for the log files.  
  | 
|   | 
| size_t  | m_maxLogSize | 
|   | The maximum file size in bytes. Default is 10 MB.  
  | 
|   | 
 | 
| FILE *  | m_fout | 
|   | The file pointer.  
  | 
|   | 
| size_t  | m_currFileSize | 
|   | The current file size.  
  | 
|   | 
Definition at line 35 of file logFileRaw_test.cpp.
 
◆ logFileRawTest() [1/2]
  
  
      
        
          | libXWCTest::loggerTest::logFileRawTest::logFileRawTest::logFileRawTest  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ logFileRawTest() [2/2]
  
  
      
        
          | libXWCTest::loggerTest::logFileRawTest::logFileRawTest::logFileRawTest  | 
          ( | 
          const std::string &  | 
          lp | ) | 
           | 
         
       
   | 
  
inlineexplicit   | 
  
 
 
◆ close()
Close the file pointer. 
Sets m_fout to nullptr after calling fclose regardless of error.
- Returns
 - 0 on success 
 
- 
-1 on error 
 
Definition at line 150 of file logFileRaw.hpp.
 
 
◆ createFile()
Create a new file. 
Closes the current file if open. Then creates a new file with a name of the form [path]/[name]/YYYY_MM_DD/[name]_YYYYMMDDHHMMSSNNNNNNNNN.[ext]
- Returns
 - 0 on success 
 
- 
-1 on error 
 
- Parameters
 - 
  
    | [in] | ts | A MagAOX timespec, used to set the timestamp  | 
  
   
Definition at line 161 of file logFileRaw.hpp.
 
 
◆ flush()
Flush the stream. 
Calls fflush. See issue #192
- Returns
 - 0 on success 
 
- 
-1 on error 
 
- Todo:
 - this probably should be fsync, with appropriate error handling (see fsyncgate) [issue #192] 
 
Definition at line 142 of file logFileRaw.hpp.
 
 
◆ logExt() [1/2]
Get the log extension. 
- Returns
 - the current value of m_logExt. 
 
Definition at line 111 of file logFileRaw.hpp.
 
 
◆ logExt() [2/2]
Set the log extension. 
- Returns
 - 0 on success 
 
- 
-1 on error 
 
- Parameters
 - 
  
    | [in] | newExt | the new value of m_logExt  | 
  
   
Definition at line 105 of file logFileRaw.hpp.
 
 
◆ logName() [1/2]
Get the name. 
- Returns
 - the current value of _name. 
 
Definition at line 97 of file logFileRaw.hpp.
 
 
◆ logName() [2/2]
Set the log name. 
- Returns
 - 0 on success 
 
- 
-1 on error 
 
- Parameters
 - 
  
    | [in] | newName | the new value of m_logName  | 
  
   
Definition at line 91 of file logFileRaw.hpp.
 
 
◆ logPath() [1/2]
Get the path. 
- Returns
 - the current value of m_logPath. 
 
Definition at line 83 of file logFileRaw.hpp.
 
 
◆ logPath() [2/2]
Set the path. 
- Returns
 - 0 on success 
 
- 
-1 on error 
 
- Parameters
 - 
  
    | [in] | newPath | the new value of _path  | 
  
   
Definition at line 77 of file logFileRaw.hpp.
 
 
◆ maxLogSize() [1/2]
Get the maximum file size. 
- Returns
 - the current value of m_maxLogSize 
 
Definition at line 125 of file logFileRaw.hpp.
 
 
◆ maxLogSize() [2/2]
Set the maximum file size. 
- Returns
 - 0 on success 
 
- 
-1 on error 
 
- Parameters
 - 
  
    | [in] | newMaxFileSize | the new value of _maxLogSize  | 
  
   
Definition at line 119 of file logFileRaw.hpp.
 
 
◆ test_createFile()
  
  
      
        
          | mx::error_t libXWCTest::loggerTest::logFileRawTest::logFileRawTest::test_createFile  | 
          ( | 
          flatlogs::timespecX &  | 
          ts | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ writeLog()
Write a log entry to the file. 
Checks if this write will exceed m_maxLogSize, and if so opens a new file. The new file will have the timestamp of this log entry.
- Returns
 - 0 on success 
 
- 
-1 on error 
 
- Parameters
 - 
  
    | [in] | data | the log entry to write to disk  | 
  
   
Definition at line 134 of file logFileRaw.hpp.
 
 
◆ m_currFileSize
◆ m_fout
◆ m_logExt
◆ m_logName
◆ m_logPath
◆ m_maxLogSize
The maximum file size in bytes. Default is 10 MB. 
Definition at line 47 of file logFileRaw.hpp.
 
 
◆ testPath
      
        
          | std::string libXWCTest::loggerTest::logFileRawTest::logFileRawTest::testPath | 
        
      
 
 
The documentation for this class was generated from the following file: