Public header which a library user can use to control and read
libbabeltrace2's current log level.
-`<babeltrace2/logging-internal.h>`::
+`<logging/log.h>`::
Internal, generic logging API which you can use in any Babeltrace
subproject. This is the translation of `zf_log.h`.
-`<babeltrace2/lib-logging-internal.h>`::
+`<lib/lib-logging.h>`::
Specific internal header to use within the library. This header
defines `BT_LOG_OUTPUT_LEVEL` to a custom, library-wide hidden
symbol which is the library's current log level before including
- `<babeltrace2/logging-internal.h>`.
+ `<logging/log.h>`.
-Do not include `<babeltrace2/logging-internal.h>` or
-`<babeltrace2/lib-logging-internal.h>` in a header which contains logging
+Do not include `<logging/log.h>` or
+`<lib/lib-logging.h>` in a header which contains logging
statements: this header could be included in source files which define a
different <<choose-a-tag,tag>>, for example. See
<<logging-instrument-header, Instrument a C header file>>.
`_bt_log_global_output_lvl` symbol. In practice, we never use this
symbol, and always make sure that `BT_LOG_OUTPUT_LEVEL` is defined to a
module-wise or subproject-wise hidden symbol before including
-`<babeltrace2/logging-internal.h>`. In the library,
-`<babeltrace2/lib-logging-internal.h>` does this job: just include this
+`<logging/log.h>`. In the library,
+`<lib/lib-logging.h>` does this job: just include this
header which defines `BT_LOG_OUTPUT_LEVEL` to the appropriate symbol
-before it includes `<babeltrace2/logging-internal.h>`. In plugins, for
+before it includes `<logging/log.h>`. In plugins, for
example, there is one log level per component class, which makes log
filtering easier during execution.
+
*/
#define BT_LOG_OUTPUT_LEVEL my_module_log_level
-#include <babeltrace2/logging-internal.h>
+#include "logging/log.h"
BT_LOG_INIT_LOG_LEVEL(my_module_log_level, "BABELTRACE_MY_MODULE_LOG_LEVEL");
----
*/
#define BT_LOG_OUTPUT_LEVEL my_module_log_level
-#include <babeltrace2/logging-internal.h>
+#include "logging/log.h"
BT_LOG_LEVEL_EXTERN_SYMBOL(my_module_log_level);