#include <LOW_helper_msglog.h>
Public Types | |
enum | debugLevel_t { portSerial_dl, objSync_getLock_dl, objSync_lockFailed_dl, linkDS2490_dl, all_dl } |
Type defining debug levels. More... | |
Static Public Member Functions | |
void | setDebugLevelEnabled (const debugLevel_t inLevel, const bool isEnabled=true) |
Enable/disable logging of debug messages of a certain level. | |
bool | getDebugLevelEnabled (const debugLevel_t inLevel) |
Get whether logging of debug messages of a certain level is enabled. | |
void | printPerror (const int inErrno, const char *inFormat,...) |
Print error message. | |
void | printError (const char *inFormat,...) |
Print error message. | |
void | printWarning (const char *inFormat,...) |
Print warning message. | |
void | printMessage (const char *inFormat,...) |
Print message. | |
void | printDebug (const debugLevel_t inLevel, const char *inFormat,...) |
Print message. | |
Private Types | |
enum | logType_t { msg_log, warn_log, err_log, debug_log } |
Internal type to mark type of message. More... | |
Private Member Functions | |
LOW_helper_msglog () | |
Default constructor. | |
~LOW_helper_msglog () | |
Destructor. | |
Static Private Member Functions | |
void | va_printToLog (const logType_t inLogType, const char *inFormat, va_list inParamList) |
unsigned int | fprintLogHeader (FILE *inExtraStream, FILE *inStdStream) |
void | fprintfMulti (FILE *inExtraStream, FILE *inStdStream, const char *inFormat,...) |
void | vfprintfMulti (FILE *inExtraStream, FILE *inStdStream, const char *inFormat, va_list inAp) |
void * | callocCheck (const size_t inSize) |
Static Private Attributes | |
bool | errorOccured = false |
bool | debugLevels [all_dl] |
bool | useStdMsgStream = true |
bool | useStdWarnStream = true |
bool | useStdErrStream = true |
bool | useStdDebugStream = true |
bool | useExtraMsgStream = false |
bool | useExtraWarnStream = false |
bool | useExtraErrStream = false |
bool | useExtraDebugStream = false |
FILE * | stdOutStream = stdout |
FILE * | stdWarnStream = stderr |
FILE * | stdErrStream = stderr |
FILE * | stdDebugStream = stderr |
FILE * | extraOutStream = NULL |
FILE * | extraWarnStream = NULL |
FILE * | extraErrStream = NULL |
FILE * | extraDebugStream = NULL |
Distinguishes error/warning/normal and debugging messages. Debugging support arbitrary debug levels.
This class is thread-safe.
Definition at line 42 of file LOW_helper_msglog.h.
|
Type defining debug levels.
Definition at line 53 of file LOW_helper_msglog.h. |
|
Internal type to mark type of message.
Definition at line 170 of file LOW_helper_msglog.h. |
|
Default constructor. It is private to prevent creating objects from this class as this is a static helper class. Definition at line 66 of file LOW_helper_msglog.cpp. |
|
Destructor. It is private to prevent creating objects from this class as this is a static helper class. Definition at line 71 of file LOW_helper_msglog.cpp. |
|
Definition at line 291 of file LOW_helper_msglog.cpp. References printPerror(). |
|
Definition at line 275 of file LOW_helper_msglog.cpp. References vfprintfMulti(). Referenced by fprintLogHeader(), and va_printToLog(). |
|
Definition at line 261 of file LOW_helper_msglog.cpp. References fprintfMulti(), and LOW_platformMisc::getThreadID(). Referenced by va_printToLog(). |
|
Get whether logging of debug messages of a certain level is enabled.
Definition at line 89 of file LOW_helper_msglog.cpp. References debugLevels. |
|
|
Print error message.
Definition at line 139 of file LOW_helper_msglog.cpp. References err_log, and va_printToLog(). Referenced by LOW_exception::logException(), and printPerror(). |
|
Print message.
Definition at line 165 of file LOW_helper_msglog.cpp. References msg_log, and va_printToLog(). |
|
Print error message.
Definition at line 103 of file LOW_helper_msglog.cpp. References printError(). Referenced by callocCheck(), LOW_exception::logException(), LOW_portUsbDevice_Linux::~LOW_portUsbDevice_Linux(), LOW_thread_mutex_POSIX::~LOW_thread_mutex_POSIX(), LOW_thread_rwlock_POSIX::~LOW_thread_rwlock_POSIX(), and LOW_thread_thread_POSIX::~LOW_thread_thread_POSIX(). |
|
Print warning message.
Definition at line 152 of file LOW_helper_msglog.cpp. References va_printToLog(), and warn_log. |
|
Enable/disable logging of debug messages of a certain level.
Definition at line 82 of file LOW_helper_msglog.cpp. References debugLevels. |
|
Definition at line 205 of file LOW_helper_msglog.cpp. References debug_log, err_log, extraDebugStream, extraErrStream, extraOutStream, extraWarnStream, fprintfMulti(), fprintLogHeader(), msg_log, stdDebugStream, stdErrStream, stdOutStream, stdWarnStream, useExtraDebugStream, useExtraErrStream, useExtraMsgStream, useExtraWarnStream, useStdDebugStream, useStdErrStream, useStdMsgStream, useStdWarnStream, and warn_log. Referenced by printDebug(), printError(), printMessage(), and printWarning(). |
|
Definition at line 284 of file LOW_helper_msglog.cpp. Referenced by fprintfMulti(). |
|
Definition at line 39 of file LOW_helper_msglog.cpp. Referenced by getDebugLevelEnabled(), printDebug(), and setDebugLevelEnabled(). |
|
Definition at line 38 of file LOW_helper_msglog.cpp. |
|
Definition at line 57 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 56 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 54 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 55 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 53 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 52 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 50 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 51 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 48 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 47 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 45 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 46 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 44 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 43 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 41 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |
|
Definition at line 42 of file LOW_helper_msglog.cpp. Referenced by va_printToLog(). |