logging: Replace remaining fprintf() calls with libosmocore logging

Change-Id: I2a772b3180131923d4e2ee7311670b938cb50fe0
diff --git a/src/client/remsim_client.c b/src/client/remsim_client.c
index 182894f..388aa26 100644
--- a/src/client/remsim_client.c
+++ b/src/client/remsim_client.c
@@ -140,7 +140,7 @@
 
 	bc->main_fi = main_fsm_alloc(bc, bc);
 	if (!bc->main_fi) {
-		fprintf(stderr, "Unable to create main client FSM: %s\n", strerror(errno));
+		LOGP(DMAIN, LOGL_FATAL, "Unable to create main client FSM: %s\n", strerror(errno));
 		exit(1);
 	}
 
@@ -158,7 +158,7 @@
 
 	rc = server_conn_fsm_alloc(bc, srvc);
 	if (rc < 0) {
-		fprintf(stderr, "Unable to create Server conn FSM: %s\n", strerror(errno));
+		LOGP(DMAIN, LOGL_FATAL, "Unable to create Server conn FSM: %s\n", strerror(errno));
 		exit(1);
 	}
 	osmo_fsm_inst_change_parent(srvc->fi, bc->main_fi, MF_E_SRVC_LOST);
@@ -171,7 +171,7 @@
 	memcpy(&bankdc->own_comp_id, &srvc->own_comp_id, sizeof(bankdc->own_comp_id));
 	rc = server_conn_fsm_alloc(bc, bankdc);
 	if (rc < 0) {
-		fprintf(stderr, "Unable to connect bankd conn FSM: %s\n", strerror(errno));
+		LOGP(DMAIN, LOGL_FATAL, "Unable to connect bankd conn FSM: %s\n", strerror(errno));
 		exit(1);
 	}
 	osmo_fsm_inst_update_id(bankdc->fi, "bankd");
diff --git a/src/client/remsim_client_main.c b/src/client/remsim_client_main.c
index f064960..47ec8ac 100644
--- a/src/client/remsim_client_main.c
+++ b/src/client/remsim_client_main.c
@@ -188,7 +188,7 @@
 
 	/* Silently (and portably) reap children. */
 	if (avoid_zombies() < 0) {
-		fprintf(stderr, "Unable to silently reap children: %s\n", strerror(errno));
+		LOGP(DMAIN, LOGL_FATAL, "Unable to silently reap children: %s\n", strerror(errno));
 		exit(1);
 	}
 
diff --git a/src/client/user_simtrace2.c b/src/client/user_simtrace2.c
index 8d8a6c9..100d55b 100644
--- a/src/client/user_simtrace2.c
+++ b/src/client/user_simtrace2.c
@@ -404,7 +404,7 @@
 
 	rc = osmo_libusb_init(NULL);
 	if (rc < 0) {
-		fprintf(stderr, "libusb initialization failed\n");
+		LOGP(DMAIN, LOGL_ERROR, "libusb initialization failed\n");
 		return rc;
 	}
 
@@ -427,7 +427,7 @@
 	transp->usb_async = true;
 	transp->usb_devh = osmo_libusb_open_claim_interface(NULL, NULL, ifm);
 	if (!transp->usb_devh) {
-		fprintf(stderr, "can't open USB device\n");
+		LOGP(DMAIN, LOGL_ERROR, "can't open USB device\n");
 		return -1;
 	}
 
@@ -437,14 +437,14 @@
 
 	rc = libusb_claim_interface(transp->usb_devh, cfg->usb.if_num);
 	if (rc < 0) {
-		fprintf(stderr, "can't claim interface %d; rc=%d\n", cfg->usb.if_num, rc);
+		LOGP(DMAIN, LOGL_ERROR, "can't claim interface %d; rc=%d\n", cfg->usb.if_num, rc);
 		goto close_exit;
 	}
 
 	rc = osmo_libusb_get_ep_addrs(transp->usb_devh, cfg->usb.if_num, &transp->usb_ep.out,
 					&transp->usb_ep.in, &transp->usb_ep.irq_in);
 	if (rc < 0) {
-		fprintf(stderr, "can't obtain EP addrs; rc=%d\n", rc);
+		LOGP(DMAIN, LOGL_ERROR, "can't obtain EP addrs; rc=%d\n", rc);
 		goto close_exit;
 	}