aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs/debug.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-02-20 16:48:15 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-27 07:10:50 +0000
commit5ea1817dc299611808532eda489981f09f87cba3 (patch)
treee92846654f2071526d08112dc4abb55dcd397340 /CommonLibs/debug.c
parent49d42e979eb08cef124e8ceab7d402bed204c015 (diff)
Add initial support for logging, vty, ctrl
Up to this point, the logging system, vty and ctrl are initialized and can be used fine, though they don't have a lot of use yet. Depends on libosmocore Change-Id Ib79cdb62d45d8c78445c7b064e58eb7e9faeccf9 Related: OS#2184 Change-Id: I08982c37b4f873966304b3cfb38a10ee86eb3dad
Diffstat (limited to 'CommonLibs/debug.c')
-rw-r--r--CommonLibs/debug.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/CommonLibs/debug.c b/CommonLibs/debug.c
new file mode 100644
index 0000000..e4db2f3
--- /dev/null
+++ b/CommonLibs/debug.c
@@ -0,0 +1,18 @@
+#include <osmocom/core/logging.h>
+#include <osmocom/core/utils.h>
+#include "debug.h"
+
+/* default categories */
+static const struct log_info_cat default_categories[] = {
+ [DMAIN] = {
+ .name = "DMAIN",
+ .description = "Main generic category",
+ .color = NULL,
+ .enabled = 1, .loglevel = LOGL_NOTICE,
+ },
+};
+
+const struct log_info log_info = {
+ .cat = default_categories,
+ .num_cat = ARRAY_SIZE(default_categories),
+};