TRIP Routing Daemon
TRIP (RFC 3219) Location Server Implementation
Loading...
Searching...
No Matches
logging.h File Reference

logging utilities More...

#include <stdio.h>
Include dependency graph for logging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ERROR(format, ...)
 log an error
#define WARNING(format, ...)
 log a warning
#define INFO(format, ...)
 log informational event
#define DEBUG(format, ...)
 log for debugging purposes
#define TRACE(format, ...)
 log for tracing purposes

Enumerations

enum  loglevel_t {
  LOG_ERROR , LOG_WARNING , LOG_INFO , LOG_DEBUG ,
  LOG_TRACE
}
 error levels

Functions

void logging_init (FILE *logf, loglevel_t loglevel)
 initialize log file and log level
void logging_log (loglevel_t level, const char *component, const char *format,...)
 log
void logging_log_debug (loglevel_t level, const char *component, const char *file, const char *func, int line, const char *format,...)
 log with debug info

Detailed Description

logging utilities

Macro Definition Documentation

◆ DEBUG

#define DEBUG ( format,
... )
Value:
logging_log_debug(LOG_DEBUG, _COMPONENT_, \
__FILE__, __func__, __LINE__, format, ##__VA_ARGS__);
void logging_log_debug(loglevel_t level, const char *component, const char *file, const char *func, int line, const char *fmt,...)
log with debug info
Definition logging.c:104

log for debugging purposes

◆ ERROR

#define ERROR ( format,
... )
Value:
logging_log_debug(LOG_ERROR, _COMPONENT_, \
__FILE__, __func__, __LINE__, format, ##__VA_ARGS__);

log an error

◆ INFO

#define INFO ( format,
... )
Value:
logging_log(LOG_INFO, _COMPONENT_, format, \
##__VA_ARGS__);
void logging_log(loglevel_t level, const char *component, const char *fmt,...)
log
Definition logging.c:84

log informational event

◆ TRACE

#define TRACE ( format,
... )
Value:
logging_log_debug(LOG_TRACE, _COMPONENT_, \
__FILE__, __func__, __LINE__, format, ##_VA_ARGS__);

log for tracing purposes

◆ WARNING

#define WARNING ( format,
... )
Value:
logging_log(LOG_INFO, _COMPONENT_, format, \
##__VA_ARGS__);

log a warning