From 8d6ca6933f34972dd158de5db69d70c6ab6472f6 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 20 Jan 2021 17:04:23 +0100 Subject: logging_vty: Fix saving of "logging print file .. last" Back in 2018 in I393907b3c9e0cc1145e102328adad0a83ee13a9f Neels introduced "last" as an optional flag to log the file/line number at the end of the line, rather than at the end of the header. It seems nobody has been usingi this feature, or at least never tried to save a related config file, as there was no code whatsoever that would ever save this optional "last" flag. Change-Id: I7b6245256aecc425722242aaabc154ac58ba27a0 --- src/vty/logging_vty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 02823504..6a7a8f44 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -1010,8 +1010,9 @@ static int config_write_log_single(struct vty *vty, struct log_target *tgt) tgt->print_timestamp ? 1 : 0, VTY_NEWLINE); if (tgt->print_level) vty_out(vty, " logging print level 1%s", VTY_NEWLINE); - vty_out(vty, " logging print file %s%s", + vty_out(vty, " logging print file %s%s%s", get_value_string(logging_print_file_args, tgt->print_filename2), + tgt->print_filename_pos == LOG_FILENAME_POS_LINE_END ? " last" : "", VTY_NEWLINE); if (tgt->loglevel) { -- cgit v1.2.3