summaryrefslogtreecommitdiff
path: root/lib/libfrr.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-01-08 08:08:13 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-05-31 10:06:42 -0400
commit2950f5da55af16c8efd1ca24f714e9d69c602503 (patch)
treef0fb34f79c0dc851a405b58fa3df719f752e8368 /lib/libfrr.c
parent9c61cec7e3847a4b9841c7914d57c93e3387929a (diff)
lib: Add '--command-log-always` to all daemons startup
Add 'no log commands' cli and at the same time add a --command-log-always to the daemon startup cli. If --command-log-always is specified then all commands are auto-logged and the 'no log commands' form of the command is now ignored. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/libfrr.c')
-rw-r--r--lib/libfrr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libfrr.c b/lib/libfrr.c
index 15de96feee..194a1d9bd4 100644
--- a/lib/libfrr.c
+++ b/lib/libfrr.c
@@ -94,6 +94,7 @@ static void opt_extend(const struct optspec *os)
#define OPTION_LOGLEVEL 1004
#define OPTION_TCLI 1005
#define OPTION_DB_FILE 1006
+#define OPTION_LOGGING 1007
static const struct option lo_always[] = {
{"help", no_argument, NULL, 'h'},
@@ -105,6 +106,7 @@ static const struct option lo_always[] = {
{"log", required_argument, NULL, OPTION_LOG},
{"log-level", required_argument, NULL, OPTION_LOGLEVEL},
{"tcli", no_argument, NULL, OPTION_TCLI},
+ {"command-log-always", no_argument, NULL, OPTION_LOGGING},
{NULL}};
static const struct optspec os_always = {
"hvdM:",
@@ -496,6 +498,9 @@ static int frr_opt(int opt)
case OPTION_LOGLEVEL:
di->early_loglevel = optarg;
break;
+ case OPTION_LOGGING:
+ di->log_always = true;
+ break;
default:
return 1;
}
@@ -648,7 +653,7 @@ struct thread_master *frr_init(void)
else
cmd_init(1);
- vty_init(master);
+ vty_init(master, di->log_always);
memory_init();
log_ref_init();