/* * LogCore.h * * Created on: 17 May 2016 * Author: wentzelc */ #ifndef REDACORE_LOGCORE_H_ #define REDACORE_LOGCORE_H_ // Standard C/C++ Libraries #include // redA Libraries #include "DataTreeCore.h" //--------------------------------------------------------------------------- // Debug options: LogOutput --> First nibble = output format, second nibble = output options const short OUT_COUNT = 16, // Show Character count OUT_NOCRLF = 32; // with OUT_NORMAL, show \r\n as "." //--------------------------------------------------------------------------- typedef enum { loNone = 0, loRaw = 1, loNormal = 2, loHex = 3, loBin = 4 } ELogOutput; typedef enum { dlNone = 0, dlLow = 1, dlMedium = 2, dlHigh = 3 } EDebugLevel; //--------------------------------------------------------------------------- class CLogCore { private: FILE * OutputFile; public: CLogCore( FILE * pOutputFile ); EDebugLevel ReadLogLevel( CDataMember * LogConfig ); int ReadLogOutput( CDataMember * LogConfig ); bool Message( EDebugLevel DebugLevel, EDebugLevel MsgLevel, const char * Format, ... ); bool Output( EDebugLevel DebugLevel, EDebugLevel MsgLevel, const short OutputFormat, const char * Buffer, int Len, const char * Format, ... ); }; //--------------------------------------------------------------------------- #endif /* REDACORE_OGCORE_H_ */