From fe8ab0af7a3a0a8dce32907efda7a86ea39bc884 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 2 Jul 2011 18:48:45 +0200 Subject: logging: use new harald's logging infrastructure in libosmocore I can send patches to improve it later, better not to waste much time at it by now so port libosmo-abis upon it. --- src/init.c | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'src/init.c') diff --git a/src/init.c b/src/init.c index f015443..2b21207 100644 --- a/src/init.c +++ b/src/init.c @@ -17,55 +17,13 @@ */ #include "internal.h" #include -#include +#include #include void *libosmo_abis_ctx; -struct log_info_cat libosmo_abis_default_categories[] = { - [DINP] = { - .name = "DINP", - .description = "A-bis Intput Subsystem", - .enabled = 1, .loglevel = LOGL_NOTICE, - }, - [DMUX] = { - .name = "DMUX", - .description = "A-bis B-Subchannel TRAU Frame Multiplex", - .enabled = 1, .loglevel = LOGL_NOTICE, - }, - [DMI] = { - .name = "DMI", - .description = "A-bis Input Driver for Signalling", - .enabled = 0, .loglevel = LOGL_NOTICE, - }, - [DMIB] = { - .name = "DMIB", - .description = "A-bis Input Driver for B-Channels (voice)", - .enabled = 0, .loglevel = LOGL_NOTICE, - }, - [DRSL] = { - .name = "DRSL", - .description = "A-bis Radio Siganlling Link (RSL)", - .color = "\033[1;35m", - .enabled = 1, .loglevel = LOGL_NOTICE, - }, - [DNM] = { - .name = "DNM", - .description = "A-bis Network Management / O&M (NM/OML)", - .color = "\033[1;36m", - .enabled = 1, .loglevel = LOGL_INFO, - }, -}; - -const struct log_info libosmo_abis_log_info = { - .filter_fn = NULL, /* the application should set this. */ - .cat = libosmo_abis_default_categories, - .num_cat = ARRAY_SIZE(libosmo_abis_default_categories), -}; - void libosmo_abis_init(void *ctx) { - log_init(&libosmo_abis_log_info); libosmo_abis_ctx = talloc_named_const(ctx, 0, "abis"); e1inp_init(); } -- cgit v1.2.3-55-g7522