API
 
Loading...
Searching...
No Matches

An application to dump MagAo-X binary logs to the terminal. More...

#include <logdump.hpp>

Inheritance diagram for logdump:
Inheritance graph
Collaboration diagram for logdump:
Collaboration graph

Public Member Functions

virtual void setupConfig ()
 
virtual void loadConfig ()
 
virtual int execute ()
 
virtual int gettimes (std::vector< std::string > &logs)
 

Protected Member Functions

void printLogBuff (const logPrioT &lvl, const eventCodeT &ec, const msgLenT &len, bufferPtrT &logBuff)
 
void printLogJson (const msgLenT &len, bufferPtrT &logBuff)
 

Protected Attributes

std::string m_dir
 
std::string m_ext
 
std::string m_file
 
bool m_time { false }
 
bool m_jsonMode { false }
 
unsigned long m_pauseTime { 250 }
 
int m_fileCheckInterval
 When following, pause time to check for new data. msec. Default is 250 msec.
 
std::vector< std::string > m_prefixes
 When following, number of loops to wait before checking for a new file. Default is 4.
 
size_t m_nfiles { 0 }
 
bool m_follow { false }
 Number of files to dump. Default is 0, unless following then the default is 1.
 
logPrioT m_level { logPrio::LOG_DEFAULT }
 
std::vector< eventCodeTm_codes
 

Private Types

typedef mx::verbose::vvv verboseT
 

Detailed Description

An application to dump MagAo-X binary logs to the terminal.

Todo:

document this

add config for colors, both on/off and options to change.

Definition at line 41 of file logdump.hpp.

Member Typedef Documentation

◆ verboseT

typedef mx::verbose::vvv logdump::verboseT
private

Definition at line 43 of file logdump.hpp.

Member Function Documentation

◆ execute()

◆ gettimes()

◆ loadConfig()

void logdump::loadConfig ( )
virtual

◆ printLogBuff()

◆ printLogJson()

void logdump::printLogJson ( const msgLenT len,
bufferPtrT logBuff 
)
inlineprotected

Definition at line 531 of file logdump.hpp.

References MagAOX::logger::logJsonFormat().

Referenced by execute().

◆ setupConfig()

void logdump::setupConfig ( )
virtual

Definition at line 80 of file logdump.hpp.

Member Data Documentation

◆ m_codes

std::vector<eventCodeT> logdump::m_codes
protected

Definition at line 65 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_dir

std::string logdump::m_dir
protected

Definition at line 46 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_ext

std::string logdump::m_ext
protected

Definition at line 47 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_file

std::string logdump::m_file
protected

Definition at line 48 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_fileCheckInterval

int logdump::m_fileCheckInterval
protected
Initial value:
{
20 }

When following, pause time to check for new data. msec. Default is 250 msec.

Definition at line 54 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_follow

bool logdump::m_follow { false }
protected

Number of files to dump. Default is 0, unless following then the default is 1.

Definition at line 61 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_jsonMode

bool logdump::m_jsonMode { false }
protected

Definition at line 51 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_level

logPrioT logdump::m_level { logPrio::LOG_DEFAULT }
protected

Definition at line 63 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_nfiles

size_t logdump::m_nfiles { 0 }
protected

Definition at line 59 of file logdump.hpp.

Referenced by execute(), gettimes(), and loadConfig().

◆ m_pauseTime

unsigned long logdump::m_pauseTime { 250 }
protected

Definition at line 53 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_prefixes

std::vector<std::string> logdump::m_prefixes
protected

When following, number of loops to wait before checking for a new file. Default is 4.

Definition at line 57 of file logdump.hpp.

Referenced by execute(), and loadConfig().

◆ m_time

bool logdump::m_time { false }
protected

Definition at line 50 of file logdump.hpp.

Referenced by execute(), and loadConfig().


The documentation for this class was generated from the following file: