aboutsummaryrefslogtreecommitdiffstats
path: root/src/ipaccess
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-13 17:16:44 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-02-14 12:15:40 +0100
commit7997bf4bed15fa8c6807820b1a9b379a2ae0c61e (patch)
tree2313d9a2d1c823702d8f52c293ad52ebe51ce6ba /src/ipaccess
parentec1bb16eef42cf2cf32af8faca05d234b2a0c891 (diff)
libcommon: eliminate debug.c
Provide concise log categories for each main scope. Move the complete log categories 1:1 to osmo_bsc_main.c. In bsc_nat.c, omit obviously unused log categories. In tests, omit almost all log categories, except for those explicitly tested as the expected output. Note: should any logging occur for a log category that is omitted by accident, such will end up being logged as DLGLOBAL, so it will show up and we can fix it, and it will not get lost silently. Change-Id: Ib524e49ec211662e0dfde8161495a72aa8ad76cf
Diffstat (limited to 'src/ipaccess')
-rw-r--r--src/ipaccess/ipaccess-config.c14
-rw-r--r--src/ipaccess/ipaccess-proxy.c14
2 files changed, 28 insertions, 0 deletions
diff --git a/src/ipaccess/ipaccess-config.c b/src/ipaccess/ipaccess-config.c
index 957a5bb2c..7e8cafdba 100644
--- a/src/ipaccess/ipaccess-config.c
+++ b/src/ipaccess/ipaccess-config.c
@@ -838,6 +838,20 @@ static void print_options(void)
extern void bts_model_nanobts_init();
+static const struct log_info_cat log_categories[] = {
+ [DNM] = {
+ .name = "DNM",
+ .description = "A-bis Network Management / O&M (NM/OML)",
+ .color = "\033[1;36m",
+ .enabled = 1, .loglevel = LOGL_INFO,
+ },
+};
+
+static const struct log_info log_info = {
+ .cat = log_categories,
+ .num_cat = ARRAY_SIZE(log_categories),
+};
+
int main(int argc, char **argv)
{
struct gsm_bts *bts;
diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c
index b45b5439f..40749ee7a 100644
--- a/src/ipaccess/ipaccess-proxy.c
+++ b/src/ipaccess/ipaccess-proxy.c
@@ -1200,6 +1200,20 @@ static void handle_options(int argc, char** argv)
}
}
+static const struct log_info_cat log_categories[] = {
+ [DMM] = {
+ .name = "DMM",
+ .description = "Layer3 Mobility Management (MM)",
+ .color = "\033[1;33m",
+ .enabled = 1, .loglevel = LOGL_NOTICE,
+ },
+};
+
+const struct log_info log_info = {
+ .cat = log_categories,
+ .num_cat = ARRAY_SIZE(log_categories),
+};
+
int main(int argc, char **argv)
{
int rc;