Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
OpenXG-RAN
Commits
31e1be78
Commit
31e1be78
authored
8 years ago
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add possibility to logger 'textlog' to print full content of buffers
parent
088db3cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
common/utils/T/tracer/logger/logger.h
common/utils/T/tracer/logger/logger.h
+2
-0
common/utils/T/tracer/logger/textlog.c
common/utils/T/tracer/logger/textlog.c
+20
-1
No files found.
common/utils/T/tracer/logger/logger.h
View file @
31e1be78
...
...
@@ -20,6 +20,8 @@ logger *new_iqlog(void *event_handler, void *database,
void
framelog_set_skip
(
logger
*
_this
,
int
skip_delay
);
void
framelog_set_update_only_at_sf9
(
logger
*
_this
,
int
update_only_at_sf9
);
void
textlog_dump_buffer
(
logger
*
_this
,
int
dump_buffer
);
#include "view/view.h"
void
logger_add_view
(
logger
*
l
,
view
*
v
);
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/tracer/logger/textlog.c
View file @
31e1be78
...
...
@@ -32,12 +32,13 @@ struct textlog {
int
fsize
;
/* local output buffer */
OBUF
o
;
int
dump_buffer
;
};
static
void
_event
(
void
*
p
,
event
e
)
{
struct
textlog
*
l
=
p
;
int
i
;
int
i
,
j
;
#ifdef T_SEND_TIME
struct
tm
*
t
;
char
tt
[
64
];
...
...
@@ -65,6 +66,14 @@ static void _event(void *p, event e)
case
BUFFER
:
PUTS
(
&
l
->
o
,
"{buffer size:"
);
PUTI
(
&
l
->
o
,
e
.
e
[
l
->
f
[
i
].
event_arg
].
bsize
);
if
(
l
->
dump_buffer
)
{
PUTS
(
&
l
->
o
,
" ["
);
for
(
j
=
0
;
j
<
e
.
e
[
l
->
f
[
i
].
event_arg
].
bsize
;
j
++
)
{
PUTX2
(
&
l
->
o
,
((
unsigned
char
*
)
e
.
e
[
l
->
f
[
i
].
event_arg
].
b
)[
j
]);
PUTC
(
&
l
->
o
,
' '
);
}
PUTS
(
&
l
->
o
,
"]"
);
}
PUTS
(
&
l
->
o
,
"}"
);
break
;
}
...
...
@@ -196,3 +205,13 @@ error:
printf
(
"%s:%d: bad format '%s'
\n
"
,
__FILE__
,
__LINE__
,
format
);
abort
();
}
/****************************************************************************/
/* public functions */
/****************************************************************************/
void
textlog_dump_buffer
(
logger
*
_this
,
int
dump_buffer
)
{
struct
textlog
*
l
=
_this
;
l
->
dump_buffer
=
dump_buffer
;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment