LIBTRACEEVENT(3)
π LIBTRACEEVENT(3) β the libtraceevent manual, bestie edition π
okay so welcome to the libtraceevent manual page, we're doing this, grab a snack π
β¨ NAME β¨
tep_set_loglevel β set the log level of the library, that's it, that's the whole job π
β¨ SYNOPSIS β¨
#include <event-parse.h>
enum tep_loglevel {
TEP_LOG_NONE = 0,
TEP_LOG_CRITICAL,
TEP_LOG_ERROR,
TEP_LOG_WARNING,
TEP_LOG_INFO,
TEP_LOG_DEBUG,
TEP_LOG_ALL
};
int tep_set_loglevel(enum tep_loglevel level);
like yes, that's an enum and a function, we love a tidy header π«Ά
β¨ DESCRIPTION β¨
so tep_set_loglevel() sets the level of the library logs that get printed on the console. it's giving volume knob for library drama π₯
the library log levels are, from quietest to loudest:
TEP_LOG_NONEβ don't print ANY logs. zero. silence. π€«TEP_LOG_CRITICALβ print critical logs, aka the problems that may cause a crash πTEP_LOG_ERRORβ print error logs, aka problems that could break the main logic of an API πTEP_LOG_WARNINGβ print warnings, aka problems that could limit the result of an API πTEP_LOG_INFOβ print information about normal execution of an API β¨TEP_LOG_DEBUGβ print debug information π§TEP_LOG_ALLβ print logs from all levels. chaotic, unhinged, iconic π
and here's the key lore: setting the log level to a specific value means logs from the previous levels get printed too. so for example TEP_LOG_WARNING will print any logs with severity TEP_LOG_WARNING, TEP_LOG_ERROR and TEP_LOG_CRITICAL. it's cumulative, no cap π
default log level is TEP_LOG_CRITICAL β so by default you only hear about the crash-y stuff.
β¨ EXAMPLE β¨
the way to do it, fr fr:
#include <event-parse.h>
tep_set_loglevel(TEP_LOG_ALL);
...
/* call libtraceevent APIs and observe any logs they produce */
...
tep_set_loglevel(TEP_LOG_CRITICAL);
turn it all the way up, do the thing, turn it back down. main character energy π
β¨ FILES β¨
event-parse.hβ header file to include in order to have access to the library APIs. the β¨ entry point β¨-ltraceeventβ linker switch to add when building a program that uses the library. don't forget her π«Ά
β¨ SEE ALSO β¨
libtraceevent(3), trace-cmd(1)
iykyk, go read those too π
β¨ AUTHOR β¨
- Steven Rostedt
<rostedt@goodmis.org>β author of libtraceevent π - Tzvetomir Stoyanov
<tz.stoyanov@gmail.com>β author of this man page, the blueprint π
β¨ REPORTING BUGS β¨
found a bug? spill it to <linux-trace-devel@vger.kernel.org> π
β¨ LICENSE β¨
libtraceevent is Free Software licensed under the GNU LGPL 2.1 β periodt π
β¨ RESOURCES β¨
https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
β¨ NOTES β¨
rostedt@goodmis.orgβmailto:rostedt@goodmis.orgtz.stoyanov@gmail.comβmailto:tz.stoyanov@gmail.comlinux-trace-devel@vger.kernel.orgβmailto:linux-trace-devel@vger.kernel.org
and that's the whole page bestie π¦ this was libtraceevent version 1.9.0, dated 06/15/2026, no cap. go set your log level and slay ππΈ
π¦ where this page comes from
- ubuntu stonking: libtraceevent-doc 1:1.9.0-2 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms