switch to libosmocore multihread-logging
When osmo-remsim was originally developed, libosmocore logging was
not yet thread-safe. This meant that the worker threads of remsim-bankd
and remsim-server could not log via the libosmocore logging framework
but directly used stderr/stdout, which produced rather inconsistent log
output.
However, since 1.3.0, libosmocore has received support for
multi-threaded applications. Let's make use of this and consistently
use it in remsim-server and remsim-bankd. This obviously also means
adding some more log categories.
Change-Id: I7bd5264c559b756927046563a2d00c54826bee9b
diff --git a/src/server/rspro_server.c b/src/server/rspro_server.c
index b35800f..6514f80 100644
--- a/src/server/rspro_server.c
+++ b/src/server/rspro_server.c
@@ -709,11 +709,11 @@
/* read from the socket to "confirm" the event and make it non-readable again */
rc = read(ofd->fd, &value, 8);
if (rc < 8) {
- fprintf(stderr, "Error reading eventfd: %d\n", rc);
+ LOGP(DMAIN, LOGL_ERROR, "Error reading eventfd: %d\n", rc);
return rc;
}
- printf("rspro_server: Event FD arrived, checking for any pending work\n");
+ LOGP(DMAIN, LOGL_INFO, "Event FD arrived, checking for any pending work\n");
pthread_rwlock_rdlock(&srv->rwlock);
llist_for_each_entry(conn, &srv->banks, list) {