X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Fcommon%2Fmetadata%2Flogging.hpp;h=a62f1e1eb9a8693848a580d215f841197430264b;hb=4164020e790fa6c0700715936b40a3fa46df479e;hp=4488b620b40d67989ca3ed2e9d8c76a6e0ab34fd;hpb=087cd0f57f0f7d815a609a4e041d1200f380e4aa;p=babeltrace.git diff --git a/src/plugins/ctf/common/metadata/logging.hpp b/src/plugins/ctf/common/metadata/logging.hpp index 4488b620..a62f1e1e 100644 --- a/src/plugins/ctf/common/metadata/logging.hpp +++ b/src/plugins/ctf/common/metadata/logging.hpp @@ -20,43 +20,43 @@ BT_LOG_LEVEL_EXTERN_SYMBOL(ctf_plugin_metadata_log_level); * To be used by functions without a context structure to pass all the * logging configuration at once. */ -struct meta_log_config { - bt_logging_level log_level; +struct meta_log_config +{ + bt_logging_level log_level; - /* Weak, exactly one of these must be set */ - bt_self_component *self_comp; - bt_self_component_class *self_comp_class; + /* Weak, exactly one of these must be set */ + bt_self_component *self_comp; + bt_self_component_class *self_comp_class; }; -#define _BT_LOGT_LINENO(_lineno, _msg, args...) \ - BT_LOGT("At line %u in metadata stream: " _msg, _lineno, ## args) +#define _BT_LOGT_LINENO(_lineno, _msg, args...) \ + BT_LOGT("At line %u in metadata stream: " _msg, _lineno, ##args) -#define _BT_LOGW_LINENO(_lineno, _msg, args...) \ - BT_LOGW("At line %u in metadata stream: " _msg, _lineno, ## args) +#define _BT_LOGW_LINENO(_lineno, _msg, args...) \ + BT_LOGW("At line %u in metadata stream: " _msg, _lineno, ##args) -#define _BT_LOGE_APPEND_CAUSE_LINENO(_lineno, _msg, args...) \ - do { \ - BT_LOGE("At line %u in metadata stream: " _msg, _lineno, ## args); \ - (void) BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN( \ - "CTF metadata parser", "At line %u in metadata stream: " _msg, _lineno, ## args); \ - } while (0) +#define _BT_LOGE_APPEND_CAUSE_LINENO(_lineno, _msg, args...) \ + do { \ + BT_LOGE("At line %u in metadata stream: " _msg, _lineno, ##args); \ + (void) BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_UNKNOWN( \ + "CTF metadata parser", "At line %u in metadata stream: " _msg, _lineno, ##args); \ + } while (0) -#define _BT_COMP_LOGT_LINENO(_lineno, _msg, args...) \ - BT_COMP_LOGT("At line %u in metadata stream: " _msg, _lineno, ## args) +#define _BT_COMP_LOGT_LINENO(_lineno, _msg, args...) \ + BT_COMP_LOGT("At line %u in metadata stream: " _msg, _lineno, ##args) -#define _BT_COMP_LOGW_LINENO(_lineno, _msg, args...) \ - BT_COMP_LOGW("At line %u in metadata stream: " _msg, _lineno, ## args) +#define _BT_COMP_LOGW_LINENO(_lineno, _msg, args...) \ + BT_COMP_LOGW("At line %u in metadata stream: " _msg, _lineno, ##args) -#define _BT_COMP_LOGE_LINENO(_lineno, _msg, args...) \ - BT_COMP_LOGE("At line %u in metadata stream: " _msg, _lineno, ## args) +#define _BT_COMP_LOGE_LINENO(_lineno, _msg, args...) \ + BT_COMP_LOGE("At line %u in metadata stream: " _msg, _lineno, ##args) -#define _BT_COMP_LOGE_APPEND_CAUSE_LINENO(_lineno, _msg, args...) \ - BT_COMP_LOGE_APPEND_CAUSE(BT_COMP_LOG_SELF_COMP, "At line %u in metadata stream: " _msg, _lineno, ## args) +#define _BT_COMP_LOGE_APPEND_CAUSE_LINENO(_lineno, _msg, args...) \ + BT_COMP_LOGE_APPEND_CAUSE(BT_COMP_LOG_SELF_COMP, "At line %u in metadata stream: " _msg, \ + _lineno, ##args) -#define _BT_COMP_OR_COMP_CLASS_LOGE_APPEND_CAUSE(_msg, args...) \ - BT_COMP_OR_COMP_CLASS_LOGE_APPEND_CAUSE( \ - BT_COMP_LOG_SELF_COMP, \ - BT_COMP_LOG_SELF_COMP_CLASS, \ - _msg, ## args) +#define _BT_COMP_OR_COMP_CLASS_LOGE_APPEND_CAUSE(_msg, args...) \ + BT_COMP_OR_COMP_CLASS_LOGE_APPEND_CAUSE(BT_COMP_LOG_SELF_COMP, BT_COMP_LOG_SELF_COMP_CLASS, \ + _msg, ##args) #endif /* CTF_METADATA_LOGGING_H */