1LIBTRACECMD(3) libtracefs Manual LIBTRACECMD(3)
2
3
4
6 tracecmd_set_loglevel - Set log level of the library
7
9 #include <trace-cmd.h>
10
11 int tracecmd_set_loglevel(enum tep_loglevel level);
12
14 The tracecmd_set_loglevel() function sets the level of the library logs
15 that will be printed on the console. See libtraceevent(3) for detailed
16 desciription of the log levels. Setting the log level to specific value
17 means that logs from the previous levels will be printed too. For
18 example TEP_LOG_WARNING will print any logs with severity
19 TEP_LOG_WARNING, TEP_LOG_ERROR and TEP_LOG_CRITICAL. The default log
20 level is TEP_LOG_CRITICAL. When a new level is set, it is also
21 propagated to the libtracefs and libtraceevent.
22
24 #include <trace-cmd.h>
25 ...
26 tracecmd_set_loglevel(TEP_LOG_ALL);
27 ...
28 /* call libtracecmd, libtracefs or libtraceevent APIs and observe any logs they produce */
29 ...
30 tracecmd_set_loglevel(TEP_LOG_CRITICAL);
31
33 trace-cmd.h
34 Header file to include in order to have access to the library APIs.
35 -ltracecmd
36 Linker switch to add when building a program that uses the library.
37
39 libtracefs(3), libtraceevent(3), trace-cmd(1) trace-cmd.dat(5)
40
42 Steven Rostedt <rostedt@goodmis.org[1]>
43 Tzvetomir Stoyanov <tz.stoyanov@gmail.com[2]>
44
46 Report bugs to <linux-trace-devel@vger.kernel.org[3]>
47
49 libtracecmd is Free Software licensed under the GNU LGPL 2.1
50
52 https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/
53
55 Copyright (C) 2021 VMware, Inc. Free use of this software is granted
56 under the terms of the GNU Public License (GPL).
57
59 1. rostedt@goodmis.org
60 mailto:rostedt@goodmis.org
61
62 2. tz.stoyanov@gmail.com
63 mailto:tz.stoyanov@gmail.com
64
65 3. linux-trace-devel@vger.kernel.org
66 mailto:linux-trace-devel@vger.kernel.org
67
68
69
70libtracefs 07/20/2023 LIBTRACECMD(3)