The scheme employed in Babeltrace to break this cycle consists in the
"children" holding *reverse component references* to their parents. That
-is, in the context of CTF IR, that event classes hold a reference to
-their parent stream class and stream classes hold a reference to their
-parent trace.
+is, in the context of the trace IR, that event classes hold a reference
+to their parent stream class and stream classes hold a reference to
+their parent trace.
On the other hand, parents hold *claiming aggregation references* to
their children. A claiming aggregation reference means that the object
`BT_LOGF_MEM(data_ptr, data_size, "format string", ...)`::
Memory fatal logging statement.
+`BT_LOGV_ERRNO("initial message", "format string", ...)`::
+ `errno` string verbose logging statement.
+
+`BT_LOGD_ERRNO("initial message", "format string", ...)`::
+ `errno` string debug logging statement.
+
+`BT_LOGI_ERRNO("initial message", "format string", ...)`::
+ `errno` string info logging statement.
+
+`BT_LOGW_ERRNO("initial message", "format string", ...)`::
+ `errno` string warning logging statement.
+
+`BT_LOGE_ERRNO("initial message", "format string", ...)`::
+ `errno` string error logging statement.
+
+`BT_LOGF_ERRNO("initial message", "format string", ...)`::
+ `errno` string fatal logging statement.
+
`BT_LOGV_STR("preformatted string")`::
Preformatted string verbose logging statement.
--
[source,c]
----
-#ifndef MY_MODULE_LOGGING_H
-#define MY_MODULE_LOGGING_H
+#ifndef BABELTRACE_MY_MODULE_LOGGING_H
+#define BABELTRACE_MY_MODULE_LOGGING_H
/*
* Copyright (c) 2017 EfficiOS Inc. <http://efficios.com/>
BT_LOG_LEVEL_EXTERN_SYMBOL(my_module_log_level);
-#endif /* MY_MODULE_LOGGING_H */
+#endif /* BABELTRACE_MY_MODULE_LOGGING_H */
----
--
+
. Include the `logging.c` and `logging.h` in the `_SOURCES` variable
of your module's object in your module's root `Makefile.am`.
+. Add the log level initializing environment variable name to the
+ `log_level_env_var_names` array in `cli/babeltrace.c`.
+
[[logging-instrument-source]]
==== Instrument a C source file