X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=CONTRIBUTING.adoc;h=f18f9b06d49517e739e575ad8ae20cb757942b35;hb=a310d6bdad7372b9d8b5d85519ea8a46fe911643;hp=e81d42b7cb76d50ad1f61bc71cf7c78986903a70;hpb=12e02f34925596ed245df117d0814c893094dbd1;p=babeltrace.git diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index e81d42b7..f18f9b06 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -431,6 +431,24 @@ contain their log level in their name: `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. @@ -595,8 +613,8 @@ the environment variable and sets the log level symbol accordingly. -- [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. @@ -625,7 +643,7 @@ the environment variable and sets the log level symbol accordingly. BT_LOG_LEVEL_EXTERN_SYMBOL(my_module_log_level); -#endif /* MY_MODULE_LOGGING_H */ +#endif /* BABELTRACE_MY_MODULE_LOGGING_H */ ---- -- + @@ -635,6 +653,9 @@ log level symbol. . 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