From: Philippe Proulx Date: Fri, 26 Jul 2019 18:54:49 +0000 (-0400) Subject: Move `src/plugins/comp-logging.h` -> `src/logging/comp-logging.h` X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=d9c39b0a4ad9517178899334c0ca89fd20901609;p=babeltrace.git Move `src/plugins/comp-logging.h` -> `src/logging/comp-logging.h` Move this file so that other parts of the project than plugins, namely Python bindings, can use it. Also: in `comp-logging.h`, the requirement that `BT_LOG_OUTPUT_LEVEL` and `BT_COMP_LOG_SELF_COMP` are set is removed because they are not needed to use the generic BT_COMP_LOG_CUR_LVL() macro. Signed-off-by: Philippe Proulx Change-Id: Ic961c3a97863dcef63fb7ee673841650cf9ca9e9 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1788 Reviewed-by: Simon Marchi Tested-by: jenkins --- diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index d5d86e54..be9688a3 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -295,7 +295,7 @@ hidden symbol which is the library's current log level before including This header offers the <>. -`"plugins/comp-logging.h"`:: +`"logging/comp-logging.h"`:: Specific internal header to use within a component class. + This header offers the <self_comp) ---- -. Include `"plugins/comp-logging.h"`: +. Include `"logging/comp-logging.h"`: + [source,c] ---- -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" ---- . In the component initialization method, make sure to set the @@ -1189,7 +1189,7 @@ bt_self_component_status my_comp_init( To instrument a component class C header file (`.h`), if you have `static inline` functions in it: -. Do not include `"plugins/comp-logging.h"`! +. Do not include `"logging/comp-logging.h"`! . Require that component logging be enabled: + @@ -1197,7 +1197,7 @@ To instrument a component class C header file (`.h`), if you have ---- /* Protection: this file uses BT_COMP_LOG*() macros directly */ #ifndef BT_COMP_LOG_SUPPORTED -# error Please include "plugins/comp-logging.h" before including this file. +# error Please include "logging/comp-logging.h" before including this file. #endif ---- diff --git a/src/logging/Makefile.am b/src/logging/Makefile.am index fd6c6b64..69217b75 100644 --- a/src/logging/Makefile.am +++ b/src/logging/Makefile.am @@ -1,3 +1,3 @@ noinst_LTLIBRARIES = libbabeltrace2-logging.la -libbabeltrace2_logging_la_SOURCES = log.c log.h +libbabeltrace2_logging_la_SOURCES = log.c log.h comp-logging.h diff --git a/src/logging/comp-logging.h b/src/logging/comp-logging.h new file mode 100644 index 00000000..22e9bdae --- /dev/null +++ b/src/logging/comp-logging.h @@ -0,0 +1,134 @@ +#ifndef BABELTRACE_LOGGING_COMP_LOGGING_H +#define BABELTRACE_LOGGING_COMP_LOGGING_H + +/* + * Copyright 2019 Philippe Proulx + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef BT_LOG_TAG +# error Please define a tag with BT_LOG_TAG before including this file. +#endif + +#include +#include +#include "logging/log.h" + +#define _BT_COMP_LOG_COMP_PREFIX "[%s] " +#define _BT_COMP_LOG_COMP_NA_STR "N/A" + +/* Logs with level `_lvl` for self component `_self_comp` */ +#define BT_COMP_LOG(_lvl, _self_comp, _fmt, ...) \ + BT_LOG_WRITE((_lvl), BT_LOG_TAG, _BT_COMP_LOG_COMP_PREFIX _fmt, \ + (_self_comp) ? \ + bt_component_get_name( \ + bt_self_component_as_component(_self_comp)) : \ + _BT_COMP_LOG_COMP_NA_STR, \ + ##__VA_ARGS__) + +#define BT_COMP_LOG_CUR_LVL(_lvl, _cur_lvl, _self_comp, _fmt, ...) \ + BT_LOG_WRITE_CUR_LVL((_lvl), (_cur_lvl), BT_LOG_TAG, \ + _BT_COMP_LOG_COMP_PREFIX _fmt, \ + (_self_comp) ? \ + bt_component_get_name( \ + bt_self_component_as_component(_self_comp)) : \ + _BT_COMP_LOG_COMP_NA_STR, \ + ##__VA_ARGS__) + +#define BT_COMP_LOG_ERRNO(_lvl, _self_comp, _msg, _fmt, ...) \ + BT_LOG_WRITE_ERRNO((_lvl), BT_LOG_TAG, _msg, \ + _BT_COMP_LOG_COMP_PREFIX _fmt, \ + (_self_comp) ? \ + bt_component_get_name( \ + bt_self_component_as_component(_self_comp)) : \ + _BT_COMP_LOG_COMP_NA_STR, \ + ##__VA_ARGS__) + +#define BT_COMP_LOG_ERRNO_CUR_LVL(_lvl, _cur_lvl, _self_comp, _msg, _fmt, ...) \ + BT_LOG_WRITE_ERRNO_CUR_LVL((_lvl), (_cur_lvl), BT_LOG_TAG, _msg, \ + _BT_COMP_LOG_COMP_PREFIX _fmt, \ + (_self_comp) ? \ + bt_component_get_name( \ + bt_self_component_as_component(_self_comp)) : \ + _BT_COMP_LOG_COMP_NA_STR, \ + ##__VA_ARGS__) + +#define BT_COMP_LOG_MEM(_lvl, _self_comp, _data_ptr, _data_sz, _fmt, ...) \ + BT_LOG_WRITE_MEM((_lvl), BT_LOG_TAG, (_data_ptr), (_data_sz), \ + _BT_COMP_LOG_COMP_PREFIX _fmt, \ + (_self_comp) ? \ + bt_component_get_name( \ + bt_self_component_as_component(_self_comp)) : \ + _BT_COMP_LOG_COMP_NA_STR, \ + ##__VA_ARGS__) + +/* Specific per-level logging macros; they use `BT_COMP_LOG_SELF_COMP` */ +#define BT_COMP_LOGF(_fmt, ...) \ + BT_COMP_LOG(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGE(_fmt, ...) \ + BT_COMP_LOG(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGW(_fmt, ...) \ + BT_COMP_LOG(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGI(_fmt, ...) \ + BT_COMP_LOG(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGD(_fmt, ...) \ + BT_COMP_LOG(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGT(_fmt, ...) \ + BT_COMP_LOG(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGF_STR(_str) \ + BT_COMP_LOG(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) +#define BT_COMP_LOGE_STR(_str) \ + BT_COMP_LOG(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) +#define BT_COMP_LOGW_STR(_str) \ + BT_COMP_LOG(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) +#define BT_COMP_LOGI_STR(_str) \ + BT_COMP_LOG(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) +#define BT_COMP_LOGD_STR(_str) \ + BT_COMP_LOG(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) +#define BT_COMP_LOGT_STR(_str) \ + BT_COMP_LOG(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) +#define BT_COMP_LOGF_ERRNO(_msg, _fmt, ...) \ + BT_COMP_LOG_ERRNO(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGE_ERRNO(_msg, _fmt, ...) \ + BT_COMP_LOG_ERRNO(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGW_ERRNO(_msg, _fmt, ...) \ + BT_COMP_LOG_ERRNO(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGI_ERRNO(_msg, _fmt, ...) \ + BT_COMP_LOG_ERRNO(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGD_ERRNO(_msg, _fmt, ...) \ + BT_COMP_LOG_ERRNO(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGT_ERRNO(_msg, _fmt, ...) \ + BT_COMP_LOG_ERRNO(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGF_MEM(_data_ptr, _data_sz, _fmt, ...) \ + BT_COMP_LOG_MEM(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGE_MEM(_data_ptr, _data_sz, _fmt, ...) \ + BT_COMP_LOG_MEM(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGW_MEM(_data_ptr, _data_sz, _fmt, ...) \ + BT_COMP_LOG_MEM(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGI_MEM(_data_ptr, _data_sz, _fmt, ...) \ + BT_COMP_LOG_MEM(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGD_MEM(_data_ptr, _data_sz, _fmt, ...) \ + BT_COMP_LOG_MEM(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) +#define BT_COMP_LOGT_MEM(_data_ptr, _data_sz, _fmt, ...) \ + BT_COMP_LOG_MEM(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) + +#define BT_COMP_LOG_SUPPORTED + +#endif /* BABELTRACE_LOGGING_COMP_LOGGING_H */ diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index aa0c6dba..0c53f764 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -3,5 +3,3 @@ SUBDIRS = utils text ctf if ENABLE_DEBUG_INFO SUBDIRS += lttng-utils endif - -EXTRA_DIST = comp-logging.h diff --git a/src/plugins/comp-logging.h b/src/plugins/comp-logging.h deleted file mode 100644 index 6e55c671..00000000 --- a/src/plugins/comp-logging.h +++ /dev/null @@ -1,142 +0,0 @@ -#ifndef BABELTRACE_PLUGINS_COMP_LOGGING_H -#define BABELTRACE_PLUGINS_COMP_LOGGING_H - -/* - * Copyright 2019 Philippe Proulx - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef BT_LOG_TAG -# error Please define a tag with BT_LOG_TAG before including this file. -#endif - -#ifndef BT_LOG_OUTPUT_LEVEL -# error Please define a log level expression with BT_LOG_OUTPUT_LEVEL before including this file. -#endif - -#ifndef BT_COMP_LOG_SELF_COMP -# error Please define a self component address expression with BT_COMP_LOG_SELF_COMP before including this file. -#endif - -#include -#include -#include "logging/log.h" - -#define _BT_COMP_LOG_COMP_PREFIX "[%s] " -#define _BT_COMP_LOG_COMP_NA_STR "N/A" - -/* Logs with level `_lvl` for self component `_self_comp` */ -#define BT_COMP_LOG(_lvl, _self_comp, _fmt, ...) \ - BT_LOG_WRITE((_lvl), BT_LOG_TAG, _BT_COMP_LOG_COMP_PREFIX _fmt, \ - (_self_comp) ? \ - bt_component_get_name( \ - bt_self_component_as_component(_self_comp)) : \ - _BT_COMP_LOG_COMP_NA_STR, \ - ##__VA_ARGS__) - -#define BT_COMP_LOG_CUR_LVL(_lvl, _cur_lvl, _self_comp, _fmt, ...) \ - BT_LOG_WRITE_CUR_LVL((_lvl), (_cur_lvl), BT_LOG_TAG, \ - _BT_COMP_LOG_COMP_PREFIX _fmt, \ - (_self_comp) ? \ - bt_component_get_name( \ - bt_self_component_as_component(_self_comp)) : \ - _BT_COMP_LOG_COMP_NA_STR, \ - ##__VA_ARGS__) - -#define BT_COMP_LOG_ERRNO(_lvl, _self_comp, _msg, _fmt, ...) \ - BT_LOG_WRITE_ERRNO((_lvl), BT_LOG_TAG, _msg, \ - _BT_COMP_LOG_COMP_PREFIX _fmt, \ - (_self_comp) ? \ - bt_component_get_name( \ - bt_self_component_as_component(_self_comp)) : \ - _BT_COMP_LOG_COMP_NA_STR, \ - ##__VA_ARGS__) - -#define BT_COMP_LOG_ERRNO_CUR_LVL(_lvl, _cur_lvl, _self_comp, _msg, _fmt, ...) \ - BT_LOG_WRITE_ERRNO_CUR_LVL((_lvl), (_cur_lvl), BT_LOG_TAG, _msg, \ - _BT_COMP_LOG_COMP_PREFIX _fmt, \ - (_self_comp) ? \ - bt_component_get_name( \ - bt_self_component_as_component(_self_comp)) : \ - _BT_COMP_LOG_COMP_NA_STR, \ - ##__VA_ARGS__) - -#define BT_COMP_LOG_MEM(_lvl, _self_comp, _data_ptr, _data_sz, _fmt, ...) \ - BT_LOG_WRITE_MEM((_lvl), BT_LOG_TAG, (_data_ptr), (_data_sz), \ - _BT_COMP_LOG_COMP_PREFIX _fmt, \ - (_self_comp) ? \ - bt_component_get_name( \ - bt_self_component_as_component(_self_comp)) : \ - _BT_COMP_LOG_COMP_NA_STR, \ - ##__VA_ARGS__) - -/* Specific per-level logging macros; they use `BT_COMP_LOG_SELF_COMP` */ -#define BT_COMP_LOGF(_fmt, ...) \ - BT_COMP_LOG(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGE(_fmt, ...) \ - BT_COMP_LOG(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGW(_fmt, ...) \ - BT_COMP_LOG(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGI(_fmt, ...) \ - BT_COMP_LOG(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGD(_fmt, ...) \ - BT_COMP_LOG(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGT(_fmt, ...) \ - BT_COMP_LOG(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGF_STR(_str) \ - BT_COMP_LOG(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) -#define BT_COMP_LOGE_STR(_str) \ - BT_COMP_LOG(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) -#define BT_COMP_LOGW_STR(_str) \ - BT_COMP_LOG(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) -#define BT_COMP_LOGI_STR(_str) \ - BT_COMP_LOG(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) -#define BT_COMP_LOGD_STR(_str) \ - BT_COMP_LOG(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) -#define BT_COMP_LOGT_STR(_str) \ - BT_COMP_LOG(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), "%s", (_str)) -#define BT_COMP_LOGF_ERRNO(_msg, _fmt, ...) \ - BT_COMP_LOG_ERRNO(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGE_ERRNO(_msg, _fmt, ...) \ - BT_COMP_LOG_ERRNO(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGW_ERRNO(_msg, _fmt, ...) \ - BT_COMP_LOG_ERRNO(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGI_ERRNO(_msg, _fmt, ...) \ - BT_COMP_LOG_ERRNO(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGD_ERRNO(_msg, _fmt, ...) \ - BT_COMP_LOG_ERRNO(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGT_ERRNO(_msg, _fmt, ...) \ - BT_COMP_LOG_ERRNO(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), _msg, _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGF_MEM(_data_ptr, _data_sz, _fmt, ...) \ - BT_COMP_LOG_MEM(BT_LOG_FATAL, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGE_MEM(_data_ptr, _data_sz, _fmt, ...) \ - BT_COMP_LOG_MEM(BT_LOG_ERROR, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGW_MEM(_data_ptr, _data_sz, _fmt, ...) \ - BT_COMP_LOG_MEM(BT_LOG_WARNING, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGI_MEM(_data_ptr, _data_sz, _fmt, ...) \ - BT_COMP_LOG_MEM(BT_LOG_INFO, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGD_MEM(_data_ptr, _data_sz, _fmt, ...) \ - BT_COMP_LOG_MEM(BT_LOG_DEBUG, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) -#define BT_COMP_LOGT_MEM(_data_ptr, _data_sz, _fmt, ...) \ - BT_COMP_LOG_MEM(BT_LOG_TRACE, (BT_COMP_LOG_SELF_COMP), (_data_ptr), (_data_sz), _fmt, ##__VA_ARGS__) - -#define BT_COMP_LOG_SUPPORTED - -#endif /* BABELTRACE_PLUGINS_COMP_LOGGING_H */ diff --git a/src/plugins/ctf/common/bfcr/bfcr.c b/src/plugins/ctf/common/bfcr/bfcr.c index 4aedabc5..fc9b6699 100644 --- a/src/plugins/ctf/common/bfcr/bfcr.c +++ b/src/plugins/ctf/common/bfcr/bfcr.c @@ -26,7 +26,7 @@ #define BT_COMP_LOG_SELF_COMP (bfcr->self_comp) #define BT_LOG_OUTPUT_LEVEL (bfcr->log_level) #define BT_LOG_TAG "PLUGIN/CTF/BFCR" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/common/metadata/ctf-meta-resolve.c b/src/plugins/ctf/common/metadata/ctf-meta-resolve.c index 6666d9eb..e2e5b3f2 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-resolve.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-resolve.c @@ -16,7 +16,7 @@ #define BT_COMP_LOG_SELF_COMP (ctx->self_comp) #define BT_LOG_OUTPUT_LEVEL (ctx->log_level) #define BT_LOG_TAG "PLUGIN/CTF/META/RESOLVE" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include "common/macros.h" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c b/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c index 85575c0a..db5762cf 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-update-default-clock-classes.c @@ -15,7 +15,7 @@ #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp) #define BT_LOG_OUTPUT_LEVEL (log_cfg->log_level) #define BT_LOG_TAG "PLUGIN/CTF/META/UPDATE-DEF-CC" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include "common/macros.h" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-validate.c b/src/plugins/ctf/common/metadata/ctf-meta-validate.c index 997deb48..8f7b4790 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-validate.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-validate.c @@ -15,7 +15,7 @@ #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp) #define BT_LOG_OUTPUT_LEVEL (log_cfg->log_level) #define BT_LOG_TAG "PLUGIN/CTF/META/VALIDATE" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include "common/macros.h" diff --git a/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c b/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c index e8a90220..ebd995f6 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-warn-meaningless-header-fields.c @@ -15,7 +15,7 @@ #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp) #define BT_LOG_OUTPUT_LEVEL (log_cfg->log_level) #define BT_LOG_TAG "PLUGIN/CTF/META/WARN-MEANINGLESS-HEADER-FIELDS" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include "common/macros.h" diff --git a/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.c b/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.c index bf735827..07ddca85 100644 --- a/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.c +++ b/src/plugins/ctf/common/metadata/decoder-packetized-file-stream-to-buf.c @@ -15,7 +15,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/CTF/META/DECODER-DECODE-PACKET" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/common/metadata/decoder.c b/src/plugins/ctf/common/metadata/decoder.c index 4f4092de..a422ad43 100644 --- a/src/plugins/ctf/common/metadata/decoder.c +++ b/src/plugins/ctf/common/metadata/decoder.c @@ -15,7 +15,7 @@ #define BT_COMP_LOG_SELF_COMP (mdec->config.self_comp) #define BT_LOG_OUTPUT_LEVEL (mdec->config.log_level) #define BT_LOG_TAG "PLUGIN/CTF/META/DECODER" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/common/metadata/visitor-generate-ir.c b/src/plugins/ctf/common/metadata/visitor-generate-ir.c index 26e11290..b7831a86 100644 --- a/src/plugins/ctf/common/metadata/visitor-generate-ir.c +++ b/src/plugins/ctf/common/metadata/visitor-generate-ir.c @@ -30,7 +30,7 @@ #define BT_COMP_LOG_SELF_COMP (ctx->log_cfg.self_comp) #define BT_LOG_OUTPUT_LEVEL (ctx->log_cfg.log_level) #define BT_LOG_TAG "PLUGIN/CTF/META/IR-VISITOR" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/common/metadata/visitor-parent-links.c b/src/plugins/ctf/common/metadata/visitor-parent-links.c index bfa3f0cf..af549b8a 100644 --- a/src/plugins/ctf/common/metadata/visitor-parent-links.c +++ b/src/plugins/ctf/common/metadata/visitor-parent-links.c @@ -27,7 +27,7 @@ #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp) #define BT_LOG_OUTPUT_LEVEL (log_cfg->log_level) #define BT_LOG_TAG "PLUGIN/CTF/META/PARENT-LINKS-VISITOR" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/common/metadata/visitor-semantic-validator.c b/src/plugins/ctf/common/metadata/visitor-semantic-validator.c index 8e732997..32cff557 100644 --- a/src/plugins/ctf/common/metadata/visitor-semantic-validator.c +++ b/src/plugins/ctf/common/metadata/visitor-semantic-validator.c @@ -27,7 +27,7 @@ #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp) #define BT_LOG_OUTPUT_LEVEL (log_cfg->log_level) #define BT_LOG_TAG "PLUGIN/CTF/META/SEMANTIC-VALIDATOR-VISITOR" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/common/msg-iter/msg-iter.c b/src/plugins/ctf/common/msg-iter/msg-iter.c index f7d47499..78a65f1a 100644 --- a/src/plugins/ctf/common/msg-iter/msg-iter.c +++ b/src/plugins/ctf/common/msg-iter/msg-iter.c @@ -26,7 +26,7 @@ #define BT_COMP_LOG_SELF_COMP (notit->self_comp) #define BT_LOG_OUTPUT_LEVEL (notit->log_level) #define BT_LOG_TAG "PLUGIN/CTF/MSG-ITER" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/fs-sink/fs-sink-stream.c b/src/plugins/ctf/fs-sink/fs-sink-stream.c index a8628998..a8bf2dc7 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-stream.c +++ b/src/plugins/ctf/fs-sink/fs-sink-stream.c @@ -23,7 +23,7 @@ #define BT_COMP_LOG_SELF_COMP (stream->trace->fs_sink->self_comp) #define BT_LOG_OUTPUT_LEVEL (stream->log_level) #define BT_LOG_TAG "PLUGIN/SINK.CTF.FS/STREAM" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/fs-sink/fs-sink-trace.c b/src/plugins/ctf/fs-sink/fs-sink-trace.c index e2be329b..d41e1d9f 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-trace.c +++ b/src/plugins/ctf/fs-sink/fs-sink-trace.c @@ -23,7 +23,7 @@ #define BT_COMP_LOG_SELF_COMP (trace->fs_sink->self_comp) #define BT_LOG_OUTPUT_LEVEL (trace->log_level) #define BT_LOG_TAG "PLUGIN/SINK.CTF.FS/TRACE" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/fs-sink/fs-sink.c b/src/plugins/ctf/fs-sink/fs-sink.c index 172e5b4f..077a08b2 100644 --- a/src/plugins/ctf/fs-sink/fs-sink.c +++ b/src/plugins/ctf/fs-sink/fs-sink.c @@ -23,7 +23,7 @@ #define BT_COMP_LOG_SELF_COMP (fs_sink->self_comp) #define BT_LOG_OUTPUT_LEVEL (fs_sink->log_level) #define BT_LOG_TAG "PLUGIN/SINK.CTF.FS" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c index 980e5503..16794409 100644 --- a/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c +++ b/src/plugins/ctf/fs-sink/translate-trace-ir-to-ctf-ir.c @@ -23,7 +23,7 @@ #define BT_COMP_LOG_SELF_COMP (ctx->self_comp) #define BT_LOG_OUTPUT_LEVEL (ctx->log_level) #define BT_LOG_TAG "PLUGIN/SINK.CTF.FS/TRANSLATE-TRACE-IR-TO-CTF-IR" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include "common/macros.h" diff --git a/src/plugins/ctf/fs-src/data-stream-file.c b/src/plugins/ctf/fs-src/data-stream-file.c index 929e96bf..3a82da30 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.c +++ b/src/plugins/ctf/fs-src/data-stream-file.c @@ -25,7 +25,7 @@ #define BT_COMP_LOG_SELF_COMP (ds_file->self_comp) #define BT_LOG_OUTPUT_LEVEL (ds_file->log_level) #define BT_LOG_TAG "PLUGIN/SRC.CTF.FS/DS" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/fs-src/file.c b/src/plugins/ctf/fs-src/file.c index 84d85cc2..9c116782 100644 --- a/src/plugins/ctf/fs-src/file.c +++ b/src/plugins/ctf/fs-src/file.c @@ -23,7 +23,7 @@ #define BT_COMP_LOG_SELF_COMP (file->self_comp) #define BT_LOG_OUTPUT_LEVEL (file->log_level) #define BT_LOG_TAG "PLUGIN/SRC.CTF.FS/FILE" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/fs-src/fs.c b/src/plugins/ctf/fs-src/fs.c index 965a9ee8..398708db 100644 --- a/src/plugins/ctf/fs-src/fs.c +++ b/src/plugins/ctf/fs-src/fs.c @@ -28,7 +28,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/SRC.CTF.FS" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include "common/common.h" #include diff --git a/src/plugins/ctf/fs-src/metadata.c b/src/plugins/ctf/fs-src/metadata.c index 8a1d9828..42e05324 100644 --- a/src/plugins/ctf/fs-src/metadata.c +++ b/src/plugins/ctf/fs-src/metadata.c @@ -26,7 +26,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/SRC.CTF.FS/META" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/lttng-live/data-stream.c b/src/plugins/ctf/lttng-live/data-stream.c index c89cba52..1c89a87a 100644 --- a/src/plugins/ctf/lttng-live/data-stream.c +++ b/src/plugins/ctf/lttng-live/data-stream.c @@ -26,7 +26,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/SRC.CTF.LTTNG-LIVE/DS" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/lttng-live/lttng-live.c b/src/plugins/ctf/lttng-live/lttng-live.c index 124b9d12..7b5eddbd 100644 --- a/src/plugins/ctf/lttng-live/lttng-live.c +++ b/src/plugins/ctf/lttng-live/lttng-live.c @@ -31,7 +31,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/SRC.CTF.LTTNG-LIVE" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/lttng-live/metadata.c b/src/plugins/ctf/lttng-live/metadata.c index b31cd96a..910bbf0c 100644 --- a/src/plugins/ctf/lttng-live/metadata.c +++ b/src/plugins/ctf/lttng-live/metadata.c @@ -27,7 +27,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/SRC.CTF.LTTNG-LIVE/META" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/ctf/lttng-live/viewer-connection.c b/src/plugins/ctf/lttng-live/viewer-connection.c index 42ea78c0..8c02be02 100644 --- a/src/plugins/ctf/lttng-live/viewer-connection.c +++ b/src/plugins/ctf/lttng-live/viewer-connection.c @@ -24,7 +24,7 @@ #define BT_COMP_LOG_SELF_COMP (viewer_connection->self_comp) #define BT_LOG_OUTPUT_LEVEL (viewer_connection->log_level) #define BT_LOG_TAG "PLUGIN/SRC.CTF.LTTNG-LIVE/VIEWER" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/lttng-utils/debug-info/bin-info.c b/src/plugins/lttng-utils/debug-info/bin-info.c index 3d46a54f..149236e8 100644 --- a/src/plugins/lttng-utils/debug-info/bin-info.c +++ b/src/plugins/lttng-utils/debug-info/bin-info.c @@ -29,7 +29,7 @@ #define BT_COMP_LOG_SELF_COMP (bin->self_comp) #define BT_LOG_OUTPUT_LEVEL (bin->log_level) #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO/BIN-INFO" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/lttng-utils/debug-info/debug-info.c b/src/plugins/lttng-utils/debug-info/debug-info.c index f3ba254f..545a4eee 100644 --- a/src/plugins/lttng-utils/debug-info/debug-info.c +++ b/src/plugins/lttng-utils/debug-info/debug-info.c @@ -29,7 +29,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include diff --git a/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c b/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c index 274c3170..3bb1fba1 100644 --- a/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c +++ b/src/plugins/lttng-utils/debug-info/trace-ir-data-copy.c @@ -26,7 +26,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO/TRACE-IR-DATA-COPY" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/lttng-utils/debug-info/trace-ir-mapping.c b/src/plugins/lttng-utils/debug-info/trace-ir-mapping.c index dfef517f..67f7a2db 100644 --- a/src/plugins/lttng-utils/debug-info/trace-ir-mapping.c +++ b/src/plugins/lttng-utils/debug-info/trace-ir-mapping.c @@ -28,7 +28,7 @@ #define BT_COMP_LOG_SELF_COMP (ir_maps->self_comp) #define BT_LOG_OUTPUT_LEVEL (ir_maps->log_level) #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO/TRACE-IR-MAPPING" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include diff --git a/src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c index 60ef68bc..0bc9194f 100644 --- a/src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c +++ b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-copy.c @@ -27,7 +27,7 @@ #define BT_COMP_LOG_SELF_COMP self_comp #define BT_LOG_OUTPUT_LEVEL log_level #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO/TRACE-IR-META-COPY" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c index d1d852be..0b0d4d4c 100644 --- a/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c +++ b/src/plugins/lttng-utils/debug-info/trace-ir-metadata-field-class-copy.c @@ -27,7 +27,7 @@ #define BT_COMP_LOG_SELF_COMP (md_maps->self_comp) #define BT_LOG_OUTPUT_LEVEL (md_maps->log_level) #define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO/TRACE-IR-META-FC-COPY" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include "common/assert.h" #include "common/common.h" diff --git a/src/plugins/text/details/details.c b/src/plugins/text/details/details.c index 34410187..85cfb017 100644 --- a/src/plugins/text/details/details.c +++ b/src/plugins/text/details/details.c @@ -23,7 +23,7 @@ #define BT_COMP_LOG_SELF_COMP (details_comp->self_comp) #define BT_LOG_OUTPUT_LEVEL (details_comp->log_level) #define BT_LOG_TAG "PLUGIN/SINK.TEXT.DETAILS" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include diff --git a/src/plugins/text/dmesg/dmesg.c b/src/plugins/text/dmesg/dmesg.c index 49fba13f..e8317d47 100644 --- a/src/plugins/text/dmesg/dmesg.c +++ b/src/plugins/text/dmesg/dmesg.c @@ -24,7 +24,7 @@ #define BT_COMP_LOG_SELF_COMP (dmesg_comp->self_comp) #define BT_LOG_OUTPUT_LEVEL (dmesg_comp->log_level) #define BT_LOG_TAG "PLUGIN/SRC.TEXT.DMESG" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include diff --git a/src/plugins/utils/counter/counter.c b/src/plugins/utils/counter/counter.c index f61ee043..6284438f 100644 --- a/src/plugins/utils/counter/counter.c +++ b/src/plugins/utils/counter/counter.c @@ -23,7 +23,7 @@ #define BT_COMP_LOG_SELF_COMP (counter->self_comp) #define BT_LOG_OUTPUT_LEVEL (counter->log_level) #define BT_LOG_TAG "PLUGIN/FLT.UTILS.COUNTER" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include #include "common/macros.h" diff --git a/src/plugins/utils/muxer/muxer.c b/src/plugins/utils/muxer/muxer.c index 31d374fc..dd18d98a 100644 --- a/src/plugins/utils/muxer/muxer.c +++ b/src/plugins/utils/muxer/muxer.c @@ -23,7 +23,7 @@ #define BT_COMP_LOG_SELF_COMP (muxer_comp->self_comp) #define BT_LOG_OUTPUT_LEVEL (muxer_comp->log_level) #define BT_LOG_TAG "PLUGIN/FLT.UTILS.MUXER" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include "common/macros.h" #include "common/uuid.h" diff --git a/src/plugins/utils/trimmer/trimmer.c b/src/plugins/utils/trimmer/trimmer.c index 5c7ec431..0658cc95 100644 --- a/src/plugins/utils/trimmer/trimmer.c +++ b/src/plugins/utils/trimmer/trimmer.c @@ -24,7 +24,7 @@ #define BT_COMP_LOG_SELF_COMP (trimmer_comp->self_comp) #define BT_LOG_OUTPUT_LEVEL (trimmer_comp->log_level) #define BT_LOG_TAG "PLUGIN/FLT.UTILS.TRIMMER" -#include "plugins/comp-logging.h" +#include "logging/comp-logging.h" #include "compat/utc.h" #include "compat/time.h"