summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/elog.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-08-20 08:30:39 -0400
committerFlorin Coras <florin.coras@gmail.com>2020-08-21 14:21:55 +0000
commitb08fe6617bdc57f7534fe4813cc34d328eb36ba0 (patch)
tree081c1e5b262cbcd0a9f2c61d44d1d1c802686df5 /src/vppinfra/elog.c
parent9ff0cd7171e6e3d38cc0d162781bbe65be403879 (diff)
vppinfra: add format_one_elog_event
To avoid ridiculous pointer gymnastics in golang Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ic5a641c18281970e2b9bc3013a54cfc3ae92e372
Diffstat (limited to 'src/vppinfra/elog.c')
-rw-r--r--src/vppinfra/elog.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vppinfra/elog.c b/src/vppinfra/elog.c
index 62bd9797acc..cd4d89583cb 100644
--- a/src/vppinfra/elog.c
+++ b/src/vppinfra/elog.c
@@ -427,6 +427,15 @@ format_elog_track (u8 * s, va_list * args)
return s;
}
+char *
+format_one_elog_event (void *em_arg, void *ep_arg)
+{
+ elog_main_t *em = (elog_main_t *) em_arg;
+ elog_event_t *ep = (elog_event_t *) ep_arg;
+
+ return (char *) format (0, "%U", format_elog_event, em, ep);
+}
+
void
elog_time_now (elog_time_stamp_t * et)
{