dynamic log types
[protos/libecoli.git] / lib / ecoli_node_many.c
index 8746269..b40b3bd 100644 (file)
@@ -43,6 +43,8 @@
 #include <ecoli_node_option.h>
 #include <ecoli_node_many.h>
 
+EC_LOG_TYPE_REGISTER(node_many);
+
 struct ec_node_many {
        struct ec_node gen;
        unsigned int min;
@@ -224,7 +226,7 @@ static int ec_node_many_testcase(void)
 
        node = ec_node_many(NULL, ec_node_str(NULL, "foo"), 0, 0);
        if (node == NULL) {
-               ec_log(EC_LOG_ERR, "cannot create node\n");
+               EC_LOG(EC_LOG_ERR, "cannot create node\n");
                return -1;
        }
        ret |= EC_TEST_CHECK_PARSE(node, 0);
@@ -236,7 +238,7 @@ static int ec_node_many_testcase(void)
 
        node = ec_node_many(NULL, ec_node_str(NULL, "foo"), 1, 0);
        if (node == NULL) {
-               ec_log(EC_LOG_ERR, "cannot create node\n");
+               EC_LOG(EC_LOG_ERR, "cannot create node\n");
                return -1;
        }
        ret |= EC_TEST_CHECK_PARSE(node, -1, "bar");
@@ -247,7 +249,7 @@ static int ec_node_many_testcase(void)
 
        node = ec_node_many(NULL, ec_node_str(NULL, "foo"), 1, 2);
        if (node == NULL) {
-               ec_log(EC_LOG_ERR, "cannot create node\n");
+               EC_LOG(EC_LOG_ERR, "cannot create node\n");
                return -1;
        }
        ret |= EC_TEST_CHECK_PARSE(node, -1, "bar");
@@ -260,7 +262,7 @@ static int ec_node_many_testcase(void)
        /* test completion */
        node = ec_node_many(NULL, ec_node_str(NULL, "foo"), 2, 4);
        if (node == NULL) {
-               ec_log(EC_LOG_ERR, "cannot create node\n");
+               EC_LOG(EC_LOG_ERR, "cannot create node\n");
                return -1;
        }
        ret |= EC_TEST_CHECK_COMPLETE(node,