diff options
Diffstat (limited to 'openbsc/src/gprs/gb_proxy_main.c')
-rw-r--r-- | openbsc/src/gprs/gb_proxy_main.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c index 921b53f76..00a134fea 100644 --- a/openbsc/src/gprs/gb_proxy_main.c +++ b/openbsc/src/gprs/gb_proxy_main.c @@ -200,6 +200,31 @@ static struct vty_app_info vty_info = { .is_config_node = bsc_vty_is_config_node, }; +/* default categories */ +static struct log_info_cat gprs_categories[] = { + [DGPRS] = { + .name = "DGPRS", + .description = "GPRS Packet Service", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, + [DNS] = { + .name = "DNS", + .description = "GPRS Network Service (NS)", + .enabled = 1, .loglevel = LOGL_INFO, + }, + [DBSSGP] = { + .name = "DBSSGP", + .description = "GPRS BSS Gateway Protocol (BSSGP)", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, +}; + +static const struct log_info gprs_log_info = { + .filter_fn = gprs_log_filter_fn, + .cat = gprs_categories, + .num_cat = ARRAY_SIZE(gprs_categories), +}; + int main(int argc, char **argv) { struct gsm_network dummy_network; @@ -214,11 +239,11 @@ int main(int argc, char **argv) signal(SIGUSR2, &signal_handler); osmo_init_ignore_signals(); - osmo_init_logging(&log_info); + osmo_init_logging(&gprs_log_info); vty_info.copyright = openbsc_copyright; vty_init(&vty_info); - logging_vty_add_cmds(&log_info); + logging_vty_add_cmds(&gprs_log_info); gbproxy_vty_init(); handle_options(argc, argv); |