diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2015-11-18 18:11:09 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2015-12-03 11:39:31 +0100 |
commit | d9b1d49485195a79095bae162f8bd8d0abc04781 (patch) | |
tree | 4a2dc29cfc4a2965f24fe7ee413c92bb0e8909a6 /openbsc/src/gprs/gtphub_main.c | |
parent | 4960fab767084f9d5937960f68b84c801350f74c (diff) |
gtphub: review some logging.
Sponsored-by: On-Waves ehi
Diffstat (limited to 'openbsc/src/gprs/gtphub_main.c')
-rw-r--r-- | openbsc/src/gprs/gtphub_main.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/openbsc/src/gprs/gtphub_main.c b/openbsc/src/gprs/gtphub_main.c index e0df0d6d3..e747c77d5 100644 --- a/openbsc/src/gprs/gtphub_main.c +++ b/openbsc/src/gprs/gtphub_main.c @@ -42,12 +42,6 @@ #include "../../bscconfig.h" -#define LOGERR(fmt, args...) \ - LOGP(DGTPHUB, LOGL_ERROR, fmt, ##args) - -#define LOG(fmt, args...) \ - LOGP(DGTPHUB, LOGL_NOTICE, fmt, ##args) - #ifndef OSMO_VTY_PORT_GTPHUB /* should come from libosmocore */ #define OSMO_VTY_PORT_GTPHUB 4253 @@ -67,7 +61,8 @@ static struct log_info_cat gtphub_categories[] = { .name = "DGTPHUB", .description = "GTP Hub", .color = "\033[1;33m", - .enabled = 1, .loglevel = LOGL_NOTICE, + .enabled = 1, + .loglevel = LOGL_NOTICE, }, }; @@ -87,17 +82,21 @@ void log_cfg(struct gtphub_cfg *cfg) { struct gtphub_cfg_addr *a; a = &cfg->to_sgsns[GTPH_PLANE_CTRL].bind; - LOG("to-SGSNs bind, Control: %s port %d\n", - a->addr_str, a->port); + LOGP(DGTPHUB, LOGL_NOTICE, + "to-SGSNs bind, Control: %s port %d\n", + a->addr_str, a->port); a = &cfg->to_sgsns[GTPH_PLANE_USER].bind; - LOG("to-SGSNs bind, User: %s port %d\n", - a->addr_str, a->port); + LOGP(DGTPHUB, LOGL_NOTICE, + "to-SGSNs bind, User: %s port %d\n", + a->addr_str, a->port); a = &cfg->to_ggsns[GTPH_PLANE_CTRL].bind; - LOG("to-GGSNs bind, Control: %s port %d\n", - a->addr_str, a->port); + LOGP(DGTPHUB, LOGL_NOTICE, + "to-GGSNs bind, Control: %s port %d\n", + a->addr_str, a->port); a = &cfg->to_ggsns[GTPH_PLANE_USER].bind; - LOG("to-GGSNs bind, User: %s port %d\n", - a->addr_str, a->port); + LOGP(DGTPHUB, LOGL_NOTICE, + "to-GGSNs bind, User: %s port %d\n", + a->addr_str, a->port); } static void signal_handler(int signal) @@ -254,7 +253,8 @@ int main(int argc, char **argv) rc = gtphub_cfg_read(cfg, ccfg->config_file); if (rc < 0) { - LOGP(DGTPHUB, LOGL_FATAL, "Cannot parse config file '%s'\n", ccfg->config_file); + LOGP(DGTPHUB, LOGL_FATAL, "Cannot parse config file '%s'\n", + ccfg->config_file); exit(2); } @@ -266,7 +266,7 @@ int main(int argc, char **argv) if (ccfg->daemonize) { rc = osmo_daemonize(); if (rc < 0) { - LOGERR("Error during daemonize"); + LOGP(DGTPHUB, LOGL_FATAL, "Error during daemonize"); exit(1); } } |