lib: use BT_LIB_LOG*_APPEND_CAUSE() where appropriate
[babeltrace.git] / src / lib / graph / port.c
index ff4e4430438998cd201288f13cb133cd20104419..d7455dca82afb1c6ce33185d04a277e9cc982c18 100644 (file)
@@ -21,8 +21,8 @@
  * SOFTWARE.
  */
 
-#define BT_LOG_TAG "PORT"
-#include "lib/lib-logging.h"
+#define BT_LOG_TAG "LIB/PORT"
+#include "lib/logging.h"
 
 #include "common/assert.h"
 #include "lib/assert-pre.h"
@@ -44,7 +44,7 @@ void destroy_port(struct bt_object *obj)
 {
        struct bt_port *port = (void *) obj;
 
-       BT_LIB_LOGD("Destroying port: %!+p", port);
+       BT_LIB_LOGI("Destroying port: %!+p", port);
 
        if (port->name) {
                g_string_free(port->name, TRUE);
@@ -66,17 +66,17 @@ struct bt_port *bt_port_create(struct bt_component *parent_component,
        BT_ASSERT(strlen(name) > 0);
        port = g_new0(struct bt_port, 1);
        if (!port) {
-               BT_LOGE_STR("Failed to allocate one port.");
+               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate one port.");
                goto end;
        }
 
-       BT_LIB_LOGD("Creating port for component: %![comp-]+c, port-type=%s, "
+       BT_LIB_LOGI("Creating port for component: %![comp-]+c, port-type=%s, "
                "port-name=\"%s\"", parent_component, bt_port_type_string(type),
                name);
        bt_object_init_shared_with_parent(&port->base, destroy_port);
        port->name = g_string_new(name);
        if (!port->name) {
-               BT_LOGE_STR("Failed to allocate one GString.");
+               BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate one GString.");
                BT_OBJECT_PUT_REF_AND_RESET(port);
                goto end;
        }
@@ -84,7 +84,7 @@ struct bt_port *bt_port_create(struct bt_component *parent_component,
        port->type = type;
        port->user_data = user_data;
        bt_object_set_parent(&port->base, &parent_component->base);
-       BT_LIB_LOGD("Created port for component: "
+       BT_LIB_LOGI("Created port for component: "
                "%![comp-]+c, %![port-]+p", parent_component, port);
 
 end:
@@ -134,7 +134,7 @@ void bt_port_set_connection(struct bt_port *port,
         * connection exists.
         */
        port->connection = connection;
-       BT_LIB_LOGV("Set port's connection: %![port-]+p, %![conn-]+x", port,
+       BT_LIB_LOGI("Set port's connection: %![port-]+p, %![conn-]+x", port,
                connection);
 }
 
This page took 0.025089 seconds and 4 git commands to generate.