: Thursday, November 30, 2017 12:50 AM
To: Dave Barach (dbarach)
Cc: Florin Coras ; vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] problem in elog format
Thanks a lot,
Now I want to convert elog file to text file.
I compiled perftools in test directory, but when running c2cpel tools, the
following
o 256 constant strings:
>
>
>
> ELOG_TYPE_DECLARE (e) =
>
> {
>
> .format = "my enum: %s",
>
> .format_args = "t1",
>
> .n_enum_strings =
>
> 2,
>
> .enum_strings =
>
> {
>
> "string
};
struct
{
u8 which;
} *ed;
ed = ELOG_DATA (&vlib_global_main.elog_main, e);
ed->which = which;
HTH… Dave
-Original Message-
From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On
Behalf Of Florin Coras
Sent: Wednesday, November
Hi Juan,
We don’t typically use elogs to store strings, still, you may be able to get it
to run with:
struct
{
u8 err[20];
} * ed;
And then copy your data to err: clib_memcpy (ed->err, your_vec, vec_len
(your_vec)). Make sure your vec is 0 terminated.
HTH
I want to use event-log and send string to one of elements of ed struct.
but the result is not correct.
the sample code:
ELOG_TYPE_DECLARE (e) = {
.format = "Test LOG: %s",
.format_args = "s20",
};
struct
{
u8 * err;
} *