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 | ERRNO set_errno |
set_errno macro | |
#define | ERRNULL set_errno_null |
set_errno_null macro | |
#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 | set_errno (int err) |
Setting errno to err and return -1. | |
void * | set_errno_null (int err) |
Setting errno to err and return NULL. | |
void | emClose (void) |
Quit the Error Manager. | |
int | emInit (int logLevel, int logType, void(*cb)(void *ctxt, char *pFile, char *pFunc, int iLine, int level, char *fmt), void *ctxt, char *filename, const char *name) |
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 29 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(), mntd_volume_config_reload(), and sb_daemon_init(). |
|
Setting errno to err and return -1.
Definition at line 9 of file errmanager.c. |
|
Setting errno to err and return NULL.
Definition at line 16 of file errmanager.c. |