Files
redAcore/LogCore.h
Charl Wentzel b4073a166a Major Update:
- Updated all Logged messages, standardised DebugLevel:
  - dlNone   - Show startup and stop
  - dlLow    - Show creation/destruction of Function Blocks and Local IO
  - dlMedium - Show connection events, eg. open/close
  - dlHigh   - Show data flow events
-LogCore:
  - LogMessage and ShowOutput uses va_list
    only run printf if DebugLevel correct
  - Remove global LogStr[] variable
- SelectableCore:
  - Implemented Auto-management of handles
    auto open on startup/fail/close
  - Changed simple Open/Close/Read/Write methods to inline
  - Do not set Select Write trigger for server socket
  - Memory leak, setting address twice on RemoteClient
  - Bug fix, only send handle out data if DebugLevel = dlHigh
  - Bug fix, do not Read/ProcessBuffer if no InputBuffer
2016-05-27 13:32:54 +02:00

39 lines
911 B
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
/* none */
//---------------------------------------------------------------------------
// Debug options
const short
OUT_NORMAL = 1,
OUT_HEX = 2,
OUT_CRLF = 4,
OUT_ASIS = 8;
//---------------------------------------------------------------------------
typedef enum { dlNone = 0, dlLow = 1, dlMedium = 2, dlHigh = 3 } EDebugLevel;
//---------------------------------------------------------------------------
bool LogMessage( EDebugLevel Level, const char * Format, ... );
bool ShowOutput( EDebugLevel Level, const short Show, const char * Buffer, int Len, const char * Format, ... );
//---------------------------------------------------------------------------
#endif /* REDACORE_OGCORE_H_ */