LIBTRACEFS(3)
π LIBTRACEFS(3) β the libtracefs manual, bestie edition π¦
okay so this is a page from the libtracefs manual, and we're about to make the library's log levels make sense. no cap. β¨
πΈ NAME πΈ
tracefs_set_loglevel β sets the log level of the library, that's literally the whole job π
β SYNOPSIS β
#include <tracefs.h>
int tracefs_set_loglevel(enum tep_loglevel level);
π DESCRIPTION π
okay so tracefs_set_loglevel() sets the level of the library logs that get printed on the console. π See libtraceevent(3) for the detailed description of the log levels β that's where the lore lives, iykyk.
here's the important part: setting the log level to a specific value means logs from the previous levels get printed too. so it's cumulative, not picky. π for example, TEP_LOG_WARNING will print any logs with severity TEP_LOG_WARNING, TEP_LOG_ERROR and TEP_LOG_CRITICAL. it's giving "come one, come all."
the default log level is TEP_LOG_CRITICAL π
and when a new level is set, it is also propagated to the libtraceevent. so the vibe travels. π¦
π₯ EXAMPLE π₯
#include <tracefs.h>
tracefs_set_loglevel(TEP_LOG_ALL);
...
/* call libtracefs or libtraceevent APIs and observe any logs they produce */
...
tracefs_set_loglevel(TEP_LOG_CRITICAL);
look at her go β turn the logs all the way up with TEP_LOG_ALL, do your thing, then tuck it back to TEP_LOG_CRITICAL. iconic behavior. π
π§ FILES π§
tracefs.hβ header file to include in order to have access to the library APIs. yes you actually have to#includeit, bestie. π«Ά-ltracefsβ linker switch to add when building a program that uses the library. don't forget her, she's the whole reason it links. π
π SEE ALSO π
libtracefs(3), libtraceevent(3), trace-cmd(1)
π AUTHOR π
Steven Rostedt <rostedt@goodmis.org[1]>Tzvetomir Stoyanov <tz.stoyanov@gmail.com[2]>
π REPORTING BUGS π
report bugs to <linux-trace-devel@vger.kernel.org[3]> β they wanna hear it, fr fr. π
πΈ LICENSE πΈ
libtracefs is Free Software licensed under the GNU LGPL 2.1 π
π¦ RESOURCES π¦
https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
β COPYING β
Copyright (C) 2021 VMware, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL).
π NOTES π
rostedt@goodmis.orgmailto:rostedt@goodmis.orgtz.stoyanov@gmail.commailto:tz.stoyanov@gmail.comlinux-trace-devel@vger.kernel.orgmailto:linux-trace-devel@vger.kernel.org
and that's the whole page, bestie π«Ά this was libtracefs version 1.8.4, dated 10/21/2026 β go forth and set your log levels with main character energy π
β¨
π¦ where this page comes from
- arch rolling: libtracefs 1.8.4-1 Β· GPL-2.0-only AND LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms