]> git.puffer.fish Git - matthieu/frr.git/commit
lib: de-uglify `-t` option + `log stdout` combo
authorDavid Lamparter <equinox@diac24.net>
Thu, 4 Feb 2021 21:27:11 +0000 (22:27 +0100)
committerDavid Lamparter <equinox@diac24.net>
Fri, 12 Feb 2021 18:29:36 +0000 (19:29 +0100)
commitb6bc1ee8d363d61addd4c36ace693d5b795347d8
treeba64acc34f153aaa93b050f0eb0491efd7c130fb
parent877057b67adcd9ed15e34bc1cf39281dc08f64cc
lib: de-uglify `-t` option + `log stdout` combo

The logging code writes log messages with a `\n` line ending, meanwhile
the VTY code switches it so you need `\r\n`...

And we don't flush the newline after executing a command either.

After this patch, starting daemons like `zebra/zebra -t` should provide
a nice development/debugging experience with a VTY open right there on
stdio and `log stdout` interspersed.

(This is already documented in the man pages, it just looked like sh*t
previously since the log messages didn't newline correctly.)

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/vty.c