This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/25705 )
Change subject: simtrace2-tool: Initialize logging to avoid error on first log output
......................................................................
simtrace2-tool: Initialize logging to avoid error on first log output
This avoids
ERROR: osmo_log_info == NULL! You must call log_init() before using logging in log_check_level()
Change-Id: Id355ef33e10164f8e8eb40c2fd0b606bc8e9b6f7
---
M host/src/simtrace2-tool.c
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/host/src/simtrace2-tool.c b/host/src/simtrace2-tool.c
index f1423b0..97d7706 100644
--- a/host/src/simtrace2-tool.c
+++ b/host/src/simtrace2-tool.c
@@ -39,6 +39,8 @@
#include <osmocom/core/utils.h>
#include <osmocom/core/msgb.h>
+#include <osmocom/core/logging.h>
+#include <osmocom/core/application.h>
/***********************************************************************
* Incoming Messages
@@ -213,6 +215,7 @@
return rc;
}
+static struct log_info log_info = {};
int main(int argc, char **argv)
{
@@ -265,6 +268,8 @@
transp->udp_fd = -1;
+ osmo_init_logging2(NULL, &log_info);
+
rc = osmo_libusb_init(NULL);
if (rc < 0) {
fprintf(stderr, "libusb initialization failed\n");
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/25705
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: Id355ef33e10164f8e8eb40c2fd0b606bc8e9b6f7
Gerrit-Change-Number: 25705
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211008/16cb68ad/attachment.htm>