summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-21 11:47:25 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-21 11:47:25 +0100
commitc1879e47ba99c32fb7b9c12a842723fe7f293bcb (patch)
treebdd6f4756e5ad59cd32ad2c3ceedd7edfbf201f4
parenta1909e6c80448f3dd7b56942a5af9d4106afd2f9 (diff)
logging: Define default logging categories
-rw-r--r--src/logging.h9
-rw-r--r--src/main.c17
2 files changed, 25 insertions, 1 deletions
diff --git a/src/logging.h b/src/logging.h
new file mode 100644
index 0000000..2ac7906
--- /dev/null
+++ b/src/logging.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include <osmocom/core/logging.h>
+
+enum {
+ DSIP,
+ DMNCC,
+ DAPP,
+};
diff --git a/src/main.c b/src/main.c
index 4d8d360..de0dd85 100644
--- a/src/main.c
+++ b/src/main.c
@@ -20,9 +20,9 @@
#include "evpoll.h"
#include "vty.h"
+#include "logging.h"
#include <osmocom/core/application.h>
-#include <osmocom/core/logging.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/stats.h>
@@ -40,6 +40,21 @@
void *tall_mncc_ctx;
static struct log_info_cat mncc_sip_categories[] = {
+ [DSIP] = {
+ .name = "DSIP",
+ .description = "SIP interface",
+ .enabled = 1, .loglevel = LOGL_NOTICE,
+ },
+ [DMNCC] = {
+ .name = "DMNCC",
+ .description = "MNCC interface",
+ .enabled = 1, .loglevel = LOGL_NOTICE,
+ },
+ [DAPP] = {
+ .name = "DAPP",
+ .description = "Application interface",
+ .enabled = 1, .loglevel = LOGL_NOTICE,
+ },
};
static const struct log_info mncc_sip_info = {