diff options
Diffstat (limited to 'openbsc/src/vty_interface_cmds.c')
-rw-r--r-- | openbsc/src/vty_interface_cmds.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/openbsc/src/vty_interface_cmds.c b/openbsc/src/vty_interface_cmds.c index 167b9542c..d4945840e 100644 --- a/openbsc/src/vty_interface_cmds.c +++ b/openbsc/src/vty_interface_cmds.c @@ -30,7 +30,7 @@ #include <stdlib.h> -static void _vty_output(struct debug_target *tgt, const char *line) +static void _vty_output(struct log_target *tgt, const char *line) { struct vty *vty = tgt->tgt_vty.vty; vty_out(vty, "%s", line); @@ -39,11 +39,11 @@ static void _vty_output(struct debug_target *tgt, const char *line) vty_out(vty, "\r"); } -struct debug_target *debug_target_create_vty(struct vty *vty) +struct log_target *log_target_create_vty(struct vty *vty) { - struct debug_target *target; + struct log_target *target; - target = debug_target_create(); + target = log_target_create(); if (!target) return NULL; @@ -65,11 +65,11 @@ DEFUN(enable_logging, return CMD_WARNING; } - conn->dbg = debug_target_create_vty(vty); + conn->dbg = log_target_create_vty(vty); if (!conn->dbg) return CMD_WARNING; - debug_add_target(conn->dbg); + log_add_target(conn->dbg); return CMD_SUCCESS; } @@ -86,7 +86,7 @@ DEFUN(logging_fltr_imsi, return CMD_WARNING; } - debug_set_imsi_filter(conn->dbg, argv[0]); + log_set_imsi_filter(conn->dbg, argv[0]); return CMD_SUCCESS; } @@ -103,7 +103,7 @@ DEFUN(logging_fltr_all, return CMD_WARNING; } - debug_set_all_filter(conn->dbg, atoi(argv[0])); + log_set_all_filter(conn->dbg, atoi(argv[0])); return CMD_SUCCESS; } @@ -120,7 +120,7 @@ DEFUN(logging_use_clr, return CMD_WARNING; } - debug_set_use_color(conn->dbg, atoi(argv[0])); + log_set_use_color(conn->dbg, atoi(argv[0])); return CMD_SUCCESS; } @@ -137,12 +137,12 @@ DEFUN(logging_prnt_timestamp, return CMD_WARNING; } - debug_set_print_timestamp(conn->dbg, atoi(argv[0])); + log_set_print_timestamp(conn->dbg, atoi(argv[0])); return CMD_SUCCESS; } /* FIXME: those have to be kept in sync with the log levels and categories */ -#define VTY_DEBUG_CATEGORIES "(rll|cc|mm|rr|rsl|nm|sms|pag|mncc|inp|mi|mib|mux|meas|sccp|msc|mgcp|ho|db|ref|nat)" +#define VTY_DEBUG_CATEGORIES "(rll|cc|mm|rr|rsl|nm|sms|pag|mncc|inp|mi|mib|mux|meas|sccp|msc|mgcp|ho|db|ref)" #define VTY_DEBUG_LEVELS "(everything|debug|info|notice|error|fatal)" DEFUN(logging_level, logging_level_cmd, @@ -150,8 +150,8 @@ DEFUN(logging_level, "Set the log level for a specified category\n") { struct telnet_connection *conn; - int category = debug_parse_category(argv[0]); - int level = debug_parse_level(argv[1]); + int category = log_parse_category(argv[0]); + int level = log_parse_level(argv[1]); conn = (struct telnet_connection *) vty->priv; if (!conn->dbg) { @@ -177,7 +177,7 @@ DEFUN(logging_level, DEFUN(logging_set_category_mask, logging_set_category_mask_cmd, - "logging set debug mask MASK", + "logging set log mask MASK", "Decide which categories to output.\n") { struct telnet_connection *conn; @@ -188,7 +188,7 @@ DEFUN(logging_set_category_mask, return CMD_WARNING; } - debug_parse_category_mask(conn->dbg, argv[0]); + log_parse_category_mask(conn->dbg, argv[0]); return CMD_SUCCESS; } @@ -205,7 +205,7 @@ DEFUN(logging_set_log_level, return CMD_WARNING; } - debug_set_log_level(conn->dbg, atoi(argv[0])); + log_set_log_level(conn->dbg, atoi(argv[0])); return CMD_SUCCESS; } @@ -222,13 +222,12 @@ DEFUN(diable_logging, return CMD_WARNING; } - debug_del_target(conn->dbg); + log_del_target(conn->dbg); talloc_free(conn->dbg); conn->dbg = NULL; return CMD_SUCCESS; } - void openbsc_vty_add_cmds() { install_element(VIEW_NODE, &enable_logging_cmd); |