aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty/logging_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vty/logging_vty.c')
-rw-r--r--src/vty/logging_vty.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 8151fda0..8c8a3326 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -246,12 +246,14 @@ static const struct value_string logging_print_file_args[] = {
DEFUN(logging_prnt_file,
logging_prnt_file_cmd,
- "logging print file (0|1|basename)",
+ "logging print file (0|1|basename) [last]",
LOGGING_STR "Log output settings\n"
"Configure log message\n"
"Don't prefix each log message\n"
"Prefix each log message with the source file and line\n"
- "Prefix each log message with the source file's basename (strip leading paths) and line\n")
+ "Prefix each log message with the source file's basename (strip leading paths) and line\n"
+ "Log source file info at the end of a log line. If omitted, log source file info just"
+ " before the log text.\n")
{
struct log_target *tgt = osmo_log_vty2tgt(vty);
@@ -259,6 +261,10 @@ DEFUN(logging_prnt_file,
return CMD_WARNING;
log_set_print_filename2(tgt, get_string_value(logging_print_file_args, argv[0]));
+ if (argc > 1)
+ log_set_print_filename_pos(tgt, LOG_FILENAME_POS_LINE_END);
+ else
+ log_set_print_filename_pos(tgt, LOG_FILENAME_POS_HEADER_END);
return CMD_SUCCESS;
}
@@ -814,15 +820,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;
}