aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/unix/main.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-11-25 10:07:09 -0500
committerDamjan Marion <dmarion@me.com>2020-11-25 19:01:08 +0000
commitbc867c3d2137dab4b1395196c1936233517980ab (patch)
tree2f0439bc2c6ba0bde5bd3cf3d87723454c74f3d7 /src/vlib/unix/main.c
parent7483a7272d15354486371be7a20c4bf35ab2eb38 (diff)
vlib: add elog events for vlib log entries
Pretty interesting to see how long plugins take to load. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: If496eb73b2e1fd9dd714142cd5195fa7ccd93ebd
Diffstat (limited to 'src/vlib/unix/main.c')
-rw-r--r--src/vlib/unix/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c
index 2f1b6ecdae0..e86d421056c 100644
--- a/src/vlib/unix/main.c
+++ b/src/vlib/unix/main.c
@@ -706,6 +706,11 @@ vlib_unix_main (int argc, char *argv[])
clib_time_init (&vm->clib_time);
+ /* Turn on the event logger at the first possible moment */
+ vm->configured_elog_ring_size = 128 << 10;
+ elog_init (&vm->elog_main, vm->configured_elog_ring_size);
+ elog_enable_disable (&vm->elog_main, 1);
+
unformat_init_command_line (&input, (char **) vm->argv);
if ((e = vlib_plugin_config (vm, &input)))
{