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
This commit is contained in:
Charl Wentzel
2016-08-22 12:14:53 +02:00
parent eaace97ec9
commit 5ea05d119e
10 changed files with 366 additions and 125 deletions

View File

@@ -12,7 +12,7 @@
/* none */
// Standard C/C++ Libraries
/* none */
#include <stdio.h>
//---------------------------------------------------------------------------
@@ -31,10 +31,17 @@ typedef enum { dlNone = 0, dlLow = 1, dlMedium = 2, dlHigh = 3 } EDebugLevel;
//---------------------------------------------------------------------------
bool LogMessage( EDebugLevel DebugLevel, EDebugLevel MsgLevel, const char * Format, ... );
class CLogCore
{
private:
FILE * FileOutput;
bool ShowOutput( EDebugLevel DebugLevel, EDebugLevel MsgLevel, const short Show, const char * Buffer, int Len, const char * Format, ... );
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_ */