From 6a809e84de3f2536db4951480172c7e5df1eba2f Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Wed, 22 Jun 2016 16:13:47 +0200 Subject: [PATCH] add option -full to textlog.c to display full content of buffers --- common/utils/T/tracer/textlog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/utils/T/tracer/textlog.c b/common/utils/T/tracer/textlog.c index 9c9b580def..32bf1ed791 100644 --- a/common/utils/T/tracer/textlog.c +++ b/common/utils/T/tracer/textlog.c @@ -52,6 +52,7 @@ void usage(void) " note: you may pass several -on/-off/-ON/-OFF,\n" " they will be processed in order\n" " by default, all is off\n" +" -full also dump buffers' content\n" " -ip <host> connect to given IP address (default %s)\n" " -p <port> connect to given port (default %d)\n" " -x GUI output\n" @@ -90,6 +91,7 @@ int main(int n, char **v) view *out; int gui_active = 1; textlog_data textlog_data; + int full = 0; /* write on a socket fails if the other end is closed and we get SIGPIPE */ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort(); @@ -115,6 +117,7 @@ int main(int n, char **v) if (!strcmp(v[i], "-x")) { gui_mode = 1; continue; } if (!strcmp(v[i], "-debug-gui")) { gui_logd = 1; continue; } if (!strcmp(v[i], "-no-gui")) { gui_active = 0; continue; } + if (!strcmp(v[i], "-full")) { full = 1; continue; } usage(); } @@ -159,6 +162,7 @@ int main(int n, char **v) // "ENB_PHY_UL_CHANNEL_ESTIMATE", // "ev: {} eNB_id [eNB_ID] frame [frame] subframe [subframe]"); logger_add_view(textlog, out); + if (full) textlog_dump_buffer(textlog, 1); free(name); free(desc); } -- GitLab