summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-02-09 14:09:06 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2017-02-09 16:21:01 +0100
commit6f0f560eab7bd28110b1bd1d3bcf97e2690e3d50 (patch)
treeeebb98a447c694871725ed5abb6a20f4636d2ebd /tests
parent2c717948d91540016067f87bb3e0913067d42647 (diff)
cosmetic: replace fprintf with LOGP
socket.c still uses fprintf to output error messages. This commit replaces the fprintf with proper LOGP messages. Change-Id: Ia2993415d5f5c33ccd719af239ff59252d11b764
Diffstat (limited to 'tests')
-rw-r--r--tests/socket/socket_test.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c
index 75088e5f..5b6abc42 100644
--- a/tests/socket/socket_test.c
+++ b/tests/socket/socket_test.c
@@ -28,8 +28,10 @@
#include <arpa/inet.h>
#include <netinet/in.h>
+#include <osmocom/core/application.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/socket.h>
+#include <osmocom/core/logging.h>
#include "../config.h"
@@ -71,8 +73,21 @@ static int test_sockinit(void)
return 0;
}
+const struct log_info_cat default_categories[] = {
+};
+
+static struct log_info info = {
+ .cat = default_categories,
+ .num_cat = ARRAY_SIZE(default_categories),
+};
+
int main(int argc, char *argv[])
{
+ osmo_init_logging(&info);
+ log_set_use_color(osmo_stderr_target, 0);
+ log_set_print_filename(osmo_stderr_target, 0);
+
test_sockinit();
- return 0;
+
+ return EXIT_SUCCESS;
}