src.ctf.lttng-live: use BT_COMP_LOG*() instead of BT_LOG*()
[babeltrace.git] / src / plugins / ctf / fs-src / fs.c
index 5ff6d352a723d4f2763a5c8836aca9266e97bba0..37a21f61ee1b83950f5492670a5861ee6870dbbb 100644 (file)
@@ -28,7 +28,6 @@
 #include "common/common.h"
 #include <babeltrace2/babeltrace.h>
 #include "compat/uuid.h"
-#include "plugins/plugins-common.h"
 #include <glib.h>
 #include "common/assert.h"
 #include <inttypes.h>
 #include "file.h"
 #include "../common/metadata/decoder.h"
 #include "../common/msg-iter/msg-iter.h"
-#include "../common/utils/utils.h"
 #include "query.h"
 
-#define BT_LOG_TAG "PLUGIN-CTF-FS-SRC"
+#define BT_LOG_TAG "PLUGIN/SRC.CTF.FS"
 #include "logging.h"
 
 static
@@ -261,8 +259,8 @@ bt_self_message_iterator_status ctf_fs_iterator_init(
        msg_iter_data->pc_msg_iter = self_msg_iter;
        msg_iter_data->msg_iter = bt_msg_iter_create(
                port_data->ds_file_group->ctf_fs_trace->metadata->tc,
-               bt_common_get_page_size() * 8,
-               ctf_fs_ds_file_medops, NULL);
+               bt_common_get_page_size(BT_LOG_OUTPUT_LEVEL) * 8,
+               ctf_fs_ds_file_medops, NULL, BT_LOG_OUTPUT_LEVEL, NULL);
        if (!msg_iter_data->msg_iter) {
                BT_LOGE_STR("Cannot create a CTF message iterator.");
                ret = BT_SELF_MESSAGE_ITERATOR_STATUS_NOMEM;
@@ -457,7 +455,7 @@ int create_one_port_for_trace(struct ctf_fs_component *ctf_fs,
                goto error;
        }
 
-       BT_LOGD("Creating one port named `%s`", port_name);
+       BT_LOGI("Creating one port named `%s`", port_name);
 
        /* Create output port for this file */
        port_data = g_new0(struct ctf_fs_port_data, 1);
@@ -722,7 +720,8 @@ int add_ds_file_to_ds_file_group(struct ctf_fs_trace *ctf_fs_trace,
        struct bt_msg_iter_packet_properties props;
 
        msg_iter = bt_msg_iter_create(ctf_fs_trace->metadata->tc,
-               bt_common_get_page_size() * 8, ctf_fs_ds_file_medops, NULL);
+               bt_common_get_page_size(BT_LOG_OUTPUT_LEVEL) * 8,
+               ctf_fs_ds_file_medops, NULL, BT_LOG_OUTPUT_LEVEL, NULL);
        if (!msg_iter) {
                BT_LOGE_STR("Cannot create a CTF message iterator.");
                goto error;
@@ -881,13 +880,13 @@ int create_ds_file_groups(struct ctf_fs_trace *ctf_fs_trace)
 
                if (!strcmp(basename, CTF_FS_METADATA_FILENAME)) {
                        /* Ignore the metadata stream. */
-                       BT_LOGD("Ignoring metadata file `%s" G_DIR_SEPARATOR_S "%s`",
+                       BT_LOGI("Ignoring metadata file `%s" G_DIR_SEPARATOR_S "%s`",
                                ctf_fs_trace->path->str, basename);
                        continue;
                }
 
                if (basename[0] == '.') {
-                       BT_LOGD("Ignoring hidden file `%s" G_DIR_SEPARATOR_S "%s`",
+                       BT_LOGI("Ignoring hidden file `%s" G_DIR_SEPARATOR_S "%s`",
                                ctf_fs_trace->path->str, basename);
                        continue;
                }
@@ -904,7 +903,7 @@ int create_ds_file_groups(struct ctf_fs_trace *ctf_fs_trace)
                g_string_append_printf(file->path, "%s" G_DIR_SEPARATOR_S "%s",
                                ctf_fs_trace->path->str, basename);
                if (!g_file_test(file->path->str, G_FILE_TEST_IS_REGULAR)) {
-                       BT_LOGD("Ignoring non-regular file `%s`",
+                       BT_LOGI("Ignoring non-regular file `%s`",
                                file->path->str);
                        ctf_fs_file_destroy(file);
                        file = NULL;
@@ -919,7 +918,7 @@ int create_ds_file_groups(struct ctf_fs_trace *ctf_fs_trace)
 
                if (file->size == 0) {
                        /* Skip empty stream. */
-                       BT_LOGD("Ignoring empty file `%s`", file->path->str);
+                       BT_LOGI("Ignoring empty file `%s`", file->path->str);
                        ctf_fs_file_destroy(file);
                        continue;
                }
@@ -1160,7 +1159,7 @@ int ctf_fs_find_traces(GList **trace_paths, const char *start_path)
        dir = g_dir_open(start_path, 0, &error);
        if (!dir) {
                if (error->code == G_FILE_ERROR_ACCES) {
-                       BT_LOGD("Cannot open directory `%s`: %s (code %d): continuing",
+                       BT_LOGI("Cannot open directory `%s`: %s (code %d): continuing",
                                start_path, error->message, error->code);
                        goto end;
                }
@@ -1928,7 +1927,7 @@ end:
 BT_HIDDEN
 bt_self_component_status ctf_fs_init(
                bt_self_component_source *self_comp,
-               const bt_value *params, UNUSED_VAR void *init_method_data)
+               const bt_value *params, __attribute__((unused)) void *init_method_data)
 {
        struct ctf_fs_component *ctf_fs;
        bt_self_component_status ret = BT_SELF_COMPONENT_STATUS_OK;
@@ -1946,6 +1945,7 @@ bt_query_status ctf_fs_query(
                bt_self_component_class_source *comp_class,
                const bt_query_executor *query_exec,
                const char *object, const bt_value *params,
+               __attribute__((unused)) bt_logging_level log_level,
                const bt_value **result)
 {
        bt_query_status status = BT_QUERY_STATUS_OK;
This page took 0.024415 seconds and 4 git commands to generate.