Rename VERBOSE log level to TRACE
[babeltrace.git] / src / plugins / ctf / common / metadata / logging.h
index 81f76a2a3166c0062b26d9e62b384c0f5a007958..313eb712548d771b3b8931e4af4153611c0709a8 100644 (file)
  * SOFTWARE.
  */
 
-#define BT_LOG_OUTPUT_LEVEL metadata_log_level
+#include <babeltrace2/babeltrace.h>
 #include "logging/log.h"
 
-BT_LOG_LEVEL_EXTERN_SYMBOL(metadata_log_level);
+/*
+ * This global log level is for the generated lexer and parser: we can't
+ * use a contextual log level for their "tracing", so they rely on this.
+ */
+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;
 
-#define _BT_LOGV_LINENO(_lineno, _msg, args...) \
-       BT_LOGV("At line %u in metadata stream: " _msg, _lineno, ## args)
+       /* Weak */
+       bt_self_component *self_comp;
+};
+
+#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)
@@ -37,4 +52,13 @@ BT_LOG_LEVEL_EXTERN_SYMBOL(metadata_log_level);
 #define _BT_LOGE_LINENO(_lineno, _msg, args...) \
        BT_LOGE("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_LOGE_LINENO(_lineno, _msg, args...) \
+       BT_COMP_LOGE("At line %u in metadata stream: " _msg, _lineno, ## args)
+
 #endif /* CTF_METADATA_LOGGING_H */
This page took 0.025149 seconds and 4 git commands to generate.