vlib: introduce vlib_get_elog_main()

Type: improvement
Change-Id: I73383eb15186021cd6527d112da8443a0082f129
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c
index f73f9ca..a0a13f3 100644
--- a/src/vlib/unix/main.c
+++ b/src/vlib/unix/main.c
@@ -708,8 +708,8 @@
 
   /* 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);
+  elog_init (vlib_get_elog_main (), vm->configured_elog_ring_size);
+  elog_enable_disable (vlib_get_elog_main (), 1);
 
   unformat_init_command_line (&input, (char **) vm->argv);
   if ((e = vlib_plugin_config (vm, &input)))