mirror of https://gerrit.osmocom.org/libosmocore
logging_vty: Simplify code in config_write_log_single
Since we ignore "logging level CAT everything" in logging_level_cmd, we can never run into the case in which we have loglevel==EVERYTHING, so we can simplify this code and make it esier for later removal of everything keyword. Change-Id: I4e76c65a11cc22616c6dfc632435617ebb861c03
This commit is contained in:
parent
53a1e49354
commit
d51c98e7bf
|
@ -814,15 +814,9 @@ static int config_write_log_single(struct vty *vty, struct log_target *tgt)
|
|||
/* stupid old osmo logging API uses uppercase strings... */
|
||||
osmo_str2lower(cat_lower, osmo_log_info->cat[i].name+1);
|
||||
osmo_str2lower(level_lower, log_level_str(cat->loglevel));
|
||||
|
||||
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");
|
||||
vty_out(vty, " logging level %s %s%s", cat_lower, level_lower, VTY_NEWLINE);
|
||||
}
|
||||
|
||||
/* FIXME: levels */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue