X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=CONTRIBUTING.adoc;h=3489e0e1f5b32e472a3b9e24ce6e4792b2a5a573;hp=32fd796343b5b669aadf69ca9bd37686cd1f89f4;hb=578e048b5debf169e286e5b5cc747b5d6c16886d;hpb=68b66a256a54d32992dfefeaad11eea88b7df234 diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 32fd7963..3489e0e1 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -284,18 +284,18 @@ The logging API headers are: Public header which a library user can use to control and read libbabeltrace2's current log level. -``:: +``:: Internal, generic logging API which you can use in any Babeltrace subproject. This is the translation of `zf_log.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 - ``. + ``. -Do not include `` or -`` in a header which contains logging +Do not include `` or +`` in a header which contains logging statements: this header could be included in source files which define a different <>, for example. See <>. @@ -355,10 +355,10 @@ get the configured minimal log level. `_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 -``. In the library, -`` does this job: just include this +``. In the library, +`` does this job: just include this header which defines `BT_LOG_OUTPUT_LEVEL` to the appropriate symbol -before it includes ``. In plugins, for +before it includes ``. In plugins, for example, there is one log level per component class, which makes log filtering easier during execution. + @@ -593,7 +593,7 @@ Follow those steps to make your module loggable: */ #define BT_LOG_OUTPUT_LEVEL my_module_log_level -#include +#include "logging/log.h" BT_LOG_INIT_LOG_LEVEL(my_module_log_level, "BABELTRACE_MY_MODULE_LOG_LEVEL"); ---- @@ -639,7 +639,7 @@ the environment variable and sets the log level symbol accordingly. */ #define BT_LOG_OUTPUT_LEVEL my_module_log_level -#include +#include "logging/log.h" BT_LOG_LEVEL_EXTERN_SYMBOL(my_module_log_level);