]> git.itanic.dy.fi Git - rrdd/commitdiff
rrdtool: Improve debug prints
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 14 Apr 2012 17:39:19 +0000 (20:39 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 14 Apr 2012 17:39:19 +0000 (20:39 +0300)
Use the debug macro for printing. Also remove the unimportant message
indicating the job is done. It is obvious that all is done when other
prints start coming out.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
rrdtool.c

index 84f73b05f21f7964e0b9a598068166386f43744f..8c112052096404ff076f6abea58478822e5ff52c 100644 (file)
--- a/rrdtool.c
+++ b/rrdtool.c
@@ -211,7 +211,7 @@ static int create_database(struct rrd_database *db)
        int child, i;
 
        if (!db->sources || !db->archives) {
-               printf("Cannot create db \"%s\", insufficient source data\n",
+               pr_err("Cannot create db \"%s\", insufficient source data\n",
                        db->filename);
                return -1;
        }
@@ -253,13 +253,12 @@ int rrdtool_create_missing_databases(struct rrd_database *dbs[])
 
        for (i = 0, db = dbs[i]; db; i++, db = dbs[i]) {
                if (database_exists(db)) {
-                       printf("database %s found\n", db->filename);
+                       pr_info("database %s found\n", db->filename);
                        continue;
                }
-               printf("Database %s missing, creating\n", db->filename);
+               pr_info("Database %s missing, creating\n", db->filename);
                create_database(db);
        }
-       printf("All done\n");
 
        return 0;
 }