diff options
author | Damjan Marion <damarion@cisco.com> | 2020-10-21 12:43:40 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-10-21 17:46:01 +0000 |
commit | 06d82260d9913dbb6be98aef00830ef4967b1f55 (patch) | |
tree | b17623257674ab57fb912b805a57b29211975cd2 /src/vlib/unix/main.c | |
parent | 210fda269147e47ff434c0a194d17e6cef0fdd74 (diff) |
vlib: print logs to stderr if interactive or nosyslog set
If VPP is started in interactive mode, instead of sending logs to syslog
server we print them directly to stderr.
Output is colorized, but that can be turned off with unix { nocolor }
Type: improvement
Change-Id: I9a0f0803e4cba2849a6efa0b6a86b9614ed33ced
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/unix/main.c')
-rw-r--r-- | src/vlib/unix/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c index 83a3a1f643b..2f1b6ecdae0 100644 --- a/src/vlib/unix/main.c +++ b/src/vlib/unix/main.c @@ -402,6 +402,10 @@ unix_config (vlib_main_t * vm, unformat_input_t * input) um->flags |= UNIX_FLAG_NODAEMON; else if (unformat (input, "nosyslog")) um->flags |= UNIX_FLAG_NOSYSLOG; + else if (unformat (input, "nocolor")) + um->flags |= UNIX_FLAG_NOCOLOR; + else if (unformat (input, "nobanner")) + um->flags |= UNIX_FLAG_NOBANNER; else if (unformat (input, "cli-prompt %s", &cli_prompt)) vlib_unix_cli_set_prompt (cli_prompt); else @@ -576,6 +580,12 @@ unix_config (vlib_main_t * vm, unformat_input_t * input) * when invoking VPP applications from a process monitor which * pipe stdout/stderr to a dedicated logger service. * + * @cfgcmd{nocolor} + * Do not use colors in outputs. + * * + * @cfgcmd{nobanner} + * Do not display startup banner. + * * @cfgcmd{exec, <filename>} * @par <code>startup-config <filename></code> * Read startup operational configuration from @c filename. |