aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface_cmds.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-06 21:49:41 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-06 21:51:26 +0200
commit9960d59fffa176ab022c9641c7358030d7f8065c (patch)
tree18573b4edf3eb496307d4b33d99ca031c98c3981 /openbsc/src/vty_interface_cmds.c
parent161bd6d253abeef6b181dbe9fdd245bd7c9884af (diff)
parent3c71232b112a40bf09bd9687f1bc6aed12e863a3 (diff)
Merge remote branch 'origin/master' into on-waves/bsc-master
* Move to the new log code and update binaries * Catch up with lchan changes from master Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/src/Makefile.am openbsc/src/bsc_rll.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_04_08.c openbsc/src/gsm_04_11.c openbsc/src/gsm_subscriber_base.c openbsc/src/handover_logic.c openbsc/src/silent_call.c openbsc/src/transaction.c openbsc/src/vty_interface.c openbsc/src/vty_interface_cmds.c
Diffstat (limited to 'openbsc/src/vty_interface_cmds.c')
-rw-r--r--openbsc/src/vty_interface_cmds.c35
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);