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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/17762 )
Change subject: trxcon/logging: print category, level and extended timestamp
......................................................................
trxcon/logging: print category, level and extended timestamp
Since we're heavily using trxcon in ttcn3-bts-test, the logging
output should contain as much information as possible. Ideally
we should introduce the VTY interface (see OS#3666) and get
logging configuration options as a bonus. But let's just use
some beneficial hard-coded defaults for now:
- print category and level (huh, we use NOTICE everywhere?),
- do not print category-hex (who needs it anyway?),
- print extended timestamp, so we're in synce with other logs.
P.S. This configuration is based on my own debugging experience.
Change-Id: Ie3d259f3255d8af80e6780f850b808fa243f97b4
---
M src/host/trxcon/trxcon.c
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/62/17762/1
diff --git a/src/host/trxcon/trxcon.c b/src/host/trxcon/trxcon.c
index ecee518..dfce2b8 100644
--- a/src/host/trxcon/trxcon.c
+++ b/src/host/trxcon/trxcon.c
@@ -1,7 +1,7 @@
/*
* OsmocomBB <-> SDR connection bridge
*
- * (C) 2016-2019 by Vadim Yanitskiy <axilirator at gmail.com>
+ * (C) 2016-2020 by Vadim Yanitskiy <axilirator at gmail.com>
*
* All Rights Reserved
*
@@ -53,7 +53,7 @@
#include "sched_trx.h"
#define COPYRIGHT \
- "Copyright (C) 2016-2019 by Vadim Yanitskiy <axilirator at gmail.com>\n" \
+ "Copyright (C) 2016-2020 by Vadim Yanitskiy <axilirator at gmail.com>\n" \
"License GPLv2+: GNU GPL version 2 or later " \
"<http://gnu.org/licenses/gpl.html>\n" \
"This is free software: you are free to change and redistribute it.\n" \
@@ -283,6 +283,12 @@
/* Init logging system */
trx_log_init(tall_trxcon_ctx, app_data.debug_mask);
+ /* Configure pretty logging */
+ log_set_print_extended_timestamp(osmo_stderr_target, 1);
+ log_set_print_category_hex(osmo_stderr_target, 0);
+ log_set_print_category(osmo_stderr_target, 1);
+ log_set_print_level(osmo_stderr_target, 1);
+
/* Optional GSMTAP */
if (app_data.gsmtap_ip != NULL) {
gsmtap = gsmtap_source_init(app_data.gsmtap_ip, GSMTAP_UDP_PORT, 1);
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/17762
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ie3d259f3255d8af80e6780f850b808fa243f97b4
Gerrit-Change-Number: 17762
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200408/b3acd55b/attachment.htm>