hl7parse
|
logging functioins and macros More...
Go to the source code of this file.
Macros | |
#define | LEVEL_FATAL 1 |
#define | LEVEL_CRITICAL 2 |
#define | LEVEL_ERROR 3 |
#define | LEVEL_WARNING 4 |
#define | LEVEL_NOTICE 5 |
#define | LEVEL_INFO 6 |
#define | LEVEL_DEBUG 7 |
#define | LEVEL_TRACE 8 |
#define | log_fatal(fmt, ...) |
log fatal More... | |
#define | log_critical(fmt, ...) |
log critical More... | |
#define | log_error(fmt, ...) |
log error More... | |
#define | log_warning(fmt, ...) |
log warning More... | |
#define | log_notice(fmt, ...) |
log notice More... | |
#define | log_info(fmt, ...) |
log info More... | |
#define | log_debug(fmt, ...) |
log debug More... | |
#define | log_trace(fmt, ...) |
log trace More... | |
Functions | |
void | logprint (const char *fmt,...) |
log function More... | |
const char * | logtime (void) |
create timestamp More... | |
Variables | |
const int | loglevel |
global log level More... | |
logging functioins and macros
if the macro PRODUCTION is set, all log functions will output nothing.
#define LEVEL_CRITICAL 2 |
log elvel critical
#define LEVEL_DEBUG 7 |
log elvel debugging
#define LEVEL_ERROR 3 |
log elvel error
#define LEVEL_FATAL 1 |
log elvel fatal
#define LEVEL_INFO 6 |
log elvel info
#define LEVEL_NOTICE 5 |
log elvel notice
#define LEVEL_TRACE 8 |
log elvel trace
#define LEVEL_WARNING 4 |
log elvel warning
#define log_critical | ( | fmt, | |
... | |||
) |
#define log_debug | ( | fmt, | |
... | |||
) |
log debug
[in] | fmt | format |
[in] | ... | arguments |
#define log_error | ( | fmt, | |
... | |||
) |
#define log_fatal | ( | fmt, | |
... | |||
) |
#define log_info | ( | fmt, | |
... | |||
) |
log info
[in] | fmt | format |
[in] | ... | arguments |
#define log_notice | ( | fmt, | |
... | |||
) |
log notice
[in] | fmt | format |
[in] | ... | arguments |
#define log_trace | ( | fmt, | |
... | |||
) |
log trace
[in] | fmt | format |
[in] | ... | arguments |
#define log_warning | ( | fmt, | |
... | |||
) |
log warning
[in] | fmt | format |
[in] | ... | arguments |
void logprint | ( | const char * | fmt, |
... | |||
) |
log function
This method is a drop in replacement for printf()
fmt | format according to sprintf() |
const char* logtime | ( | void | ) |
create timestamp
const int loglevel |
global log level
must be declared in main program
global log level