Data Structures | |
struct | EMDATA |
Strukt for handling each msg. More... | |
Defines | |
#define | MAX_STRLEN 1024 |
Maximum length of handled strings. | |
#define | EM_TYPE_SYSLOG 1 |
Log message to syslogd. | |
#define | EM_TYPE_STDERR 2 |
Log message to stderr. | |
#define | EM_TYPE_CALLBACK 4 |
Log message with callback function. | |
#define | EM_TYPE_FILE 8 |
Log message to file. | |
#define | MSG_DEBUG(args...) {} |
Output a DEBUG Message, when the "logLevel" is minimum "LOG_DEBUG". | |
#define | MSG_INF(args...) emManager(__FILE__, __FUNCTION__, __LINE__, LOG_INFO, ## args) |
Output a INFO Message, when the "logLevel" is minimum "LOG_INFO". | |
#define | MSG_NOTICE(args...) emManager(__FILE__, __FUNCTION__, __LINE__, LOG_NOTICE, ## args) |
Output a NOTICE Message, when the "logLevel" is minimum "LOG_NOTICE". | |
#define | MSG_WARNING(args...) emManager(__FILE__, __FUNCTION__, __LINE__, LOG_WARNING, ## args) |
Output a WARNING Message, when the "logLevel" is minimum "LOG_WARNING". | |
#define | MSG_ERR(args...) emManager(__FILE__, __FUNCTION__, __LINE__, LOG_ERR, ## args) |
Output a ERROR Message, when the "logLevel" is minimum "LOG_ERR". | |
#define | MSG_CRIT(args...) emManager(__FILE__, __FUNCTION__, __LINE__, LOG_CRIT, ## args) |
Output a CRITICAL Message, when the "logLevel" is minimum "LOG_CRIT". | |
#define | MSG_ALERT(args...) emManager(__FILE__, __FUNCTION__, __LINE__, LOG_ALERT, ## args) |
Output a ALERT Message, when the "logLevel" is minimum "LOG_ALERT". | |
#define | MSG_EMERG(args...) emManager(__FILE__, __FUNCTION__, __LINE__, LOG_EMERG, ## args) |
Output a EMERGENCY Message, when the "logLevel" is minimum "LOG_EMERG". | |
Typedefs | |
typedef EMDATA | emData |
Strukt for handling each msg. | |
Functions | |
int | emInit (int logLevel, int logType, void(*cb)(void *ctxt, char *pFile, char *pFunc, int iLine, int level, char *fmt), void *ctxt, char *filename) |
Init the Error Manager. | |
void | emManager (char *pFile, char *pFunc, int iLine, int level, char *fmt,...) |
print messages to selected log medium |
|
Init the Error Manager.
Definition at line 7 of file errmanager.c. References EMDATA::ctxt, EM_TYPE_CALLBACK, EM_TYPE_STDERR, EM_TYPE_SYSLOG, emData, EMDATA::errCallBack, EMDATA::filename, EMDATA::logLevel, and EMDATA::logType. Referenced by main(). |
|
print messages to selected log medium
Definition at line 54 of file errmanager.c. References EMDATA::ctxt, EM_TYPE_CALLBACK, EMDATA::errCallBack, EMDATA::logLevel, EMDATA::logType, and MAX_STRLEN. |