Introduce vtracef
authorMaxime Roussin-Belanger <maxime.roussinbelanger@gmail.com>
Tue, 3 Mar 2020 23:10:30 +0000 (18:10 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 4 Mar 2020 15:24:32 +0000 (10:24 -0500)
commitcfd56ee1736677d06db86593a8555275ac4bc2ec
treec4ee4d6b93729aa0de08a649a157f1a219dee86f
parent6daf0c26e948e0f2270c283a6b311fba9591843d
Introduce vtracef

vtracef accepts a va_list argument to simplify
tracing functions which use a va_list

Here's an example from wpa_supplicant that I wanted to
trace:

void wpa_debug(int level, const char* fmt, ...)
{
va_list ap;
va_start(ap, fmt);

...
// The call I want to easily trace with vtracef
vprintf(fmt, ap);

...
va_end(ap);
}

wpa_debug is used a fair amount and it would be annoying to
replace all the wpa_debug calls with tracef.

With vtracef, it simplifies the find and replace effort by
only changing it at one place.

Signed-off-by: Maxime Roussin-Belanger <maxime.roussinbelanger@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
.gitignore
doc/examples/demo-tracef/Makefile
doc/examples/demo-tracef/demo-vtracef.c [new file with mode: 0644]
doc/man/tracef-tracelog-limitations.txt
doc/man/tracef.3.txt
include/lttng/tracef.h
liblttng-ust/tracef.c
This page took 0.02533 seconds and 4 git commands to generate.