Files
redAcore/LogCore.h
Charl Wentzel 5ea05d119e Major update:
- Logging
  - Created LogCore Class
  - Updated LogCore to use file descriptors instead of stdout
  - Add Log object reference to constructors for:
    FunctionCore, SelectCore
  - Use extern Log() object in SignalCore
- SelectableCore
  - Added new connection type: ForkedPipe
    Create pipe, fork process, connect pipe out to child stdin, exec
2016-08-22 12:14:53 +02:00

48 lines
1.1 KiB
C++

/*
* 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 <stdio.h>
//---------------------------------------------------------------------------
// Debug options
const short
OUT_COUNT = 1,
OUT_NORMAL = 2,
OUT_HEX = 4,
OUT_BIN = 8,
OUT_CRLF = 16,
OUT_ASIS = 32;
//---------------------------------------------------------------------------
typedef enum { dlNone = 0, dlLow = 1, dlMedium = 2, dlHigh = 3 } EDebugLevel;
//---------------------------------------------------------------------------
class CLogCore
{
private:
FILE * FileOutput;
public:
CLogCore( FILE * pFileOutput );
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_ */