summaryrefslogtreecommitdiffstats
path: root/src/vty/logging_vty.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-07-06 17:09:01 +0200
committerMax <msuraev@sysmocom.de>2017-07-10 11:33:14 +0200
commited0eda236c525377e3c25d04456cbeafcab21c2d (patch)
treedd841ea2147de3080c3395d9d7424f8a63ee16eb /src/vty/logging_vty.c
parent363130f3a19b6c7bfce7e694ea6167ed94834df5 (diff)
Ignore broken everything log level
* when reading config file (or vty command) ignore "logging level .. everything" level * when writing config file, skip "logging level .. everything" level In both cases print corresponding deprecation warning. The "everything" level is not working as advertised for quite some time anyway. This will allow us to gradually deprecate broken "everything" parameter giving users enough time to update their config files before removing it entirely. Change-Id: I73d5c4f238beb88981ad25caa69f64ad6fb7209f Related: OS#71
Diffstat (limited to 'src/vty/logging_vty.c')
-rw-r--r--src/vty/logging_vty.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 758f0b96..01480b10 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -213,6 +213,11 @@ DEFUN(logging_level,
return CMD_WARNING;
}
+ if (strcmp(argv[1], "everything") == 0) { /* FIXME: remove this check once 'everything' is phased out */
+ vty_out(vty, "%% Ignoring deprecated logging level %s%s", argv[1], VTY_NEWLINE);
+ return CMD_SUCCESS;
+ }
+
/* Check for special case where we want to set global log level */
if (!strcmp(argv[0], "all")) {
log_set_log_level(tgt, level);
@@ -730,8 +735,10 @@ static int config_write_log_single(struct vty *vty, struct log_target *tgt)
osmo_str2lower(cat_lower, osmo_log_info->cat[i].name+1);
osmo_str2lower(level_lower, log_level_str(cat->loglevel));
- vty_out(vty, " logging level %s %s%s", cat_lower, level_lower,
- VTY_NEWLINE);
+ if (strcmp(level_lower, "everything") != 0) /* FIXME: remove this check once 'everything' is phased out */
+ vty_out(vty, " logging level %s %s%s", cat_lower, level_lower, VTY_NEWLINE);
+ else
+ LOGP(DLSTATS, LOGL_ERROR, "logging level everything is deprecated and should not be used\n");
}
/* FIXME: levels */