Index: uspace/drv/test2/test2.c
===================================================================
--- uspace/drv/test2/test2.c	(revision af6b515772b7e673b3f80cc8621a65997fed0821)
+++ uspace/drv/test2/test2.c	(revision 3acb285a881a9cf9fc6e09b09a42adaafea9afb3)
@@ -36,4 +36,5 @@
 #include <str_error.h>
 #include <ddf/driver.h>
+#include <ddf/log.h>
 
 #define NAME "test2"
@@ -64,9 +65,9 @@
 	int rc;
 
-	printf(NAME ": registering function `%s': %s.\n", name, message);
+	ddf_msg(LVL_DEBUG, "Registering function `%s': %s.\n", name, message);
 
 	fun = ddf_fun_create(parent, fun_inner, name);
 	if (fun == NULL) {
-		printf(NAME ": error creating function %s\n", name);
+		ddf_msg(LVL_ERROR, "Failed creating function %s\n", name);
 		return ENOMEM;
 	}
@@ -74,5 +75,6 @@
 	rc = ddf_fun_add_match_id(fun, match_id, match_score);
 	if (rc != EOK) {
-		printf(NAME ": error adding match IDs to function %s\n", name);
+		ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s\n",
+		    name);
 		ddf_fun_destroy(fun);
 		return rc;
@@ -81,5 +83,5 @@
 	rc = ddf_fun_bind(fun);
 	if (rc != EOK) {
-		printf(NAME ": error binding function %s: %s\n", name,
+		ddf_msg(LVL_ERROR, "Failed binding function %s: %s\n", name,
 		    str_error(rc));
 		ddf_fun_destroy(fun);
@@ -87,5 +89,5 @@
 	}
 
-	printf(NAME ": registered child device `%s'\n", name);
+	ddf_msg(LVL_NOTE, "Registered child device `%s'\n", name);
 	return EOK;
 }
@@ -111,5 +113,5 @@
 	fun_a = ddf_fun_create(dev, fun_exposed, "a");
 	if (fun_a == NULL) {
-		printf(NAME ": error creating function 'a'.\n");
+		ddf_msg(LVL_ERROR, "Failed creating function 'a'.\n");
 		return ENOMEM;
 	}
@@ -117,5 +119,5 @@
 	rc = ddf_fun_bind(fun_a);
 	if (rc != EOK) {
-		printf(NAME ": error binding function 'a'.\n");
+		ddf_msg(LVL_ERROR, "Failed binding function 'a'.\n");
 		return rc;
 	}
@@ -128,5 +130,5 @@
 static int test2_add_device(ddf_dev_t *dev)
 {
-	printf(NAME ": test2_add_device(name=\"%s\", handle=%d)\n",
+	ddf_msg(LVL_DEBUG, "test2_add_device(name=\"%s\", handle=%d)\n",
 	    dev->name, (int) dev->handle);
 
@@ -134,5 +136,5 @@
 		fid_t postpone = fibril_create(postponed_birth, dev);
 		if (postpone == 0) {
-			printf(NAME ": fibril_create() error\n");
+			ddf_msg(LVL_ERROR, "fibril_create() failed.\n");
 			return ENOMEM;
 		}
@@ -149,4 +151,5 @@
 {
 	printf(NAME ": HelenOS test2 virtual device driver\n");
+	ddf_log_init(NAME, LVL_ERROR);
 	return ddf_driver_main(&test2_driver);
 }
