/* * LogCore.h * * Created on: 17 May 2016 * Author: wentzelc */ #ifndef REDACORE_LOGCORE_H_ #define REDACORE_LOGCORE_H_ // redA Libraries /* none */ // Standard C/C++ Libraries #include //--------------------------------------------------------------------------- // Debug options const short OUT_COUNT = 1, // Show Length of String OUT_NORMAL = 2, // Show ASCII output (replace non-printable characters (incl. CR/LF with ".") OUT_HEX = 4, // Show HEX output OUT_BIN = 8, // Show BINARY output OUT_CRLF = 16, // with OUT_NORMAL - do not replace CR/LF with "." OUT_ASIS = 32; // with OUT_NORMAL - do not replace any non-printable character with "." //--------------------------------------------------------------------------- typedef enum { dlNone = 0, dlLow = 1, dlMedium = 2, dlHigh = 3 } EDebugLevel; //--------------------------------------------------------------------------- class CLogCore { private: FILE * OutputFile; public: CLogCore( FILE * pOutputFile ); bool Message( EDebugLevel DebugLevel, EDebugLevel MsgLevel, const char * Format, ... ); bool Output( EDebugLevel DebugLevel, EDebugLevel MsgLevel, const short Show, const char * Buffer, int Len, const char * Format, ... ); }; //--------------------------------------------------------------------------- #endif /* REDACORE_OGCORE_H_ */