aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-01-02 16:39:11 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-01-07 16:04:04 +0100
commitaebbfe0ee779cfafc421c201658a68f74376da02 (patch)
tree638d519e78d30da4b6e6d582e4c6a921231322ed /CommonLibs
parentda7fee8ea87d958991a2a465d077e72d53f698ee (diff)
Make logging category DLMS generic and reusable for other backends
Make sure old configs using "logging level lms <level>" are still accepted. Initialization order of VTY componenets need to be resorted since newly introduced command requires logging VTY node to be already setup beforehand. Change-Id: Ia195a74a62a8a3dd6267fb1359acaa5628208d8e
Diffstat (limited to 'CommonLibs')
-rw-r--r--CommonLibs/debug.c6
-rw-r--r--CommonLibs/debug.h2
-rw-r--r--CommonLibs/trx_vty.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/CommonLibs/debug.c b/CommonLibs/debug.c
index cc5be44..c227435 100644
--- a/CommonLibs/debug.c
+++ b/CommonLibs/debug.c
@@ -65,9 +65,9 @@ static const struct log_info_cat default_categories[] = {
.color = NULL,
.enabled = 1, .loglevel = LOGL_INFO,
},
- [DLMS] = {
- .name = "DLMS",
- .description = "Logging from within LimeSuite itself",
+ [DDEVDRV] = {
+ .name = "DDEVDRV",
+ .description = "Logging from external device driver library implementing lower level specifics",
.color = NULL,
.enabled = 1, .loglevel = LOGL_NOTICE,
},
diff --git a/CommonLibs/debug.h b/CommonLibs/debug.h
index 3837329..0dca2ee 100644
--- a/CommonLibs/debug.h
+++ b/CommonLibs/debug.h
@@ -15,7 +15,7 @@ enum {
DTRXDDL,
DTRXDUL,
DDEV,
- DLMS,
+ DDEVDRV,
};
#define CLOGC(category, level, fmt, args...) do { \
diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index 02d6572..44e1d31 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -32,6 +32,7 @@
#include <osmocom/core/rate_ctr.h>
#include <osmocom/vty/command.h>
+#include <osmocom/vty/logging.h>
#include <osmocom/vty/vty.h>
#include <osmocom/vty/misc.h>
@@ -731,5 +732,7 @@ int trx_vty_init(struct trx_ctx* trx)
install_element(CHAN_NODE, &cfg_chan_rx_path_cmd);
install_element(CHAN_NODE, &cfg_chan_tx_path_cmd);
+ logging_vty_add_deprecated_subsys(g_trx_ctx, "lms");
+
return 0;
}