An application to dump MagAo-X binary logs to the terminal. More...
#include <logdump.hpp>
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< eventCodeT > | m_codes |
Private Types | |
typedef mx::verbose::vvv | verboseT |
An application to dump MagAo-X binary logs to the terminal.
document this
add config for colors, both on/off and options to change.
Definition at line 41 of file logdump.hpp.
|
private |
Definition at line 43 of file logdump.hpp.
|
virtual |
Definition at line 252 of file logdump.hpp.
References flatlogs::logHeader::eventCode(), gettimes(), flatlogs::logHeader::headerSize(), flatlogs::logHeader::logLevel(), MagAOX::logger::logVerify(), m_codes, m_dir, m_ext, m_file, m_fileCheckInterval, m_follow, m_jsonMode, m_level, m_nfiles, m_pauseTime, m_prefixes, m_time, flatlogs::logHeader::MAX_LEN0, flatlogs::logHeader::maxHeadSize, flatlogs::logHeader::minHeadSize, flatlogs::logHeader::msgLen(), flatlogs::logHeader::msgLen0(), MagAOX::file::parseFilePath(), printLogBuff(), and printLogJson().
|
virtual |
Definition at line 538 of file logdump.hpp.
References flatlogs::timespecX::ISO8601DateTimeStrX(), m_nfiles, flatlogs::logHeader::MAX_LEN0, flatlogs::logHeader::maxHeadSize, flatlogs::logHeader::minHeadSize, flatlogs::logHeader::msgLen(), flatlogs::logHeader::msgLen0(), flatlogs::timespecX::time_ns, flatlogs::timespecX::time_s, and flatlogs::logHeader::timespec().
Referenced by execute().
|
virtual |
Definition at line 189 of file logdump.hpp.
References flatlogs::logLevelFromString(), m_codes, m_dir, m_ext, m_file, m_fileCheckInterval, m_follow, m_jsonMode, m_level, m_nfiles, m_pauseTime, m_prefixes, m_time, MAGAOX_default_logExt, MAGAOX_env_path, MAGAOX_logRelPath, and MAGAOX_path.
|
inlineprotected |
Definition at line 475 of file logdump.hpp.
References MagAOX::logger::eventCodes::GIT_STATE, flatlogs::logPrio::LOG_ALERT, flatlogs::logPrio::LOG_CRITICAL, flatlogs::logPrio::LOG_EMERGENCY, flatlogs::logPrio::LOG_ERROR, flatlogs::logPrio::LOG_INFO, flatlogs::logPrio::LOG_NOTICE, flatlogs::logPrio::LOG_WARNING, MagAOX::logger::logStdFormat(), flatlogs::logHeader::messageBuffer(), and MagAOX::logger::git_state::repoName().
Referenced by execute().
|
inlineprotected |
Definition at line 531 of file logdump.hpp.
References MagAOX::logger::logJsonFormat().
Referenced by execute().
|
virtual |
Definition at line 80 of file logdump.hpp.
|
protected |
Definition at line 65 of file logdump.hpp.
Referenced by execute(), and loadConfig().
|
protected |
Definition at line 46 of file logdump.hpp.
Referenced by execute(), and loadConfig().
|
protected |
Definition at line 47 of file logdump.hpp.
Referenced by execute(), and loadConfig().
|
protected |
Definition at line 48 of file logdump.hpp.
Referenced by execute(), and loadConfig().
|
protected |
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().
|
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().
|
protected |
Definition at line 51 of file logdump.hpp.
Referenced by execute(), and loadConfig().
|
protected |
Definition at line 63 of file logdump.hpp.
Referenced by execute(), and loadConfig().
|
protected |
Definition at line 59 of file logdump.hpp.
Referenced by execute(), gettimes(), and loadConfig().
|
protected |
Definition at line 53 of file logdump.hpp.
Referenced by execute(), and loadConfig().
|
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().
|
protected |
Definition at line 50 of file logdump.hpp.
Referenced by execute(), and loadConfig().